chrono::geometry::ChTriangleMeshSoup Class Reference
Description
A basic triangle mesh: just a list of triangles (no edge connectivity info).
#include <ChTriangleMeshSoup.h>
Inheritance diagram for chrono::geometry::ChTriangleMeshSoup:
Collaboration diagram for chrono::geometry::ChTriangleMeshSoup:
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 ChVector<> &vertex0, const ChVector<> &vertex1, const ChVector<> &vertex2) override |
Access the n-th triangle in mesh /virtual ChTriangle& Triangle(int index) { return m_triangles[index]; }. More... | |
virtual void | addTriangle (const ChTriangle &atriangle) override |
Add a triangle to this triangle mesh, by specifying a ChTriangle. | |
virtual int | getNumTriangles () const override |
Get the number of triangles already added to this mesh. | |
virtual ChTriangle | getTriangle (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 ChVector<> displ, const ChMatrix33<> rotscale) override |
Transform all vertexes, by displacing and rotating (rotation via matrix, so also scaling if needed) | |
virtual Type | GetClassType () const override |
Get the class type as an enum. | |
virtual void | ArchiveOut (ChArchiveOut &marchive) override |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIn (ChArchiveIn &marchive) override |
Method to allow de-serialization of transient data from archives. | |
Public Member Functions inherited from chrono::geometry::ChTriangleMesh | |
virtual void | Transform (const ChVector<> 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. | |
Public Member Functions inherited from chrono::geometry::ChGeometry | |
ChGeometry (const ChGeometry &source) | |
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. More... | |
virtual ChVector | 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. More... | |
Additional Inherited Members | |
Public Types inherited from chrono::geometry::ChGeometry | |
enum | 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()
|
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::geometry::ChTriangleMesh.
◆ CreateFromWavefrontFile()
|
static |
Create and return a ChTriangleMeshConnected from a Wavefront OBJ file.
If an error occurrs during loading, an empty shared pointer is returned.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/geometry/ChTriangleMeshSoup.h
- /builds/uwsbel/chrono/src/chrono/geometry/ChTriangleMeshSoup.cpp