![]() |
AGX Dynamics 2.40.0.0
|
Functions for generating Trimesh shapes from meshes, and for serializing them. More...
Functions | |
AGXPHYSICS_EXPORT agxCollide::RenderData * | createRenderData (const agx::String &filename, const agx::Matrix3x3 &vertexRotateAndScale=agx::Matrix3x3(), const agx::Vec3 &vertexTranslate=agx::Vec3()) |
Create a RenderData object from a supported mesh file (See agxIO::MeshReader::FileType). | |
AGXPHYSICS_EXPORT agxCollide::Trimesh * | createTrimesh (const agx::String &filename, uint32_t trimeshOptions=agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES, const agx::Matrix3x3 &vertexRotateAndScale=agx::Matrix3x3(), const agx::Vec3 &vertexTranslate=agx::Vec3()) |
Create a Trimesh shape from a supported mesh file format (See agxIO::MeshReader::FileType) containing mesh data. | |
AGXPHYSICS_EXPORT agxCollide::Trimesh * | createTrimesh (const agx::Vec3Vector &vertices, const agx::UInt32Vector &indices, uint32_t trimeshOptions=agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES, const agx::Matrix3x3 &vertexRotateAndScale=agx::Matrix3x3(), const agx::Vec3 &vertexTranslate=agx::Vec3()) |
Create a Trimesh shape from vertices and indices. | |
AGXPHYSICS_EXPORT agxCollide::Trimesh * | createTrimesh (const agxCollide::HeightField *heightField) |
Creates a trimesh from an agxCollide::HeightField. | |
AGXPHYSICS_EXPORT agxCollide::Trimesh * | createTrimeshTerrain (const agx::String &filename, agx::Real bottomMargin, uint32_t trimeshOptions=agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES, const agx::Matrix3x3 &vertexRotateAndScale=agx::Matrix3x3(), const agx::Vec3 &vertexTranslate=agx::Vec3()) |
Create a Terrain shape from a supported mesh model file (See agxIO::MeshReader::FileType). | |
AGXPHYSICS_EXPORT bool | exportTrimesh (const agxCollide::Trimesh *trimesh, const agx::String &filename) |
Exports trimesh vertex and index data to a mesh file (currently only supporting wavefront obj). | |
Functions for generating Trimesh shapes from meshes, and for serializing them.
AGXPHYSICS_EXPORT agxCollide::RenderData * agxUtil::TrimeshReaderWriter::createRenderData | ( | const agx::String & | filename, |
const agx::Matrix3x3 & | vertexRotateAndScale = agx::Matrix3x3() , |
||
const agx::Vec3 & | vertexTranslate = agx::Vec3() |
||
) |
Create a RenderData object from a supported mesh file (See agxIO::MeshReader::FileType).
This RenderData object can then be attached to a shape for rendering of the shape.
filename | File to create Trimesh from |
vertexRotateAndScale | Rotation and scale of Trimesh |
vertexTranslate | Translation of Trimesh |
AGXPHYSICS_EXPORT agxCollide::Trimesh * agxUtil::TrimeshReaderWriter::createTrimesh | ( | const agx::String & | filename, |
uint32_t | trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES , |
||
const agx::Matrix3x3 & | vertexRotateAndScale = agx::Matrix3x3() , |
||
const agx::Vec3 & | vertexTranslate = agx::Vec3() |
||
) |
Create a Trimesh shape from a supported mesh file format (See agxIO::MeshReader::FileType) containing mesh data.
filename | File to create Trimesh from |
trimeshOptions | Options set to the created Trimesh |
vertexRotateAndScale | Rotation and scale of Trimesh |
vertexTranslate | Translation of Trimesh |
AGXPHYSICS_EXPORT agxCollide::Trimesh * agxUtil::TrimeshReaderWriter::createTrimesh | ( | const agx::Vec3Vector & | vertices, |
const agx::UInt32Vector & | indices, | ||
uint32_t | trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES , |
||
const agx::Matrix3x3 & | vertexRotateAndScale = agx::Matrix3x3() , |
||
const agx::Vec3 & | vertexTranslate = agx::Vec3() |
||
) |
Create a Trimesh shape from vertices and indices.
vertices | - The vertices from which we will create a trimesh |
indices | - The index array that defines the triangles of the triangle mesh |
trimeshOptions | Options set to the created Trimesh |
vertexRotateAndScale | Rotation/home/jakobsson/agx/include/agxUtil/TrimeshReaderWriter/TrimeshReaderWriter.h and scale of Trimesh |
vertexTranslate | Translation of Trimesh |
AGXPHYSICS_EXPORT agxCollide::Trimesh * agxUtil::TrimeshReaderWriter::createTrimesh | ( | const agxCollide::HeightField * | heightField | ) |
Creates a trimesh from an agxCollide::HeightField.
heightField | HeightField to create Trimesh from |
AGXPHYSICS_EXPORT agxCollide::Trimesh * agxUtil::TrimeshReaderWriter::createTrimeshTerrain | ( | const agx::String & | filename, |
agx::Real | bottomMargin, | ||
uint32_t | trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES , |
||
const agx::Matrix3x3 & | vertexRotateAndScale = agx::Matrix3x3() , |
||
const agx::Vec3 & | vertexTranslate = agx::Vec3() |
||
) |
Create a Terrain shape from a supported mesh model file (See agxIO::MeshReader::FileType).
filename | File to create Terrain from |
bottomMargin | Bottom margin of the Terrain Trimesh |
trimeshOptions | Options set to the created Trimesh |
vertexRotateAndScale | Rotation and scale of Trimesh |
vertexTranslate | Translation of Trimesh |
AGXPHYSICS_EXPORT bool agxUtil::TrimeshReaderWriter::exportTrimesh | ( | const agxCollide::Trimesh * | trimesh, |
const agx::String & | filename | ||
) |
Exports trimesh vertex and index data to a mesh file (currently only supporting wavefront obj).
This can be useful when creating trimeshes from other sources than 3D data files.
trimesh | - The trimesh to serialize. |
filename | - The desired file name |