Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

bodyinst.h

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  BODYINST.H                                                                          */
00003 /*                                                                                      */
00004 /*  Author: Mike Sandige                                                                    */
00005 /*  Description: Actor body instance interface.                                             */
00006 /*                                                                                      */
00007 /*  The contents of this file are subject to the Genesis3D Public License               */
00008 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00009 /*  compliance with the License. You may obtain a copy of the License at                */
00010 /*  http://www.genesis3d.com                                                            */
00011 /*                                                                                      */
00012 /*  Software distributed under the License is distributed on an "AS IS"                 */
00013 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00014 /*  the License for the specific language governing rights and limitations              */
00015 /*  under the License.                                                                  */
00016 /*                                                                                      */
00017 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00018 /*  Genesis3D Version 1.1 released November 15, 1999                                 */
00019 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00020 /*                                                                                      */
00021 /****************************************************************************************/
00022 #ifndef GE_BODYINST_H
00023 #define GE_BODYINST_H 
00024 
00025 /* This object is for accessing and retrieving an 'instance' of the geometry
00026    for a body.  
00027    
00028    The retrieval is a list of drawing commands in world space or 
00029    in camera space.  
00030 
00031    An array of transforms that corresponds to the bones in the body is needed.
00032  */
00033 
00034 
00035 #include "basetype.h"
00036 #include "xform3d.h"
00037 #include "body.h"
00038 #include "XFArray.h"
00039 #include "camera.h"
00040 
00041 
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045 
00046 
00047 typedef struct geBodyInst geBodyInst;
00048 
00049 typedef int16 geBodyInst_Index;
00050 
00051 typedef enum 
00052 {
00053         GE_BODYINST_FACE_TRIANGLE,
00054         GE_BODYINST_FACE_TRISTRIP,
00055         GE_BODYINST_FACE_TRIFAN
00056 } geBodyInst_FaceType;
00057 
00058 
00059 typedef struct geBodyInst_SkinVertex
00060 {
00061         geVec3d SVPoint;
00062         geFloat SVU,SVV;
00063         int     ReferenceBoneIndex;
00064 } geBodyInst_SkinVertex;
00065 
00066 typedef struct geBodyInst_Geometry 
00067 {
00068         geBodyInst_Index                 SkinVertexCount;
00069         geBodyInst_SkinVertex   *SkinVertexArray;
00070 
00071         geBodyInst_Index                 NormalCount;
00072         geVec3d                                 *NormalArray;
00073 
00074         geBodyInst_Index                 FaceCount;
00075         int32                                    FaceListSize;
00076         geBodyInst_Index                *FaceList;
00077 
00078         geVec3d                                  Maxs, Mins;
00079 }       geBodyInst_Geometry;
00080 
00081 /* format for geBodyInst_Geometry.FaceList:
00082         primitive type (GE_BODY_FACE_TRIANGLE,    GE_BODY_FACE_TRISTRIP,  GE_BODY_FACE_TRIFAN )
00083         followed by material index
00084         followed by...
00085         case primitive 
00086                 GE_BODY_FACE_TRIANGLE:
00087                   vertex index 1, normal index 1
00088                   vertex index 2, normal index 2
00089                   vertex index 3, normal index 3
00090                   (next primitive)
00091                 GE_BODY_FACE_TRISTRIP:
00092                   triangle count
00093                   vertex index 1, normal index 1
00094                   vertex index 2, normal index 2
00095                   vertex index 3, normal index 3
00096                   vertex index 4, normal index 4
00097                   ...  # vertices is triangle count+2
00098                   (next primitive)
00099                 GE_BODY_FACE_TRIFAN:
00100                   triangle count
00101                   vertex index 1, normal index 1
00102                   vertex index 2, normal index 2
00103                   vertex index 3, normal index 3
00104                   vertex index 4, normal index 4
00105                   ...  # vertices is triangle count+2
00106                   (next primitive)
00107 */
00108 
00109 
00110 
00111 
00112 geBodyInst *GENESISCC geBodyInst_Create( const geBody *B );
00113 void GENESISCC geBodyInst_Destroy(geBodyInst **BI);
00114 
00115 const geBodyInst_Geometry *GENESISCC geBodyInst_GetGeometry( 
00116                                                                 const geBodyInst *BI,
00117                                                                 const geVec3d *Scale,
00118                                                                 const geXFArray *BoneXformArray,
00119                                                                 int LevelOfDetail,
00120                                                                 const geCamera *Camera);
00121 
00122 
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 #endif
00128                 

Generated on Tue Sep 30 12:35:20 2003 for GTestAndEngine by doxygen 1.3.2