|
AGX Dynamics 2.41.1.2
|
Functions for generating Convex shapes from meshes, and for serializing them. More...
Functions | |
| AGXPHYSICS_EXPORT agxCollide::Convex * | createConvex (const agx::String &filename, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3()) |
| Creates a convex shape from a trimesh file. | |
| AGXPHYSICS_EXPORT agxCollide::Convex * | createConvex (const agx::Vec3Vector &vertices, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3()) |
| Creates a convex shape from vertices only, building their convex hull. | |
| AGXPHYSICS_EXPORT bool | createConvexDecomposition (const agx::String &filename, agxCollide::ConvexRefVector &results, size_t elementResolutionPerAxis=50, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3()) |
Creates a set of convex shapes that approximates the triangle mesh defined by filename using V-HACD which uses a volumetric algorithm. | |
| AGXPHYSICS_EXPORT bool | createConvexDecomposition (const agx::Vec3Vector &vertices, const agx::UInt32Vector &indices, agxCollide::ConvexRefVector &results, size_t elementResolutionPerAxis=50, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3()) |
Creates a set of convex shapes that approximates the triangle mesh defined by filename using V-HACD which uses a volumetric algorithm. | |
| AGXPHYSICS_EXPORT agxCollide::Convex * | createFromConvex (const agx::String &filename, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3()) |
| Creates a convex from a supported mesh-file (see agxIO::MeshReader::FileType) which is known to be convex. | |
| AGXPHYSICS_EXPORT agxCollide::Convex * | createFromConvex (const agx::Vec3Vector &vertices, const agx::UInt32Vector &indices, const agx::String &sourceName="convexFromReaderWriter", const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3()) |
| Creates a convex from vertices which are known to be convex. | |
| AGXPHYSICS_EXPORT bool | createVHACDConvexDecomposition (const agx::String &filename, agxCollide::ConvexRefVector &results, size_t elementResolutionPerAxis=50, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3()) |
Creates a set of convex shapes that approximates the triangle mesh defined by filename using V-HACD which uses a volumetric algorithm. | |
| AGXPHYSICS_EXPORT bool | createVHACDConvexDecomposition (const agx::Vec3Vector &vertices, const agx::UInt32Vector &indices, agxCollide::ConvexRefVector &results, size_t elementResolutionPerAxis=50, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3()) |
Creates a set of convex shapes that approximates the triangle mesh defined by vertices and indices using V-HACD which uses a volumetric algorithm. | |
| AGXPHYSICS_EXPORT bool | exportConvex (const agxCollide::Convex &convex, const agx::String &filename) |
| Exports convex vertex and index data to a wavefront obj file on a storage device. | |
Functions for generating Convex shapes from meshes, and for serializing them.
| AGXPHYSICS_EXPORT agxCollide::Convex * agxUtil::ConvexReaderWriter::createConvex | ( | const agx::String & | filename, |
| const agx::Matrix3x3 & | transformation = agx::Matrix3x3(), |
||
| const agx::Vec3 & | translation = agx::Vec3() |
||
| ) |
Creates a convex shape from a trimesh file.
The mesh in the file can be concave, the create convex will encapsulate the whole triangle mesh into the hull.
| filename | - The Mesh filename |
| transformation | Scaling and rotation of each vertex. |
| translation | Translation of each vertex (executed after transformation). |
| AGXPHYSICS_EXPORT agxCollide::Convex * agxUtil::ConvexReaderWriter::createConvex | ( | const agx::Vec3Vector & | vertices, |
| const agx::Matrix3x3 & | transformation = agx::Matrix3x3(), |
||
| const agx::Vec3 & | translation = agx::Vec3() |
||
| ) |
Creates a convex shape from vertices only, building their convex hull.
Vertices lying within the convex hull will be ignored.
| vertices | The vertices. |
| transformation | Scaling and rotation of each vertex. |
| translation | Translation of each vertex (executed after transformation). |
| AGXPHYSICS_EXPORT bool agxUtil::ConvexReaderWriter::createConvexDecomposition | ( | const agx::String & | filename, |
| agxCollide::ConvexRefVector & | results, | ||
| size_t | elementResolutionPerAxis = 50, |
||
| const agx::Matrix3x3 & | transformation = agx::Matrix3x3(), |
||
| const agx::Vec3 & | translation = agx::Vec3() |
||
| ) |
Creates a set of convex shapes that approximates the triangle mesh defined by filename using V-HACD which uses a volumetric algorithm.
The computation time can be high, if a large voxel resolution is used.
| filename | Name of mesh file. |
| results | The result vector. |
| elementResolutionPerAxis | Resolution parameter. Range 20-400. Larger values take more time. |
| transformation | Scaling and rotation of each vertex. |
| translation | Translation of each vertex (executed after transformation). |
| AGXPHYSICS_EXPORT bool agxUtil::ConvexReaderWriter::createConvexDecomposition | ( | const agx::Vec3Vector & | vertices, |
| const agx::UInt32Vector & | indices, | ||
| agxCollide::ConvexRefVector & | results, | ||
| size_t | elementResolutionPerAxis = 50, |
||
| const agx::Matrix3x3 & | transformation = agx::Matrix3x3(), |
||
| const agx::Vec3 & | translation = agx::Vec3() |
||
| ) |
Creates a set of convex shapes that approximates the triangle mesh defined by filename using V-HACD which uses a volumetric algorithm.
The computation time can be high, if a large voxel resolution is used.
| vertices | The vertices. |
| indices | The indices. |
| results | The result vector. |
| elementResolutionPerAxis | Resolution parameter. Range 20-400. Larger values take more time. |
| transformation | Scaling and rotation of each vertex. |
| translation | Translation of each vertex (executed after transformation). |
| AGXPHYSICS_EXPORT agxCollide::Convex * agxUtil::ConvexReaderWriter::createFromConvex | ( | const agx::String & | filename, |
| const agx::Matrix3x3 & | transformation = agx::Matrix3x3(), |
||
| const agx::Vec3 & | translation = agx::Vec3() |
||
| ) |
Creates a convex from a supported mesh-file (see agxIO::MeshReader::FileType) which is known to be convex.
| filename | The file name. |
| transformation | Scaling and rotation of each vertex. |
| translation | Translation of each vertex (executed after transformation). |
| AGXPHYSICS_EXPORT agxCollide::Convex * agxUtil::ConvexReaderWriter::createFromConvex | ( | const agx::Vec3Vector & | vertices, |
| const agx::UInt32Vector & | indices, | ||
| const agx::String & | sourceName = "convexFromReaderWriter", |
||
| const agx::Matrix3x3 & | transformation = agx::Matrix3x3(), |
||
| const agx::Vec3 & | translation = agx::Vec3() |
||
| ) |
Creates a convex from vertices which are known to be convex.
| vertices | The triangle mesh vertices. |
| indices | The triangle mesh indices. |
| sourceName | The name of the data source. |
| transformation | Scaling and rotation of each vertex. |
| translation | Translation of each vertex (executed after transformation). |
| The | convex. |
| AGXPHYSICS_EXPORT bool agxUtil::ConvexReaderWriter::createVHACDConvexDecomposition | ( | const agx::String & | filename, |
| agxCollide::ConvexRefVector & | results, | ||
| size_t | elementResolutionPerAxis = 50, |
||
| const agx::Matrix3x3 & | transformation = agx::Matrix3x3(), |
||
| const agx::Vec3 & | translation = agx::Vec3() |
||
| ) |
Creates a set of convex shapes that approximates the triangle mesh defined by filename using V-HACD which uses a volumetric algorithm.
The computation time can be high, if a large voxel resolution is used.
| filename | Name of mesh file. |
| results | The result vector. |
| elementResolutionPerAxis | Resolution parameter. Will be clamped between 20-400. Larger values take more time. |
| transformation | Scaling and rotation of each vertex. |
| translation | Translation of each vertex (executed after transformation). |
| AGXPHYSICS_EXPORT bool agxUtil::ConvexReaderWriter::createVHACDConvexDecomposition | ( | const agx::Vec3Vector & | vertices, |
| const agx::UInt32Vector & | indices, | ||
| agxCollide::ConvexRefVector & | results, | ||
| size_t | elementResolutionPerAxis = 50, |
||
| const agx::Matrix3x3 & | transformation = agx::Matrix3x3(), |
||
| const agx::Vec3 & | translation = agx::Vec3() |
||
| ) |
Creates a set of convex shapes that approximates the triangle mesh defined by vertices and indices using V-HACD which uses a volumetric algorithm.
The computation time can be high, if a large voxel resolution is used.
| vertices | The triangle mesh vertices. |
| indices | The triangle mesh indices. |
| results | The generated convex meshes. |
| elementResolutionPerAxis | Resolution parameter. Range 20-400. Larger values take more time. |
| transformation | Scaling and rotation of each vertex. |
| translation | Translation of each vertex (executed after transformation). |
| AGXPHYSICS_EXPORT bool agxUtil::ConvexReaderWriter::exportConvex | ( | const agxCollide::Convex & | convex, |
| const agx::String & | filename | ||
| ) |
Exports convex vertex and index data to a wavefront obj file on a storage device.
This can be useful when creating convex meshes from other sources than 3D data files.
| convex | The convex to serialize. |
| filename | The desired file name (one would probably want it to end on .obj) |