#include <TriangleMesh.h>
Inheritance diagram for Physsim::TriangleMesh:

Public Member Functions | |
| TriangleMesh (TriangleArrayConstPtr trimesh, bool center=true) | |
| Constructs this object from the given mesh and optionally centers it. | |
| TriangleMesh (TriangleArrayConstPtr trimesh, const Matrix4 &T, bool center=true) | |
| Constructs this triangle mesh using a mesh and the given transform. | |
| TriangleMesh (const std::string &filename, bool center=true) | |
| Creates the triangle mesh from a geometry file and optionally centers it. | |
| TriangleMesh (const std::string &filename, const Matrix4 &T, bool center=true) | |
| Creates the triangle mesh from a geometry file and optionally centers it. | |
| virtual void | load_from_xml (XMLTreeConstPtr node, std::map< std::string, BasePtr > &id_map) |
| Implements Base::load_from_xml(). | |
| virtual void | save_to_xml (XMLTreePtr node, std::list< BaseConstPtr > &shared_objects) const |
| Implements Base::save_to_xml(). | |
Static Public Member Functions | |
| static void | write_to_obj (const std::string &filename, const std::vector< TriangleConstPtr > &mesh) |
| Writes a triangle array to a Wavefront OBJ file. | |
| static TriangleArrayConstPtr | read_from_obj (const std::string &filename) |
| Reads a triangle array from a Wavefront OBJ file. | |
| static void | transform_mesh (const std::vector< TrianglePtr > &mesh, const Matrix4 &T) |
| Applies a given transform to all triangles in a mesh. | |
| static void | subdivide (std::vector< TrianglePtr > &mesh, Real max_tri_area) |
| Subdivides a triangle mesh using Steiner points until no triangle is bigger than the specified area. | |
| static TriangleArrayPtr | clone_mesh (const std::vector< TriangleConstPtr > &mesh) |
| Clones a triangle mesh. | |
| template<class ForwardIterator> | |
| static void | get_unique_vertices (ForwardIterator first, ForwardIterator last, std::list< Vector3ConstPtr > &result) |
| Gets the set of (unique) vertices from a triangle mesh. | |
| template<class ForwardIterator> | |
| static Real | calc_signed_distance (ForwardIterator first, ForwardIterator last, const Vector3 &point, TriangleConstPtr &closest_tri) |
| Computes the signed distance from the triangle mesh to a point. | |
| template<class ForwardIterator> | |
| static Real | calc_signed_distance (ForwardIterator first, ForwardIterator last, const Vector3 &point) |
| Computes the signed distance from the triangle mesh to a point. | |
| void TriangleMesh::load_from_xml | ( | XMLTreeConstPtr | node, | |
| std::map< std::string, BasePtr > & | id_map | |||
| ) | [virtual] |
Implements Base::load_from_xml().
Reimplemented from Physsim::Primitive.
| void TriangleMesh::subdivide | ( | std::vector< TrianglePtr > & | mesh, | |
| Real | max_tri_area | |||
| ) | [static] |
Subdivides a triangle mesh using Steiner points until no triangle is bigger than the specified area.
| TriangleArrayPtr TriangleMesh::clone_mesh | ( | const std::vector< TriangleConstPtr > & | mesh | ) | [static] |
Clones a triangle mesh.
| void Physsim::TriangleMesh::get_unique_vertices | ( | ForwardIterator | first, | |
| ForwardIterator | last, | |||
| std::list< Vector3ConstPtr > & | result | |||
| ) | [static] |
Gets the set of (unique) vertices from a triangle mesh.
| Real Physsim::TriangleMesh::calc_signed_distance | ( | ForwardIterator | first, | |
| ForwardIterator | last, | |||
| const Vector3 & | point, | |||
| TriangleConstPtr & | closest_tri | |||
| ) | [static] |
Computes the signed distance from the triangle mesh to a point.
signed distance for points *just* outside the mesh (i.e., numerically close to one of the faces) will be somewhat inaccurate
| Real Physsim::TriangleMesh::calc_signed_distance | ( | ForwardIterator | first, | |
| ForwardIterator | last, | |||
| const Vector3 & | point | |||
| ) | [static] |
Computes the signed distance from the triangle mesh to a point.
1.5.1