AGXDynamics  2.35.0.2
TrimeshReaderWriter.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXUTIL_TRIMESHREADERWRITER_H
18 #define AGXUTIL_TRIMESHREADERWRITER_H
19 
20 #include <agx/agx.h>
21 #include <agxCollide/Trimesh.h>
22 
23 namespace agxCollide {
24  class HeightField;
25 }
26 
27 namespace agxUtil {
28 
30  namespace TrimeshReaderWriter {
31 
41  const agx::String& filename,
42  uint32_t trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES,
43  const agx::Matrix3x3& vertexRotateAndScale = agx::Matrix3x3(),
44  const agx::Vec3& vertexTranslate = agx::Vec3());
45 
56  const agx::Vec3Vector& vertices,
57  const agx::UInt32Vector& indices,
58  uint32_t trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES,
59  const agx::Matrix3x3& vertexRotateAndScale = agx::Matrix3x3(),
60  const agx::Vec3& vertexTranslate = agx::Vec3());
61 
62 
75  const agx::String& filename,
76  agx::Real bottomMargin,
77  uint32_t trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES,
78  const agx::Matrix3x3& vertexRotateAndScale=agx::Matrix3x3(),
79  const agx::Vec3& vertexTranslate = agx::Vec3());
80 
87  const agxCollide::HeightField* heightField);
88 
96  AGXPHYSICS_EXPORT bool exportTrimesh( const agxCollide::Trimesh* trimesh, const agx::String& filename );
97 
107  const agx::String& filename,
108  const agx::Matrix3x3& vertexRotateAndScale=agx::Matrix3x3(),
109  const agx::Vec3& vertexTranslate = agx::Vec3());
110  }
111 }
112 
113 #endif
114 
Trimesh.h
agx::Real
double Real
Definition: Real.h:42
agxCollide::RenderData
Class for storing rendering information for a Shape.
Definition: RenderData.h:38
agxCollide::HeightField
A HeightField is a collision shape that can be created from a grid structure, like an image.
Definition: agxCollide/HeightField.h:51
agxUtil::TrimeshReaderWriter::createTrimesh
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...
agxUtil::TrimeshReaderWriter::exportTrimesh
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).
agx::VectorPOD< Vec3 >
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agxUtil::TrimeshReaderWriter::createTrimeshTerrain
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).
agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES
@ REMOVE_DUPLICATE_VERTICES
Removes exactly identical duplicates in the vertices, as well as (resulting or previously existing) t...
Definition: Trimesh.h:77
agx.h
agxCollide
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Definition: ContactForceFilterParticipant.h:22
agxUtil::TrimeshReaderWriter::createRenderData
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).
agx::AgXString< std::string >
agx::Vec3T< Real >
agxCollide::Trimesh
Triangle mesh for geometric intersection tests.
Definition: Trimesh.h:42
agx::Matrix3x3T< Real >
agxUtil
The agxUtil namespace contain classes and methods for utility functionality.
Definition: CylindricalJoint.h:22