The SGADE Documentation

the SGADE The Socrates Gameboy Advance Development Engine

The SGADE is a development library for the Nintendo Gameboy Advance. It's free for all uses and is distributed without guarantees. For more information visit the SGADE page.


Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

SoMesh.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00013 // ----------------------------------------------------------------------------
00014 
00015 #ifndef SO_MESH_H
00016 #define SO_MESH_H
00017 
00018 #ifdef __cplusplus
00019     extern "C" {
00020 #endif
00021 
00022 
00023 // ---------------------------------------------------------------------------- //! @{
00032 // ----------------------------------------------------------------------------
00033 
00034 // ----------------------------------------------------------------------------
00035 // Includes
00036 // ----------------------------------------------------------------------------
00037 
00038 #include "SoImage.h"
00039 #include "SoPolygon.h"
00040 #include "SoTransform.h"
00041 
00042 // ----------------------------------------------------------------------------
00043 // Constants
00044 // ----------------------------------------------------------------------------
00045 
00056 #define SO_MESH_MAX_NUM_VERTICES 512
00057 
00058 // ----------------------------------------------------------------------------
00059 // Typedefs
00060 // ----------------------------------------------------------------------------
00061 
00072 typedef struct 
00073 {
00074     // Private Attributes;
00075     u32          m_NumVertices; 
00076     SoPolygon*   m_Polygons;    
00077     u32          m_NumPolygons; 
00078     SoImage*     m_Texture;     
00079     SoTransform  m_Transform;   
00080 
00092     SoVector3*      m_Vertices;         
00093 
00094 
00095 } SoMesh;
00096 
00097 // ----------------------------------------------------------------------------
00098 // Public methods
00099 // ----------------------------------------------------------------------------
00100 
00101 void         SoMeshSetTexture(      SoMesh* a_This, SoImage* a_Texture );
00102 
00103 SoImage*     SoMeshGetTexture(      SoMesh* a_This );
00104 u32          SoMeshGetNumVertices(  SoMesh* a_This );
00105 u32          SoMeshGetNumPolygons(  SoMesh* a_This );
00106 SoVector3*   SoMeshGetVertex(       SoMesh* a_This, u32 a_Index );
00107 SoPolygon*   SoMeshGetPolygon(      SoMesh* a_This, u32 a_Index );
00108 
00109 SoTransform* SoMeshGetTransform(    SoMesh* a_This );
00110 
00111 void         SoMeshMakeDefaultCube( SoMesh* a_This );
00112 
00113 // ----------------------------------------------------------------------------
00114 // EOF
00115 // ----------------------------------------------------------------------------
00116 
00118 
00119 #ifdef __cplusplus
00120 } // extern "C"
00121 #endif
00122 
00123 #endif

Copyright 2002 by the SGADE authors. See SoLicense.h or Visit the SGADE page for more information.