39#ifndef DISTI_INCLUDED_GLTRIMESH_H
40#define DISTI_INCLUDED_GLTRIMESH_H
57class GlsGloFileAttribute;
62 GLS_TRIMESH_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
63 GLS_TRIMESH_USE_DISPLAY_LIST,
84 unsigned char color[ 4 ];
102 void DrawSolidMesh(
unsigned int faceOffset,
unsigned int faceCount,
bool textureObject,
bool gouraudShading,
bool perVertexLighting );
109 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
112 friend class GLTriMeshEditor;
180 GLS_EXPORT void SetFace(
unsigned int face,
int a,
int b,
int c,
int tindex,
unsigned int materialIndex = 0 );
276 unsigned int _nFaces;
287 bool _textureChangesDirty;
293 void RecalculateTextureChanges();
303 bool FirstHit(
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
312 bool BestHit(
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
321 void CopyGeometryInternal(
GLTriMesh* src );
322 void CopyPropertiesInternal(
GLTriMesh* src );
330 unsigned int* _numFaces;
Definition: disti_metadata.h:87
Definition: callback_caller_base.h:55
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
Definition: disti_metadata.h:220
Definition: gltrimesh.h:328
bool OkToWrite() const override
std::string Type() const override
std::ostream & WriteValue(std::ostream &) override
DistiAttributeMeshFaceArray(CallbackMethodCallerBase *callback, const AttributeName &name, GLMeshFace **attribPtr, unsigned int *numFaces, bool inRuntimeMode)
std::istream & ReadValue(std::istream &) override
Definition: dynamic_array.h:79
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
The glTriMesh class. Implements Triangle Meshes.
Definition: gltrimesh.h:93
void SetAvailableAttributes(unsigned int value) override
bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) override
virtual void DrawGeometry()
void VaSetFaces(unsigned int numFaces,...)
void CopyProperties(DisplayObject *src) override
virtual bool UseDisplayList()
void SetFaces(unsigned int nFaces, GLMeshFace *faces)
virtual bool SetupTexture(const int textureIndex)
void CopyGeometry(DisplayObject *src) override
int TextureIndex() override
void SetValue(int spec, va_list &args) override
void SetVerticesAndFaces(unsigned int nVertices, const GLMeshVertex *vertices, unsigned int nFaces, const GLMeshFace *faces)
DynamicArray< int > & MaterialIndices() override
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) override
void MaterialIndex(unsigned int index)
Definition: gltrimesh.h:135
GLTriMesh(unsigned int nVertices, Vertex *vertices, Vertex &location)
void AssignPropertiesFromGroup(DisplayObject *src)
static DisplayObject * CreateInstance()
GlsDisplayList _displayList
Definition: gltrimesh.h:118
unsigned int NumberOfFaces()
Definition: gltrimesh.h:163
DisplayObject * CloneObject(bool generateNames=false) override
GLTriMesh(unsigned int nVertices, Vertex *vertices)
void GetCppInterfaceDescriptionFree(InterfaceListType *array) override
virtual void UseDisplayList(const bool &flag)
void MaterialIndex(int index) override
GLMeshFace * Faces()
Definition: gltrimesh.h:145
int MaterialIndex() override
void DrawSolidMesh(unsigned int faceOffset, unsigned int faceCount, bool textureObject, bool gouraudShading, bool perVertexLighting)
GLTriMesh(const GLTriMesh &that, const bool generateNames)
void InvalidateGeometry()
Definition: gltrimesh.h:250
void SetFace(unsigned int face, int a, int b, int c, int tindex, unsigned int materialIndex=0)
void ReplaceMaterial(unsigned int oldIndex, unsigned int newIndex)
Definition: gls_display_list.h:51
void Invalidate()
Definition: gls_display_list.h:85
Definition: gls_glo_file.h:1241
Definition: gls_index_array.h:50
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:540
The disti::DisplayObject class and global enumerations.
The disti::DynamicArray class. A templated array of objects capable of dynamically growing.
The disti::GLPolygon class. Implements Polygons.
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:245
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:487
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
The disti::GlsDisplayList class.
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:50
The disti::GlsIndexArray class, for managing index buffers.
Definition: bmpimage.h:46
Structure for holding mesh vertex indices.
Definition: gltrimesh.h:71
int b
Vertex indices of the face.
Definition: gltrimesh.h:73
int c
Vertex indices of the face.
Definition: gltrimesh.h:74
int texture
Texture index of face.
Definition: gltrimesh.h:75
int a
Vertex indices of the face.
Definition: gltrimesh.h:72
unsigned int material
Material index of face.
Definition: gltrimesh.h:76
Definition: gltrimesh.h:82