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

# deActor_Priv.hpp

Go to the documentation of this file.

    00001 ///////////////////////////////////////////////////////////////////////////////
    00002 /// @file deActorMesh.hpp
    00003 ///
    00004 /// @brief This header file contains ONLY mesh routines for the Actor class
    00005 ///
    00006 /// @author mittens
    00007 ///
    00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
    00009 /// contents of this file is subject to the Destiny3D Member License which
    00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
    00011 ///
    00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
    00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
    00014 /// for any particular purpose.
    00015 ///
    00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
    00017 ///
    00018 /// <hr>
    00019 ///                                 Change History
    00020 /// <hr>
    00021 ///
    00022 /// @date May 2004
    00023 /// @author Trent 'mittens' Polack (trent@polycat.net)
    00024 /// @remarks Early on in development. Don't fuck with the mistakes OR YOU DIE!
    00025 ///////////////////////////////////////////////////////////////////////////////
    00026 #ifndef DEACTOR_PRIV_H
    00027 #define DEACTOR_PRIV_H
    00028
    00029 #include "deActor.hpp"
    00030 #include "deResource_Helper.hpp"
    00031
    00032 class IdeSurface;
    00033 class IdeFile;
    00034
    00035 //structure for holding an MS3D mesh group (the mesh is divided into several groups)
    00036 struct deActorSubMesh {
    00037     int m_materialIndex;
    00038     int m_numTriangles;
    00039     int *m_pTriangleIndices;
    00040 };
    00041
    00042 //vertex structure for the mesh (each vertex is assigned a bone ID to correspond with the vertex)
    00043 struct deActorMeshVertex {
    00044     char m_boneID;  // for skeletal animation
    00045     float m_location[3];
    00046 };
    00047
    00048 //structure for a triangle on the mesh
    00049 struct deActorMeshTriangle {
    00050     float m_vertexNormals[3][3];
    00051     float m_s[3], m_t[3];
    00052     int m_vertexIndices[3];
    00053 };
    00054
    00055 //=========================================================
    00056 // deActorMesh
    00057 //=========================================================
    00058 class deActorMesh {
    00059 protected:
    00060     deActorSubMesh *m_pSubMeshes;
    00061     deActorMeshVertex *m_pVertices;
    00062     deActorMeshTriangle *m_pTriangles;
    00063     IdeSurface *m_pMaterials;
    00064
    00065     int m_numMeshes;
    00066     int m_numMaterials;
    00067     int m_numTriangles;
    00068     int m_numVertices;
    00069
    00070 public:
    00071
    00072     bool LoadMeshData( const char *filename );
    00073     void Render( );
    00074 //  void reloadTextures();
    00075
    00076 deActorMesh( );
    00077 ~deActorMesh( );
    00078 };
    00079
    00080 //class that contains (or will contain, anyway) the skeletal stuff for the deActor module
    00081 class deActorSkeleton {
    00082
    00083 public:
    00084
    00085 deActorSkeleton( ) {    }
    00086 ~deActorSkeleton( ) {   }
    00087 };
    00088
    00089 class deActorDef : public IdeActorDef, public deResourceBase
    00090 {
    00091 public:
    00092     deActorDef();
    00093     deActorDef(const char *filename);
    00094     void * GetRscInterface(long interface_id);
    00095
    00096     deBoolean LoadActorFile(IdeFile *file);
    00097
    00098     static long s_ActorRscInterfaceID;
    00099
    00100 protected:
    00101     // call IdeResourceBase::Release instead
    00102     virtual ~deActorDef();
    00103 };
    00104
    00105 #endif  //DEACTOR_PRIV_H