10#include "COLLADABUPlatform.h"
24 COLLADAFW::Node *node,
25 std::map<COLLADAFW::UniqueId, Animation> *animation_map,
32 COLLADAFW::Node *node,
33 std::map<COLLADAFW::UniqueId, Animation> *animation_map,
35 float parent_mat[4][4])
42 for (
uint i = 0; i < node->getTransformations().getCount(); i++) {
44 COLLADAFW::Transformation *tm = node->getTransformations()[i];
45 COLLADAFW::Transformation::TransformationType type = tm->getTransformationType();
48 case COLLADAFW::Transformation::MATRIX:
57 case COLLADAFW::Transformation::TRANSLATE:
60 case COLLADAFW::Transformation::ROTATE:
63 case COLLADAFW::Transformation::SCALE:
66 case COLLADAFW::Transformation::LOOKAT:
67 fprintf(stderr,
"|! LOOKAT transformations are not supported yet.\n");
69 case COLLADAFW::Transformation::SKEW:
70 fprintf(stderr,
"|! SKEW transformations are not supported yet.\n");
79 const COLLADAFW::UniqueId &anim_list_id = tm->getAnimationList();
83 (*animation_map)[anim_list_id] = anim;
94 COLLADAFW::Rotate *ro = (COLLADAFW::Rotate *)tm;
95 COLLADABU::Math::Vector3 &axis = ro->getRotationAxis();
96 const float angle =
float(
DEG2RAD(ro->getRotationAngle()));
108 COLLADAFW::Translate *tra = (COLLADAFW::Translate *)tm;
109 COLLADABU::Math::Vector3 &t = tra->getTranslation();
113 m[3][0] =
float(t[0]);
114 m[3][1] =
float(t[1]);
115 m[3][2] =
float(t[2]);
120 COLLADABU::Math::Vector3 &s = ((COLLADAFW::Scale *)tm)->getScale();
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m4(float m[4][4])
void size_to_mat4(float R[4][4], const float size[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void axis_angle_to_quat(float r[4], const float axis[3], float angle)
void quat_to_mat4(float m[4][4], const float q[4])
void axis_angle_to_mat4(float R[4][4], const float axis[3], float angle)
ATTR_WARN_UNUSED_RESULT const BMVert * v
static void dae_matrix_to_mat4_(float out[4][4], const COLLADABU::Math::Matrix4 &in)
draw_view in_light_buf[] float
static void copy(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)