Blender  V2.93
TransformReader.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #include "COLLADAFWMatrix.h"
24 #include "COLLADAFWNode.h"
25 #include "COLLADAFWRotate.h"
26 #include "COLLADAFWScale.h"
27 #include "COLLADAFWTransformation.h"
28 #include "COLLADAFWTranslate.h"
29 #include "COLLADAFWUniqueId.h"
30 #include "Math/COLLADABUMathVector3.h"
31 
32 #include "BLI_math.h"
33 #include "DNA_object_types.h"
34 
35 #include "collada_internal.h"
36 
37 // struct Object;
38 
40  protected:
42 
43  public:
44  struct Animation {
46  COLLADAFW::Node *node;
47  COLLADAFW::Transformation *tm; /* which transform is animated by an AnimationList->id */
48  };
49 
51 
52  void get_node_mat(float mat[4][4],
53  COLLADAFW::Node *node,
54  std::map<COLLADAFW::UniqueId, Animation> *animation_map,
55  Object *ob);
56  void get_node_mat(float mat[4][4],
57  COLLADAFW::Node *node,
58  std::map<COLLADAFW::UniqueId, Animation> *animation_map,
59  Object *ob,
60  float parent_mat[4][4]);
61 
62  void dae_rotate_to_mat4(COLLADAFW::Transformation *tm, float m[4][4]);
63  void dae_translate_to_mat4(COLLADAFW::Transformation *tm, float m[4][4]);
64  void dae_scale_to_mat4(COLLADAFW::Transformation *tm, float m[4][4]);
65  void dae_matrix_to_mat4(COLLADAFW::Transformation *tm, float m[4][4]);
66  void dae_translate_to_v3(COLLADAFW::Transformation *tm, float v[3]);
67  void dae_scale_to_v3(COLLADAFW::Transformation *tm, float v[3]);
68  void dae_vector3_to_v3(const COLLADABU::Math::Vector3 &v3, float v[3]);
69 };
Object is a sort of wrapper for general info.
ATTR_WARN_UNUSED_RESULT const BMVert * v
void dae_matrix_to_mat4(COLLADAFW::Transformation *tm, float m[4][4])
void dae_translate_to_v3(COLLADAFW::Transformation *tm, float v[3])
void get_node_mat(float mat[4][4], COLLADAFW::Node *node, std::map< COLLADAFW::UniqueId, Animation > *animation_map, Object *ob)
void dae_scale_to_v3(COLLADAFW::Transformation *tm, float v[3])
void dae_vector3_to_v3(const COLLADABU::Math::Vector3 &v3, float v[3])
void dae_translate_to_mat4(COLLADAFW::Transformation *tm, float m[4][4])
void dae_scale_to_mat4(COLLADAFW::Transformation *tm, float m[4][4])
TransformReader(UnitConverter *conv)
void dae_rotate_to_mat4(COLLADAFW::Transformation *tm, float m[4][4])
UnitConverter * unit_converter
OperationNode * node
float[3] Vector3
COLLADAFW::Transformation * tm