Panda3D
fcollada_utils.h
1 // Filename: fcollada_utils.h
2 // Created by: pro-rsoft (22Dec08)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 // This file defines some conversion tools for conversion between
16 // FCollada and Panda3D
17 
18 #ifndef FCOLLADA_UTILS_H
19 #define FCOLLADA_UTILS_H
20 
21 #include "pre_fcollada_include.h"
22 #include "FCollada.h"
23 
24 // Useful conversion stuff
25 inline LVecBase3d TO_VEC3(FMVector3 v) {
26  return LVecBase3d(v.x, v.y, v.z);
27 }
28 inline LVecBase4d TO_VEC4(FMVector4 v) {
29  return LVecBase4d(v.x, v.y, v.z, v.w);
30 }
31 inline LColor TO_COLOR(FMVector4 v) {
32  return LColor(v.x, v.y, v.z, v.w);
33 }
34 #define FROM_VEC3(v) (FMVector3(v[0], v[1], v[2]))
35 #define FROM_VEC4(v) (FMVector4(v[0], v[1], v[2], v[3]))
36 #define FROM_MAT4(v) (FMMatrix44(v.getData()))
37 #define FROM_FSTRING(fs) (string(fs.c_str()))
38 
39 #endif
This is the base class for all three-component vectors and points.
Definition: lvecBase4.h:1677
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:1471
This is the base class for all three-component vectors and points.
Definition: lvecBase4.h:111