41 #ifndef _GL_TRI_MESH_H
42 #define _GL_TRI_MESH_H
59 class GlsGloFileAttribute;
64 GLS_TRIMESH_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
65 GLS_TRIMESH_USE_DISPLAY_LIST,
84 unsigned char color[ 4 ];
95 void DrawSolidMesh(
unsigned int faceOffset,
unsigned int faceCount,
bool textureObject,
bool gouraudShading,
bool perVertexLighting );
96 void DrawOutlineMesh();
101 friend class GLTriMeshEditor;
141 virtual GLS_EXPORT
void SetValue(
int spec, va_list& args );
146 GLS_EXPORT
void AssignPropertiesFromGroup(
DisplayObject* src );
161 GLS_EXPORT
void ReplaceMaterial(
unsigned int oldIndex,
unsigned int newIndex );
171 GLS_EXPORT
void SetFace(
unsigned int face,
int a,
int b,
int c,
int tindex,
unsigned int materialIndex = 0 );
177 GLS_EXPORT
void VaSetFaces(
unsigned int numFaces, ... );
224 virtual GLS_EXPORT
void Draw(
void );
227 virtual GLS_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
236 virtual GLS_EXPORT
void UseDisplayList(
const bool& flag );
237 virtual GLS_EXPORT
bool UseDisplayList(
void );
249 GLS_EXPORT
void DirtyTextureData(
void );
258 virtual GLS_EXPORT
bool SetupTexture(
const int textureIndex );
268 unsigned int _nFaces;
279 bool _textureChangesDirty;
285 void RecalculateTextureChanges();
295 bool FirstHit(
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
304 bool BestHit(
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
313 void CopyGeometryInternal(
GLTriMesh* src );
314 void CopyPropertiesInternal(
GLTriMesh* src );
322 unsigned int* _numFaces;
328 virtual GLS_EXPORT ~DistiAttributeMeshFaceArray();
330 virtual GLS_EXPORT
bool OkToWrite()
const;
332 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& );
333 virtual GLS_EXPORT std::istream& ReadValue( std::istream& );
virtual void SetAvailableAttributes(unsigned int value)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
virtual void CopyProperties(DisplayObject *src)
void Invalidate(void)
Definition: gls_display_list.h:82
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:276
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
void ReplaceMaterial(unsigned int oldIndex, unsigned int newIndex)
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
The disti::GLPolygon class. Implements Polygons.
int texture
Definition: gltrimesh.h:75
void SetFaces(unsigned int nFaces, GLMeshFace *faces)
virtual void CopyGeometry(DisplayObject *src)
unsigned int NumberOfFaces(void)
Definition: gltrimesh.h:154
Definition: gls_display_list.h:50
void SetFace(unsigned int face, int a, int b, int c, int tindex, unsigned int materialIndex=0)
Definition: gls_glo_file.h:982
The disti::DisplayObject class and global enumerations.
void VaSetFaces(unsigned int numFaces,...)
unsigned int material
Definition: gltrimesh.h:76
The glTriMesh class. Implements Triangle Meshes.
Definition: gltrimesh.h:92
Definition: disti_metadata.h:180
DynamicArray< int > & MaterialIndices()
void InvalidateGeometry(void)
Definition: gltrimesh.h:241
Definition: gltrimesh.h:81
Structure for holding mesh vertex indices.
Definition: gltrimesh.h:72
GlsDisplayList _displayList
Definition: gltrimesh.h:107
Definition: callback_caller_base.h:55
virtual void SetValue(int spec, va_list &args)
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
Definition: gltrimesh.h:319
void SetVerticesAndFaces(unsigned int nVertices, const GLMeshVertex *vertices, unsigned int nFaces, const GLMeshFace *faces)
Definition: gls_index_array.h:52
Macros and helper code to determine what subset of C++11/14/17 is available.
The disti::GlsIndexArray class, for managing index buffers.
Definition: disti_metadata.h:79
Definition: bmpimage.h:46
GLMeshFace * Faces(void)
Definition: gltrimesh.h:129
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void DrawGeometry(void)
The disti::GlsDisplayList class.