FUtils/FUDaeWriter.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2005-2006 Feeling Software Inc.
00003     MIT License: http://www.opensource.org/licenses/mit-license.php
00004 */
00005 
00011 #ifndef _FU_DAE_WRITER_H_
00012 #define _FU_DAE_WRITER_H_
00013 
00014 #ifdef HAS_LIBXML
00015 
00016 #include "FUtils/FUDaeEnum.h"
00017 #include "FUtils/FUDaeSyntax.h"
00018 #include "FUtils/FUUri.h"
00019 #include "FUtils/FUXmlWriter.h"
00020 
00029 namespace FUDaeWriter
00030 {
00031     using namespace FUXmlWriter;
00032 
00035     struct FCOLLADA_EXPORT FUDaeAccessor
00036     {
00037         static const char* XYZW[]; 
00038         static const char* RGBA[]; 
00039         static const char* STPQ[]; 
00040     };
00041 
00048     FCOLLADA_EXPORT xmlNode* AddExtraTechniqueChild(xmlNode* parent, const char* profile);
00049 
00055     FCOLLADA_EXPORT xmlNode* AddTechniqueChild(xmlNode* parent, const char* profile);
00056 
00064     FCOLLADA_EXPORT xmlNode* AddParameter(xmlNode* parent, const char* name, const char* type);
00065 
00082     FCOLLADA_EXPORT xmlNode* AddInput(xmlNode* parent, const char* sourceId, const char* semantic, int32 offset=-1, int32 set=-1);
00083     inline xmlNode* AddInput(xmlNode* parent, const string& sourceId, const char* semantic, int32 offset=-1, int32 set=-1) { return AddInput(parent, sourceId.c_str(), semantic, offset, set); } 
00095     FCOLLADA_EXPORT xmlNode* AddArray(xmlNode* parent, const char* id, const char* arrayType, const char* content, size_t count);
00096 
00106     FCOLLADA_EXPORT xmlNode* AddArray(xmlNode* parent, const char* id, const FMMatrix44List& values, float lengthFactor=1.0f);
00107 
00116     FCOLLADA_EXPORT xmlNode* AddArray(xmlNode* parent, const char* id, const FMVector3List& values, float lengthFactor=1.0f);
00117 
00126     FCOLLADA_EXPORT xmlNode* AddArray(xmlNode* parent, const char* id, const FloatList& values, float lengthFactor=1.0f);
00127 
00138     FCOLLADA_EXPORT xmlNode* AddArray(xmlNode* parent, const char* id, const StringList& values, const char* arrayType=DAE_NAME_ARRAY_ELEMENT);
00139 
00150     FCOLLADA_EXPORT xmlNode* AddAccessor(xmlNode* parent, const char* arrayId, size_t count, size_t stride=1, const char** parameters=NULL, const char* type=NULL);
00151     inline xmlNode* AddAccessor(xmlNode* parent, const string& arrayId, size_t count, size_t stride=1, const char** parameters=NULL, const char* type=NULL) { return AddAccessor(parent, arrayId.c_str(), count, stride, parameters, type); } 
00163     FCOLLADA_EXPORT xmlNode* AddSourceFloat(xmlNode* parent, const char* id, const FloatList& values, size_t stride=1, const char** parameters=NULL, float lengthFactor=1.0f);
00164     inline xmlNode* AddSourceFloat(xmlNode* parent, const string& id, const FloatList& values, size_t stride=1, const char** parameters=NULL, float lengthFactor=1.0f) { return AddSourceFloat(parent, id.c_str(), values, stride, parameters, lengthFactor); } 
00174     FCOLLADA_EXPORT xmlNode* AddSourceFloat(xmlNode* parent, const char* id, const FloatList& values, const char* parameter=NULL, float lengthFactor=1.0f);
00175     inline xmlNode* AddSourceFloat(xmlNode* parent, const string& id, const FloatList& values, const char* parameter=NULL, float lengthFactor=1.0f) { return AddSourceFloat(parent, id.c_str(), values, parameter, lengthFactor); } 
00183     FCOLLADA_EXPORT xmlNode* AddSourceMatrix(xmlNode* parent, const char* id, const FMMatrix44List& values, float lengthFactor=1.0f);
00184     inline xmlNode* AddSourceMatrix(xmlNode* parent, const string& id, const FMMatrix44List& values, float lengthFactor=1.0f) { return AddSourceMatrix(parent, id.c_str(), values, lengthFactor); } 
00191     FCOLLADA_EXPORT xmlNode* AddSourceColor(xmlNode* parent, const char* id, const FMVector3List& values);
00192     inline xmlNode* AddSourceColor(xmlNode* parent, const string& id, const FMVector3List& values) { return AddSourceColor(parent, id.c_str(), values); } 
00199     FCOLLADA_EXPORT xmlNode* AddSourceTexcoord(xmlNode* parent, const char* id, const FMVector3List& values);
00200     inline xmlNode* AddSourceTexcoord(xmlNode* parent, const string& id, const FMVector3List& values) { return AddSourceTexcoord(parent, id.c_str(), values); } 
00208     FCOLLADA_EXPORT xmlNode* AddSourcePosition(xmlNode* parent, const char* id, const FMVector3List& values, float lengthFactor=1.0f);
00209     inline xmlNode* AddSourcePosition(xmlNode* parent, const string& id, const FMVector3List& values, float lengthFactor=1.0f) { return AddSourcePosition(parent, id.c_str(), values, lengthFactor); } 
00219     FCOLLADA_EXPORT xmlNode* AddSourceString(xmlNode* parent, const char* id, const StringList& values, const char* parameter=NULL);
00220     inline xmlNode* AddSourceString(xmlNode* parent, const string& id, const StringList& values, const char* parameter=NULL) { return AddSourceString(parent, id.c_str(), values, parameter); } 
00228     FCOLLADA_EXPORT xmlNode* AddSourceIDRef(xmlNode* parent, const char* id, const StringList& values, const char* parameter=NULL);
00229     inline xmlNode* AddSourceIDRef(xmlNode* parent, const string& id, const StringList& values, const char* parameter=NULL) { return AddSourceIDRef(parent, id.c_str(), values, parameter); } 
00237     FCOLLADA_EXPORT xmlNode* AddSourceInterpolation(xmlNode* parent, const char* id, const FUDaeInterpolationList& interpolations);
00238     inline xmlNode* AddSourceInterpolation(xmlNode* parent, const string& id, const FUDaeInterpolationList& values) { return AddSourceInterpolation(parent, id.c_str(), values); } 
00244     FCOLLADA_EXPORT string CleanId(const char* id);
00245     inline string CleanId(const string& id) { return CleanId(id.c_str()); } 
00250     FCOLLADA_EXPORT fstring CleanName(const fchar* name);
00251     inline fstring CleanName(const fstring& name) { return CleanName(name.c_str()); } 
00258     FCOLLADA_EXPORT string AddNodeSid(xmlNode* node, const char* wantedSid);
00259 };
00260 
00261 #endif // HAS_LIBXML
00262 
00263 #endif // _FU_DAE_WRITER_H_

Generated on Fri May 12 16:44:39 2006 for FCollada by  doxygen 1.4.6-NO