Description
A basic triangle mesh: just a list of triangles (no edge connectivity info).
#include <ChTriangleMeshSoup.h>


Public Member Functions | |
ChTriangleMeshSoup (const ChTriangleMeshSoup &source) | |
virtual ChTriangleMeshSoup * | Clone () const override |
"Virtual" copy constructor (covariant return type). | |
bool | LoadWavefrontMesh (std::string filename) |
Load from the given Wavefront .obj file. | |
virtual void | AddTriangle (const ChVector3d &vertex0, const ChVector3d &vertex1, const ChVector3d &vertex2) override |
Access the n-th triangle in mesh /virtual ChTriangle& Triangle(int index) { return m_triangles[index]; }. | |
virtual void | AddTriangle (const ChTriangle &atriangle) override |
Add a triangle to this triangle mesh, by specifying a ChTriangle. | |
virtual unsigned int | GetNumTriangles () const override |
Get the number of triangles already added to this mesh. | |
virtual ChTriangle | GetTriangle (unsigned int index) const override |
Access the n-th triangle in mesh. | |
std::vector< ChTriangle > & | GetTriangles () |
Get the list of triangles. | |
virtual void | Clear () override |
Clear all data. | |
virtual void | Transform (const ChVector3d displ, const ChMatrix33<> rotscale) override |
Transform all vertexes, by displacing and rotating (rotation via matrix, so also scaling if needed) | |
virtual Type | GetType () const override |
Get the class type as an enum. | |
virtual void | ArchiveOut (ChArchiveOut &archive_out) override |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIn (ChArchiveIn &archive_in) override |
Method to allow de-serialization of transient data from archives. | |
![]() | |
virtual void | Transform (const ChVector3d displ, const ChQuaternion<> mquat=ChQuaternion<>(1, 0, 0, 0)) |
Transform all vertexes, by displacing and rotating (rotation via matrix, so also scaling if needed) | |
virtual ChAABB | GetBoundingBox () const override |
Compute bounding box of this triangle mesh. | |
virtual int | GetManifoldDimension () const override |
This is a surface. | |
![]() | |
ChGeometry (const ChGeometry &other) | |
void | InflateBoundingBox (ChAABB &bbox) const |
Enlarge the given existing bounding box with the bounding box of this object. | |
virtual double | GetBoundingSphereRadius () const |
Returns the radius of a bounding sphere for this geometry. | |
virtual ChVector3d | Baricenter () const |
Compute center of mass. | |
virtual void | Update () |
Generic update of internal data. | |
Static Public Member Functions | |
static std::shared_ptr< ChTriangleMeshSoup > | CreateFromWavefrontFile (const std::string &filename) |
Create and return a ChTriangleMeshConnected from a Wavefront OBJ file. | |
Additional Inherited Members | |
![]() | |
enum class | Type { NONE , SPHERE , ELLIPSOID , BOX , CYLINDER , TRIANGLE , CAPSULE , CONE , LINE , LINE_ARC , LINE_BEZIER , LINE_CAM , LINE_PATH , LINE_POLY , LINE_SEGMENT , ROUNDED_BOX , ROUNDED_CYLINDER , TRIANGLEMESH , TRIANGLEMESH_CONNECTED , TRIANGLEMESH_SOUP } |
Enumeration of geometric object types. | |
Member Function Documentation
◆ AddTriangle() [1/2]
|
inlineoverridevirtual |
Add a triangle to this triangle mesh, by specifying a ChTriangle.
Implements chrono::ChTriangleMesh.
◆ AddTriangle() [2/2]
|
overridevirtual |
Access the n-th triangle in mesh /virtual ChTriangle& Triangle(int index) { return m_triangles[index]; }.
Add a triangle to this triangle mesh, by specifying the three coordinates
Implements chrono::ChTriangleMesh.
◆ ArchiveIn()
|
overridevirtual |
Method to allow de-serialization of transient data from archives.
Reimplemented from chrono::ChTriangleMesh.
◆ ArchiveOut()
|
overridevirtual |
Method to allow serialization of transient data to archives.
Reimplemented from chrono::ChTriangleMesh.
◆ Clear()
|
inlineoverridevirtual |
Clear all data.
Implements chrono::ChTriangleMesh.
◆ Clone()
|
inlineoverridevirtual |
"Virtual" copy constructor (covariant return type).
Implements chrono::ChGeometry.
◆ CreateFromWavefrontFile()
|
static |
Create and return a ChTriangleMeshConnected from a Wavefront OBJ file.
If an error occurrs during loading, an empty shared pointer is returned.
◆ GetNumTriangles()
|
inlineoverridevirtual |
Get the number of triangles already added to this mesh.
Implements chrono::ChTriangleMesh.
◆ GetTriangle()
|
inlineoverridevirtual |
Access the n-th triangle in mesh.
Implements chrono::ChTriangleMesh.
◆ GetType()
|
inlineoverridevirtual |
Get the class type as an enum.
Reimplemented from chrono::ChTriangleMesh.
◆ Transform()
|
overridevirtual |
Transform all vertexes, by displacing and rotating (rotation via matrix, so also scaling if needed)
Implements chrono::ChTriangleMesh.
The documentation for this class was generated from the following files:
- C:/M/B/src/chrono-9.0.1/src/chrono/geometry/ChTriangleMeshSoup.h
- C:/M/B/src/chrono-9.0.1/src/chrono/geometry/ChTriangleMeshSoup.cpp