45 #ifndef CGenericArrayH 46 #define CGenericArrayH 56 class cCollisionRecorder;
57 struct cCollisionSettings;
135 static cGenericArrayPtr
create(
cVertexArrayPtr a_vertexArray) {
return (std::make_shared<cGenericArray>(a_vertexArray)); }
181 const unsigned int a_vertexNumber)
const This class implements a 3D vector.
Definition: CVector3d.h:88
bool getAllocated(const unsigned int a_index) const
Definition: CGenericArray.h:161
Implements an array of 3D vertices.
std::vector< unsigned int > m_indices
Element indices to vertices.
Definition: CGenericArray.h:230
Implements general geometry utility functions.
std::vector< bool > m_allocated
Element allocation flags.
Definition: CGenericArray.h:233
cGenericArray(cVertexArrayPtr a_vertexArray)
Definition: CGenericArray.h:105
std::list< unsigned int > m_freeElements
List of free elements.
Definition: CGenericArray.h:259
virtual void render()
This method render the OpenGL vertex buffer object.
Definition: CGenericArray.h:207
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition: CGenericObject.h:112
cVector3d getTexCoordAtPosition(const unsigned int a_elementIndex, const cVector3d &a_localPos)
Definition: CGenericArray.h:198
This class implements a collision detection recorder that stores all collision events that are report...
Definition: CCollisionBasics.h:185
virtual unsigned int getVertexIndex(const unsigned int a_elementIndex, const unsigned int a_vertexNumber) const
Definition: CGenericArray.h:180
bool m_flagMarkForUpdate
If true then element data has been modified.
Definition: CGenericArray.h:236
This structure stores the collision settings that are passed to a collision detector when querying fo...
Definition: CCollisionBasics.h:242
static cGenericArrayPtr create(cVertexArrayPtr a_vertexArray)
Shared cGenericArray allocator.
Definition: CGenericArray.h:135
virtual unsigned int getNumElements()
This method returns the number of allocated elements.
Definition: CGenericArray.h:145
GLuint m_elementBuffer
OpenGL Buffer for storing elements.
Definition: CGenericArray.h:249
~cGenericArray()
Definition: CGenericArray.h:120
std::shared_ptr< cVertexArray > cVertexArrayPtr
Definition: CVertexArray.h:107
virtual unsigned int getNumVerticesPerElement()
This method returns the number of vertices per element.
Definition: CGenericArray.h:148
virtual bool computeCollision(const unsigned int a_elementIndex, cGenericObject *a_object, cVector3d &a_segmentPointA, cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings) const
This method checks if the given line segment intersects a selected element from this array...
Definition: CGenericArray.h:212
Definition: CAudioBuffer.cpp:56
This class implements an abstract class for describing geometrical elements composed of vertices...
Definition: CGenericArray.h:90
void compress()
This method removes non used elements. This compresses the array.
std::shared_ptr< cGenericArray > cGenericArrayPtr
Definition: CGenericArray.h:70
bool m_flagMarkForResize
If true then element array size has changed.
Definition: CGenericArray.h:239
virtual void clear()
This method clear all elements of array.
Definition: CGenericArray.h:124
cVertexArrayPtr m_vertices
Vertex array that contains all vertices used to describe the elements of this array.
Definition: CGenericArray.h:227