|
CgleMilkShapeModel |
Methods | | Description |
| CgleMilkShapeModel () | | |
| virtual ~CgleMilkShapeModel () | | |
| |
| BOOL LoadFromFile (char* fileName) | | Load a file containing a single model. |
| BOOL LoadFromResource (HINSTANCE hAppInst, UINT ResID) | | Load a model stored as an embedded resource. See above and the 2D Texture class for more information. |
| |
| void AddTextureIndexToMap (char* texName, int texIndex) | | Add the design-time texture file name and the run-time texture handle to a map so the materials can locate the correct texture at run-time. |
| void UpdateMaterialTextureIndices () | | Iterates through the materials and searches the texture index map for the handle associated with it's design-time texture file name. Call this after loading the texture indices w/ AddTextureIndexToMap, but before drawing. |
| |
| void SetDrawCallback (DrawCallBack pfnCallBack) | | This allows the user to define a callback function that wikk be called at the beginning of each mesh's rendering pass. This can be used to refine or override the material/texture information stored in the model file. The callback function prototype must have a void return type, accept as itr's single parameter a point to a CMilkShapeMesh object, and use the WINAPI macro to define it's calling convention; e.g., 'void WINAPI MeshCallBack(CMilkShapeMesh* mesh)'.
|
| |
| void SetUseCompiledVertexArrays (BOOL value) | | The class can optionally use the GL_EXT_compiled_vertex_array extension. The application is responsible for first initializing the API (see InitializeCompiledArrays). |
| BOOL GetUseCompiledVertexArrays () | | |
| |
| void BuildVertexArrays (char* meshName, BOOL bForceFlatShadedNormals = FALSE) | | It is not normally necessary to call this; it is called internally as the model is loaded. If you want to override the MilkShape - generated normals and create true flat-shaded normals, this function is provided. |
| |
| float GetAnimationFPS () | | |
| void SetAnimationFPS (float value) | | |
| |
| float GetAnimationCurrentTime () | | |
| void SetAnimationCurrentTime (float value) | | |
| |
| int GetAnimationFrameCount () | | |
| void SetAnimationFrameCount (int value) | | |
| |
| void Draw () | | |
| void DrawMesh (int index, BOOL bUseTexCoords) | | |
| void DrawMesh (char* meshName, BOOL bUseTexCoords) | | |
| |
| int GetVertexCount () | | |
| CMilkShapeVertex* GetVertexPtr (int index) | | |
| int GetVertexExVersion () | | |
| CMilkShapeVertexEx* GetVertexExPtr() | | |
| |
| int GetTriangleCount () | | |
| CMilkShapeTriangle* GetTrianglePtr (int index) | | |
| |
| int GetMeshCount () | | |
| CMilkShapeMesh* GetMeshPtr (char* meshName) | | |
| CMilkShapeMesh* GetMeshPtr (int index) | | |
| |
| int GetMaterialCount () | | |
| CMilkShapeMaterial* GetMaterialPtr (char* materialName) | | |
| CMilkShapeMaterial* GetMaterialPtr (int index) | | |
| |
| int GetJointCount () | | |
| CMilkShapeJoint* GetJointPtr (char* jointName) | | |
| CMilkShapeJoint* GetJointPtr (int index) | | |
| int GetJointExVersion () | | |
| CMilkShapeJointEx* GetJointExPtr (int index) | | |
| |
| int GetGroupCommentCount () | | |
| CMilkShapeComment* GetGroupCommentPtr (int index) | | |
| |
| int GetMaterialCommentCount () | | |
| CMilkShapeComment* GetMaterialCommentPtr (int index) | | |
| |
| int GetJointCommentCount () | | |
| CMilkShapeComment* GetJointCommentPtr (int index) | | |
| |
| CMilkShapeComment* GetModelCommentPtr () | | |
| |
| CMilkShapeAABB* GetAABB () | | |