CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

spritecal3d.h

00001 /*
00002     Copyright (C) 2003 by Keith Fulton
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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__

Generated for Crystal Space by doxygen 1.2.14