41 #ifndef _GL_TRI_MESH_H
42 #define _GL_TRI_MESH_H
52 #include "gls_index_array.h"
60 class GlsGloFileAttribute;
64 GLS_TRIMESH_FIRST_VALUE = GLS_LAST_INITIALIZER+1,
65 GLS_TRIMESH_USE_DISPLAY_LIST,
84 unsigned char color[4];
96 void DrawSolidMesh(
unsigned int faceOffset,
unsigned int faceCount,
bool textureObject,
bool gouraudShading,
bool perVertexLighting);
97 void DrawOutlineMesh();
103 friend class GLTriMeshEditor;
106 GlsIndexArray _indices;
143 virtual GLS_EXPORT
void SetValue(
int spec,va_list &args);
148 GLS_EXPORT
void AssignPropertiesFromGroup(
DisplayObject *src);
163 GLS_EXPORT
void ReplaceMaterial(
unsigned int oldIndex,
unsigned int newIndex);
173 GLS_EXPORT
void SetFace(
unsigned int face,
int a,
int b,
int c,
int tindex,
unsigned int materialIndex = 0);
179 GLS_EXPORT
void VaSetFaces(
unsigned int numFaces,...);
226 virtual GLS_EXPORT
void Draw(
void);
229 virtual GLS_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector *collisionPoint);
238 virtual GLS_EXPORT
void UseDisplayList(
const bool &flag);
239 virtual GLS_EXPORT
bool UseDisplayList(
void);
251 GLS_EXPORT
void DirtyTextureData(
void);
261 virtual GLS_EXPORT
bool SetupTexture(
const int textureIndex);
267 virtual GLS_EXPORT
void SetFromGloData(GlsGloFileAttribute &data);
272 unsigned int _nFaces;
283 bool _textureChangesDirty;
289 void RecalculateTextureChanges();
299 bool FirstHit(
const Vector &point,
const Vector& directionVector,
Vector *collisionPoint);
308 bool BestHit(
const Vector &point,
const Vector& directionVector,
Vector *collisionPoint);
317 void CopyGeometryInternal(
GLTriMesh* src );
318 void CopyPropertiesInternal(
GLTriMesh* src );
327 unsigned int *_numFaces;
328 bool _compatabilityMode;
332 virtual GLS_EXPORT ~DistiAttributeMeshFaceArray();
334 virtual GLS_EXPORT
bool OkToWrite()
const;
336 virtual GLS_EXPORT std::ostream & WriteValue(std::ostream &);
337 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:83
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:281
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
void ReplaceMaterial(unsigned int oldIndex, unsigned int newIndex)
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
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:156
Definition: gls_display_list.h:51
void SetFace(unsigned int face, int a, int b, int c, int tindex, unsigned int materialIndex=0)
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:93
Definition: disti_metadata.h:179
DynamicArray< int > & MaterialIndices()
void InvalidateGeometry(void)
Definition: gltrimesh.h:243
Definition: gltrimesh.h:81
Structure for holding mesh vertex indices.
Definition: gltrimesh.h:72
GlsDisplayList _displayList
Definition: gltrimesh.h:109
Definition: callback_caller_base.h:56
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:324
void SetVerticesAndFaces(unsigned int nVertices, const GLMeshVertex *vertices, unsigned int nFaces, const GLMeshFace *faces)
Macros and helper code to determine what subset of C++11/14/17 is available.
Definition: disti_metadata.h:83
Definition: bmpimage.h:46
GLMeshFace * Faces(void)
Definition: gltrimesh.h:131
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void DrawGeometry(void)
The disti::GlsDisplayList class.