Blender
V3.3
|
#include <BCMath.h>
Public Member Functions | |
float(& | location () const)[3] |
float(& | rotation () const)[3] |
float(& | scale () const)[3] |
float(& | quat () const)[4] |
BCMatrix (BC_global_forward_axis global_forward_axis, BC_global_up_axis global_up_axis) | |
BCMatrix (const BCMatrix &mat) | |
BCMatrix (Matrix &mat) | |
BCMatrix (Object *ob) | |
BCMatrix () | |
void | get_matrix (DMatrix &matrix, bool transposed=false, int precision=-1) const |
void | get_matrix (Matrix &matrix, bool transposed=false, int precision=-1, bool inverted=false) const |
void | set_transform (Object *ob) |
void | set_transform (Matrix &mat) |
void | add_transform (Matrix &to, const Matrix &transform, const Matrix &from, bool inverted=false) |
void | apply_transform (Matrix &to, const Matrix &transform, const Matrix &from, bool inverse=false) |
void | add_inverted_transform (Matrix &to, const Matrix &transform, const Matrix &from) |
void | add_transform (const Matrix &matrix, bool inverted=false) |
void | add_transform (const BCMatrix &matrix, bool inverted=false) |
void | apply_transform (const BCMatrix &matrix, bool inverted=false) |
bool | in_range (const BCMatrix &other, float distance) const |
Static Public Member Functions | |
static void | sanitize (Matrix &matrix, int precision) |
static void | sanitize (DMatrix &matrix, int precision) |
static void | transpose (Matrix &matrix) |
BCMatrix::BCMatrix | ( | BC_global_forward_axis | global_forward_axis, |
BC_global_up_axis | global_up_axis | ||
) |
Definition at line 47 of file BCMath.cpp.
References BC_DEFAULT_FORWARD, BC_DEFAULT_UP, copy_m4_m3(), mat3_from_axis_conversion(), and set_transform().
BCMatrix::BCMatrix | ( | const BCMatrix & | mat | ) |
Definition at line 27 of file BCMath.cpp.
References set_transform().
BCMatrix::BCMatrix | ( | Matrix & | mat | ) |
Definition at line 32 of file BCMath.cpp.
References set_transform().
BCMatrix::BCMatrix | ( | Object * | ob | ) |
Definition at line 37 of file BCMath.cpp.
References set_transform().
BCMatrix::BCMatrix | ( | ) |
Definition at line 42 of file BCMath.cpp.
void BCMatrix::add_inverted_transform | ( | Matrix & | to, |
const Matrix & | transform, | ||
const Matrix & | from | ||
) |
Definition at line 103 of file BCMath.cpp.
References from, invert_m4_m4(), mul_m4_m4m4(), and transform().
Definition at line 62 of file BCMath.cpp.
References add_transform().
Definition at line 57 of file BCMath.cpp.
References add_transform().
void BCMatrix::add_transform | ( | Matrix & | to, |
const Matrix & | transform, | ||
const Matrix & | from, | ||
bool | inverted = false |
||
) |
Definition at line 72 of file BCMath.cpp.
References from, invert_m4_m4(), mul_m4_m4m4(), and transform().
Referenced by add_transform(), apply_transform(), and bc_add_global_transform().
Definition at line 67 of file BCMath.cpp.
References apply_transform().
void BCMatrix::apply_transform | ( | Matrix & | to, |
const Matrix & | transform, | ||
const Matrix & | from, | ||
bool | inverse = false |
||
) |
Definition at line 87 of file BCMath.cpp.
References add_transform(), from, inverse(), invert_m4_m4(), mul_m4_m4m4(), and transform().
Referenced by apply_transform(), and bc_apply_global_transform().
We need double here because the OpenCollada API needs it. precision = -1 indicates to not limit the precision.
Definition at line 166 of file BCMath.cpp.
References blender::math::floor(), and pow().
Referenced by TransformWriter::add_node_transform_identity(), bc_add_global_transform(), and bc_apply_global_transform().
void BCMatrix::get_matrix | ( | Matrix & | matrix, |
bool | transposed = false , |
||
int | precision = -1 , |
||
bool | inverted = false |
||
) | const |
Definition at line 179 of file BCMath.cpp.
References blender::math::floor(), invert_m4(), and pow().
Definition at line 199 of file BCMath.cpp.
References blender::math::distance(), and fabs().
Referenced by bc_is_animated().
float(& BCMatrix::location | ( | ) | )[3] |
Definition at line 211 of file BCMath.cpp.
Referenced by BCSample::get_value().
float(& BCMatrix::quat | ( | ) | )[4] |
Definition at line 226 of file BCMath.cpp.
Referenced by BCSample::get_value().
float(& BCMatrix::rotation | ( | ) | )[3] |
|
static |
Definition at line 150 of file BCMath.cpp.
References double_round().
|
static |
Definition at line 139 of file BCMath.cpp.
References double(), double_round(), and float().
Referenced by TransformWriter::add_node_transform_ob().
float(& BCMatrix::scale | ( | ) | )[3] |
void BCMatrix::set_transform | ( | Matrix & | mat | ) |
Definition at line 121 of file BCMath.cpp.
References copy_m4_m4(), mat4_decompose(), and quat_to_eul().
Definition at line 110 of file BCMath.cpp.
References BKE_object_matrix_local_get(), copy_m4_m4(), mat4_decompose(), quat_to_compatible_eul(), and Object::rot.
Referenced by BCMatrix().
|
static |
Definition at line 134 of file BCMath.cpp.
References transpose_m4().