AGX Dynamics  2.37.3.2
agxUtil::deprecated::ConvexReaderWriter Namespace Reference

Functions for generating Convex shapes from meshes, and for serializing them. More...

Functions

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. More...
 
AGXPHYSICS_EXPORT bool createConvexDecomposition (const agx::String &filename, agxCollide::ConvexRefVector &results, agxCollide::deprecated::ConvexBuilder *builder=nullptr, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3())
 Creates convex shapes using convex decomposition from a supported mesh file format (see agxIO::MeshReader::FileType), using John Ratcliff's algorithm from 2006 for convex decomposition. More...
 
AGXPHYSICS_EXPORT bool createConvexDecomposition (const agx::Vec3Vector &vertices, const agx::UInt32Vector &indices, agxCollide::ConvexRefVector &results, agxCollide::deprecated::ConvexBuilder *builder=nullptr, const agx::Matrix3x3 &transformation=agx::Matrix3x3(), const agx::Vec3 &translation=agx::Vec3())
 Creates convex shapes using convex decomposition from vertices and indices (triangle lists), using John Ratcliff's algorithm from 2006 for convex decomposition. More...
 

Detailed Description

Functions for generating Convex shapes from meshes, and for serializing them.

Function Documentation

◆ createConvex()

AGXPHYSICS_EXPORT agxCollide::Convex* agxUtil::deprecated::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.

Deprecated:
Use agxUtil::ConvexReaderWriter::createConvex instead
Note
Might take long for medium to larger meshes.
Parameters
verticesThe vertices.
transformationScaling and rotation of each vertex.
translationTranslation of each vertex (executed after transformation).
Returns
The created Convex. Might be 0 if an error occurred.

◆ createConvexDecomposition() [1/2]

AGXPHYSICS_EXPORT bool agxUtil::deprecated::ConvexReaderWriter::createConvexDecomposition ( const agx::String &  filename,
agxCollide::ConvexRefVector &  results,
agxCollide::deprecated::ConvexBuilder *  builder = nullptr,
const agx::Matrix3x3 &  transformation = agx::Matrix3x3(),
const agx::Vec3 &  translation = agx::Vec3() 
)

Creates convex shapes using convex decomposition from a supported mesh file format (see agxIO::MeshReader::FileType), using John Ratcliff's algorithm from 2006 for convex decomposition.

(http://codesuppository.blogspot.com/2006/04/approximate-convex-decomposition.html).

Note
Might take long for medium to larger meshes.
Deprecated:
Use agxUtil::ConvexReaderWriter::createConvexDecomposition instead
Parameters
filenameThe file name.
resultsThe result vector.
builderA convex builder for more control. Optional.
transformationScaling and rotation of each vertex.
translationTranslation of each vertex (executed after transformation).
Returns
Was reading the file and creating the results successful?

◆ createConvexDecomposition() [2/2]

AGXPHYSICS_EXPORT bool agxUtil::deprecated::ConvexReaderWriter::createConvexDecomposition ( const agx::Vec3Vector &  vertices,
const agx::UInt32Vector &  indices,
agxCollide::ConvexRefVector &  results,
agxCollide::deprecated::ConvexBuilder *  builder = nullptr,
const agx::Matrix3x3 &  transformation = agx::Matrix3x3(),
const agx::Vec3 &  translation = agx::Vec3() 
)

Creates convex shapes using convex decomposition from vertices and indices (triangle lists), using John Ratcliff's algorithm from 2006 for convex decomposition.

(http://codesuppository.blogspot.com/2006/04/approximate-convex-decomposition.html).

Note
Might take long for medium to larger meshes.
Deprecated:
Use agxUtil::ConvexReaderWriter::createConvexDecomposition instead
Parameters
verticesThe vertices.
indicesThe indices.
resultsThe result vector.
builderA convex builder for more control. Optional.
transformationScaling and rotation of each vertex.
translationTranslation of each vertex (executed after transformation).
Returns
Was reading the file and creating the results successful?