# COLLADAModel.h

    00001 //***************************************************************************************
    00002 //
    00003 // File supervisor: Crosswalk team
    00004 //
    00005 // Copyright 2008 Autodesk, Inc.  All rights reserved.
    00006 // Use of this software is subject to the terms of the Autodesk license agreement
    00007 // provided at the time of installation or download, or which otherwise accompanies
    00008 // this software in either electronic or hard copy form.
    00009 //
    00010 //***************************************************************************************
    00011
    00012 #ifndef _COLLADAMODEL_H
    00013 #define _COLLADAMODEL_H
    00014
    00015 #include "Template.h"
    00016 #include "Logger.h"
    00017 #include "Scene.h"
    00018 #include "COLLADATemplate.h"
    00019 #include "Model.h"
    00020
    00021
    00022 class CSLModel;
    00023 class CSLAmbience;
    00024 class CSLAngle;
    00025 class CSLCoordinateSystem;
    00026 class CSLFileInfo;
    00027 class CSLSceneInfo;
    00028 class CSLEnvelopeList;
    00029 class CSLMaterialLibrary;
    00030 class CSLFog;
    00031 class CSLActionFCurve;
    00032 class CSLFCurve;
    00033 class CSLTransform;
    00034 class CSLAction;
    00035 class CSLShapeAnimation;
    00036 class CSLVisibility;
    00037 class CSLXSIMaterial;
    00038 class CSLImageLibrary;
    00039 class CSLImage;
    00040 class CSLXSIShader;
    00041 class CSLBaseMaterial;
    00042
    00048 class XSIEXPORT CSLCOLLADAModel : public CSLModel
    00049 {
    00050 public:
    00052     // Construction/destruction
    00054
    00061     CSLCOLLADAModel(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
    00062
    00064     virtual ~CSLCOLLADAModel();
    00065
    00066
    00070     virtual SI_Error Fix();
    00071
    00075     virtual SI_Error Synchronize();
    00076
    00080     virtual CSLModel*   AddModel();
    00081
    00085     virtual CSLModel*   AddPointLight();
    00086
    00090     virtual CSLModel*   AddDirectionalLight();
    00091
    00095     virtual CSLModel*   AddInfiniteLight();
    00096
    00100     virtual CSLModel*   AddSpotLight();
    00101
    00105     virtual CSLModel*   AddCamera();
    00106
    00110     virtual CSLModel*   AddXSIMesh();
    00111
    00115     virtual CSLModel*   AddXSICamera();
    00116
    00120     virtual CSLModel*   AddInstance();
    00121
    00126     CCOLLADATemplate*   FindInstanceMaterial(char *in_pName);
    00127
    00132     virtual const SI_Char* GetParameterName(CSLAnimatableType* in_pParameter);
    00133
    00138     const char* GetInstanceTarget(char* in_pSymbol);
    00139
    00144     const char* GetInstanceSymbol(char* in_pTarget);
    00145
    00149     virtual CSLMixer* CreateMixer();
    00150
    00154     void SetTechniqueCommon(CCOLLADATemplate* in_pTechniqueCommon)
    00155     {
    00156         m_pTechniqueCommon = in_pTechniqueCommon;
    00157     }
    00158
    00163     void AddInstanceMaterialSymbol(char* in_pSymbol, char* in_pTarget);
    00164
    00165 protected:
    00166
    00167 private:
    00168     // private structure for symbol->target association in instance_material elements
    00169     struct COLLADAInstanceMaterial
    00170     {
    00171         SI_Char* m_Symbol;
    00172         SI_Char* m_Target;
    00173     };
    00174
    00175     CSLTemplate::ERotationOrder GetRotationOrder(CdotXSITemplates* in_pRotations);
    00176
    00177     CCOLLADATemplate* AddInstanceMaterial(CCOLLADATemplate *in_pTechniqueCommon, CSLBaseMaterial* in_pMaterial);
    00178     CCOLLADATemplate* AddInstanceMaterialName(CCOLLADATemplate *in_pTechniqueCommon, CSIBCString in_szMaterialName);
    00179
    00180
    00181     CCOLLADATemplate* m_pTechniqueCommon;
    00182     CSIBCArray<COLLADAInstanceMaterial>  m_InstanceMaterialSymbols;
    00183 };
    00184
    00185 #endif