AGX Dynamics  2.37.2.0
TrimeshReaderWriter.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 #pragma once
18 
19 #include <agx/agx.h>
20 #include <agxCollide/Trimesh.h>
21 
22 namespace agxCollide
23 {
24  class HeightField;
25 }
26 
27 namespace agxUtil
28 {
29 
31  namespace TrimeshReaderWriter
32  {
33 
43  const agx::String &filename,
44  uint32_t trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES,
45  const agx::Matrix3x3 &vertexRotateAndScale = agx::Matrix3x3(),
46  const agx::Vec3 &vertexTranslate = agx::Vec3());
47 
58  const agx::Vec3Vector &vertices,
59  const agx::UInt32Vector &indices,
60  uint32_t trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES,
61  const agx::Matrix3x3 &vertexRotateAndScale = agx::Matrix3x3(),
62  const agx::Vec3 &vertexTranslate = agx::Vec3());
63 
76  const agx::String &filename,
77  agx::Real bottomMargin,
78  uint32_t trimeshOptions = agxCollide::Trimesh::REMOVE_DUPLICATE_VERTICES,
79  const agx::Matrix3x3 &vertexRotateAndScale = agx::Matrix3x3(),
80  const agx::Vec3 &vertexTranslate = agx::Vec3());
81 
88  const agxCollide::HeightField *heightField);
89 
97  AGXPHYSICS_EXPORT bool exportTrimesh(const agxCollide::Trimesh *trimesh, const agx::String &filename);
98 
108  const agx::String &filename,
109  const agx::Matrix3x3 &vertexRotateAndScale = agx::Matrix3x3(),
110  const agx::Vec3 &vertexTranslate = agx::Vec3());
111  }
112 }
Removes exactly identical duplicates in the vertices, as well as (resulting or previously existing) t...
Definition: Trimesh.h:77
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Class for storing rendering information for a Shape.
Definition: RenderData.h:38
#define AGXPHYSICS_EXPORT
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 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)...
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 agxCollide::Trimesh * createTrimesh(const agxCollide::HeightField *heightField)
Creates a trimesh from an agxCollide::HeightField.
double Real
Definition: Real.h:42
Triangle mesh for geometric intersection tests.
Definition: Trimesh.h:42
A HeightField is a collision shape that can be created from a grid structure, like an image...
The agxUtil namespace contain classes and methods for utility functionality.