Panda3D

fcollada_utils.h

00001 // Filename: fcollada_utils.h
00002 // Created by:  pro-rsoft (22Dec08)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 // This file defines some conversion tools for conversion between
00016 // FCollada and Panda3D
00017 
00018 #ifndef FCOLLADA_UTILS_H
00019 #define FCOLLADA_UTILS_H
00020 
00021 #include "pre_fcollada_include.h"
00022 #include "FCollada.h"
00023 
00024 // Useful conversion stuff
00025 inline LVecBase3d TO_VEC3(FMVector3 v) {
00026   return LVecBase3d(v.x, v.y, v.z);
00027 }
00028 inline LVecBase4d TO_VEC4(FMVector4 v) {
00029   return LVecBase4d(v.x, v.y, v.z, v.w);
00030 }
00031 inline LColor TO_COLOR(FMVector4 v) {
00032   return LColor(v.x, v.y, v.z, v.w);
00033 }
00034 #define FROM_VEC3(v) (FMVector3(v[0], v[1], v[2]))
00035 #define FROM_VEC4(v) (FMVector4(v[0], v[1], v[2], v[3]))
00036 #define FROM_MAT4(v) (FMMatrix44(v.getData()))
00037 #define FROM_FSTRING(fs) (string(fs.c_str()))
00038 
00039 #endif
 All Classes Functions Variables Enumerations