00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CS_IMESH_SPRITECAL3D_H__
00020 #define __CS_IMESH_SPRITECAL3D_H__
00021
00022 #include "csutil/scf.h"
00023 #include "csutil/garray.h"
00024 #include "csutil/cscolor.h"
00025 #include "ivideo/graph3d.h"
00026
00027 class csColor;
00028 struct iMaterialWrapper;
00029 struct iSkeleton;
00030 struct iSkeletonState;
00031 struct iMeshObject;
00032 struct iMeshWrapper;
00033 struct iMeshObjectFactory;
00034 struct iRenderView;
00035 struct iRenderView;
00036
00037
00038
00039 SCF_VERSION (iSpriteCal3DFactoryState, 0, 0, 3);
00040
00044 struct iSpriteCal3DFactoryState : public iBase
00045 {
00047 virtual bool Create(const char *name) = 0;
00048
00053 virtual void ReportLastError () = 0;
00054
00059 virtual void SetBasePath(const char *path) = 0;
00060
00064 virtual void SetRenderScale(float scale) = 0;
00065
00069 virtual bool LoadCoreSkeleton(const char *filename) = 0;
00070
00074 virtual int LoadCoreAnimation(const char *filename,
00075 const char *name,
00076 int type,
00077 float base_velocity,
00078 float min_velocity,
00079 float max_velocity) = 0;
00080
00091 virtual int LoadCoreMesh(const char *filename,const char *name,bool attach,iMaterialWrapper *defmat) = 0;
00092
00102 virtual int LoadCoreMorphTarget(int mesh_index,const char *filename,const char *name) = 0;
00103
00108 virtual bool AddCoreMaterial(iMaterialWrapper *mat) = 0;
00109
00114 virtual void BindMaterials() = 0;
00115
00120 virtual int GetMeshCount() = 0;
00121
00130 virtual int GetMorphTargetCount(int mesh_id) = 0;
00131
00135 virtual const char *GetMeshName(int idx) = 0;
00136
00140 virtual int FindMeshName(const char *meshName) = 0;
00141
00145 virtual bool IsMeshDefault(int idx) = 0;
00146 };
00147
00148 SCF_VERSION (iSpriteCal3DState, 0, 0, 1);
00149
00150
00155 struct iSpriteCal3DState : public iBase
00156 {
00158 enum
00159 {
00160 C3D_ANIM_TYPE_NONE,
00161 C3D_ANIM_TYPE_TRAVEL,
00162 C3D_ANIM_TYPE_CYCLE,
00163 C3D_ANIM_TYPE_STYLE_CYCLE,
00164 C3D_ANIM_TYPE_ACTION
00165 };
00166
00168 virtual int GetAnimCount() = 0;
00169
00171 virtual const char *GetAnimName(int idx) = 0;
00172
00174 virtual int GetAnimType(int idx) = 0;
00175
00177 virtual void ClearAllAnims() = 0;
00178
00180 virtual bool SetAnimCycle(const char *name, float weight) = 0;
00181
00189 virtual bool AddAnimCycle(const char *name, float weight, float delay) = 0;
00190
00195 virtual bool ClearAnimCycle(const char *name, float delay) = 0;
00196
00203 virtual bool SetAnimAction(const char *name, float delayIn, float delayOut) = 0;
00204
00211 virtual bool SetVelocity(float vel) = 0;
00212
00217 virtual void SetLOD(float lod) = 0;
00218
00223 virtual bool AttachCoreMesh(const char *meshname) = 0;
00224
00232 virtual bool AttachCoreMesh(int mesh_id,int iMatWrap) = 0;
00233
00238 virtual bool DetachCoreMesh(const char *meshname) = 0;
00239
00246 virtual bool DetachCoreMesh(int mesh_id) = 0;
00247
00258 virtual bool BlendMorphTarget(int mesh_id, int morph_id, float weight, float delay) = 0;
00259
00269 virtual bool ClearMorphTarget(int mesh_id, int morph_id, float delay) = 0;
00270
00280 virtual bool BlendBase(int mesh_id, float weight, float delay) = 0;
00281
00290 virtual bool ClearBase(int mesh_id, float delay) = 0;
00291
00292 };
00293
00294 #endif// __CS_IMESH_SPRITECAL3D_H__