122 const bool a_duplicateTextureData =
false,
123 const bool a_duplicateMeshData =
false,
124 const bool a_buildCollisionDetector =
false);
135 unsigned int newVertex(
const double a_x = 0.0,
136 const double a_y = 0.0,
137 const double a_z = 0.0);
154 unsigned int newSegment(
const unsigned int a_indexVertex0,
155 const unsigned int a_indexVertex1);
181 const bool a_applyToVertices =
false,
182 const bool a_applyToTextures =
false,
183 const bool a_affectChildren =
false,
184 const bool a_affectComponents =
true);
194 virtual void markForUpdate(
const bool a_affectChildren =
false,
const bool a_affectComponents =
true);
213 void setLineStipple(
const GLint a_stippleFactor,
const GLushort a_stipplePattern);
242 void scaleXYZ(
const double a_scaleX,
const double a_scaleY,
const double a_scaleZ);
246 const bool a_updateCollisionDetector =
true);
272 const bool a_duplicateMaterialData =
false,
273 const bool a_duplicateTextureData =
false,
274 const bool a_duplicateMeshData =
false,
275 const bool a_buildCollisionDetector =
false);
278 virtual void scaleObject(
const double& a_scaleFactor) {
scaleXYZ(a_scaleFactor, a_scaleFactor, a_scaleFactor); }
Implements color properties.
Implements a base class for all objects.
Implements material properties.
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition CGenericObject.h:113
This class implements a collection 3D segments.
Definition CMultiSegment.h:97
GLushort m_stipplePattern
Specifies a 16-bit integer whose bit pattern determine which fragments of a line will be drawn when t...
Definition CMultiSegment.h:297
GLushort getLineStipplePattern()
This method returns the line stipple pattern value.
Definition CMultiSegment.h:219
unsigned int getNumSegments()
This method returns the number of stored segments.
Definition CMultiSegment.cpp:241
double getLineWidth() const
This method returns the line width.
Definition CMultiSegment.h:210
virtual void updateBoundaryBox()
This method updates the boundary box dimensions based on the vertices.
Definition CMultiSegment.cpp:548
GLint getLineStippleFactor()
This method returns the line stipple factor value.
Definition CMultiSegment.h:216
void clear()
This method clears all segments and vertices.
Definition CMultiSegment.cpp:383
void copyMultiSegmentProperties(cMultiSegment *a_obj, const bool a_duplicateMaterialData=false, const bool a_duplicateTextureData=false, const bool a_duplicateMeshData=false, const bool a_buildCollisionDetector=false)
This method copies all properties of this object to another.
Definition CMultiSegment.cpp:154
double m_lineWidth
Line width.
Definition CMultiSegment.h:291
virtual void scaleObject(const double &a_scaleFactor)
This method scales this object by a scale factor.
Definition CMultiSegment.h:278
cSegmentArrayPtr m_segments
Array of triangles.
Definition CMultiSegment.h:310
GLint m_stippleFactor
Specifies a multiplier for each bit in the line stipple pattern.
Definition CMultiSegment.h:294
virtual ~cMultiSegment()
Destructor of cMultiSegment.
Definition CMultiSegment.cpp:104
virtual void render(cRenderOptions &a_options)
This method renders this object graphically using OpenGL.
Definition CMultiSegment.cpp:661
virtual std::string getClassName()
This method returns the name of the object class.
Definition CMultiSegment.h:118
bool m_showSegments
If true, then segments are displayed.
Definition CMultiSegment.h:288
void setLineWidth(const double a_lineWidth)
This method sets the line width of all segments.
Definition CMultiSegment.h:207
void scaleXYZ(const double a_scaleX, const double a_scaleY, const double a_scaleZ)
This method scales this object by using different scale factors along X,Y and Z axes.
Definition CMultiSegment.cpp:403
unsigned int getNumVertices() const
This method returns the number of stored vertices.
Definition CMultiSegment.h:144
virtual void setTransparencyLevel(const float a_level, const bool a_applyToVertices=false, const bool a_applyToTextures=false, const bool a_affectChildren=false, const bool a_affectComponents=true)
This method sets the alpha value at each vertex and in all of my material colors.
Definition CMultiSegment.cpp:469
unsigned int newSegment(const unsigned int a_indexVertex0, const unsigned int a_indexVertex1)
This method creates a new segment by passing two vertex indices.
Definition CMultiSegment.cpp:306
unsigned int newVertex(const double a_x=0.0, const double a_y=0.0, const double a_z=0.0)
This method creates a new vertex and adds it to the vertex list.
Definition CMultiSegment.cpp:258
virtual void markForUpdate(const bool a_affectChildren=false, const bool a_affectComponents=true)
This method invalidates any existing display lists and marks the mesh for update.
Definition CMultiSegment.cpp:447
virtual void createBruteForceCollisionDetector()
This method builds a brute force collision detector for this mesh.
Definition CMultiSegment.cpp:614
virtual void updateGlobalPositions(const bool a_frameOnly)
This method updates the global position of each vertex.
Definition CMultiSegment.cpp:424
bool removeSegment(const unsigned int a_index)
This method removes a selected segment.
Definition CMultiSegment.cpp:366
virtual cMultiSegment * copy(const bool a_duplicateMaterialData=false, const bool a_duplicateTextureData=false, const bool a_duplicateMeshData=false, const bool a_buildCollisionDetector=false)
This method creates a copy of itself.
Definition CMultiSegment.cpp:123
void setLineStipple(const GLint a_stippleFactor, const GLushort a_stipplePattern)
This method specifies the line stipple pattern.
cMultiSegment()
Constructor of cMultiSegment.
Definition CMultiSegment.cpp:70
virtual void createAABBCollisionDetector(const double a_radius)
This method builds an AABB collision detector for this mesh.
Definition CMultiSegment.cpp:636
virtual void renderSegments(cRenderOptions &a_options)
This method rendres all segments.
Definition CMultiSegment.cpp:694
virtual void offsetVertices(const cVector3d &a_offset, const bool a_updateCollisionDetector=true)
This method shifts all vertex positions by the specified amount.
Definition CMultiSegment.cpp:519
void setLineColor(const cColorf &a_color)
This method sets the color of all segments.
Definition CMultiSegment.cpp:499
virtual cVector3d getCenterOfMass()
This method computes the center of mass of this object, based on vertex positions.
Definition CMultiSegment.cpp:215
cVertexArrayPtr m_vertices
Array of vertices.
Definition CMultiSegment.h:307
Definition CAudioBuffer.cpp:57
std::shared_ptr< cSegmentArray > cSegmentArrayPtr
Definition CSegmentArray.h:66
std::shared_ptr< cVertexArray > cVertexArrayPtr
Definition CVertexArray.h:108
This class defines a color using a GLfloat representation for each component.
Definition CColor.h:139
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition CRenderOptions.h:83
This class implements a 3D vector.
Definition CVector3d.h:89