119 const bool a_duplicateTextureData =
false,
120 const bool a_duplicateMeshData =
false,
121 const bool a_buildCollisionDetector =
false);
131 unsigned int newVertex(
const double a_x = 0.0,
132 const double a_y = 0.0,
133 const double a_z = 0.0);
150 unsigned int newPoint(
const unsigned int a_indexVertex0);
174 const bool a_applyToVertices =
false,
175 const bool a_applyToTextures =
false,
176 const bool a_affectChildren =
false);
186 virtual void markForUpdate(
const bool a_affectChildren =
false);
228 virtual bool saveToFile(std::string a_filename);
238 void scaleXYZ(
const double a_scaleX,
const double a_scaleY,
const double a_scaleZ);
242 const bool a_updateCollisionDetector =
true);
268 const bool a_duplicateMaterialData =
false,
269 const bool a_duplicateTextureData =
false,
270 const bool a_duplicateMeshData =
false,
271 const bool a_buildCollisionDetector =
false);
274 virtual void scaleObject(
const double& a_scaleFactor) {
scaleXYZ(a_scaleFactor, a_scaleFactor, a_scaleFactor); }
This class implements a 3D vector.
Definition: CVector3d.h:88
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition: CRenderOptions.h:82
std::shared_ptr< cPointArray > cPointArrayPtr
Definition: CPointArray.h:71
This class implements 3D point cloud object.
Definition: CMultiPoint.h:96
virtual void render(cRenderOptions &a_options)
This method renders this object graphically using OpenGL.
Definition: CMultiPoint.cpp:737
virtual void createBruteForceCollisionDetector()
This method builds a brute force collision detector for this mesh.
Definition: CMultiPoint.cpp:588
double m_pointSize
Display size of point.
Definition: CMultiPoint.h:287
virtual bool saveToFile(std::string a_filename)
This method saves a 3D point cloud to a file.
Definition: CMultiPoint.cpp:694
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: CMultiPoint.cpp:255
void clear()
This method clears all points and vertices.
Definition: CMultiPoint.cpp:369
void scaleXYZ(const double a_scaleX, const double a_scaleY, const double a_scaleZ)
This method scales this point cloud by using different scale factors along X, Y and Z axes...
Definition: CMultiPoint.cpp:389
virtual bool loadFromFile(std::string a_filename)
This method loads a 3D point cloud from a file.
Definition: CMultiPoint.cpp:637
virtual void markForUpdate(const bool a_affectChildren=false)
This method invalidates any existing display lists and marks the mesh for update. ...
Definition: CMultiPoint.cpp:432
virtual void renderPoints(cRenderOptions &a_options)
This method renders all points.
Definition: CMultiPoint.cpp:770
double getPointSize() const
This method returns the point size.
Definition: CMultiPoint.h:202
virtual ~cMultiPoint()
Destructor of cMultiPoint.
Definition: CMultiPoint.cpp:101
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition: CGenericObject.h:112
unsigned int newPoint(const unsigned int a_indexVertex0)
This method creates a new point by passing a vertex index.
Definition: CMultiPoint.cpp:302
virtual void updateBoundaryBox()
This method updates the boundary box dimensions based on the vertices.
Definition: CMultiPoint.cpp:531
unsigned int getNumPoints()
This method returns the number of stored points.
Definition: CMultiPoint.cpp:238
Implements a base class for all objects.
virtual void offsetVertices(const cVector3d &a_offset, const bool a_updateCollisionDetector=true)
This method shifts all vertex positions by the specified amount.
Definition: CMultiPoint.cpp:502
void copyMultiPointProperties(cMultiPoint *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 point cloud to another.
Definition: CMultiPoint.cpp:151
virtual void createAABBCollisionDetector(const double a_radius)
This method builds an AABB collision detector for this mesh.
Definition: CMultiPoint.cpp:609
virtual cVector3d getCenterOfMass()
This method computes the center of mass of this point cloud, based on vertex positions.
Definition: CMultiPoint.cpp:212
virtual cMultiPoint * 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: CMultiPoint.cpp:120
std::shared_ptr< cVertexArray > cVertexArrayPtr
Definition: CVertexArray.h:107
This class defines a color using a GLfloat representation for each component.
Definition: CColor.h:138
Implements color properties.
virtual void setTransparencyLevel(const float a_level, const bool a_applyToVertices=false, const bool a_applyToTextures=false, const bool a_affectChildren=false)
This method sets the alpha value at each vertex and in all of my material colors. ...
Definition: CMultiPoint.cpp:453
cPointArrayPtr m_points
Array of points.
Definition: CMultiPoint.h:300
void setPointSize(const double a_pointSize)
This method sets the point size that is used to graphically render the points.
Definition: CMultiPoint.h:199
Implements material properties.
cVertexArrayPtr m_vertices
Array of vertices.
Definition: CMultiPoint.h:297
Definition: CAudioBuffer.cpp:56
virtual void scaleObject(const double &a_scaleFactor)
This method scales this object by a scale factor.
Definition: CMultiPoint.h:274
bool m_showPoints
If true, then segments are displayed.
Definition: CMultiPoint.h:284
unsigned int getNumVertices() const
This method returns the number of stored vertices.
Definition: CMultiPoint.h:140
void setPointColor(const cColorf &a_color)
This method sets a color for all points.
Definition: CMultiPoint.cpp:482
cMultiPoint()
Constructor of cMultiPoint.
Definition: CMultiPoint.cpp:71
bool removePoint(const unsigned int a_index)
This method removed a selected point.
Definition: CMultiPoint.cpp:352
virtual void updateGlobalPositions(const bool a_frameOnly)
This method updates the global position of each vertex.
Definition: CMultiPoint.cpp:410