17 #ifndef AGXCOLLIDE_TRIMESH_H
18 #define AGXCOLLIDE_TRIMESH_H
54 CLOCKWISE_ORIENTATION = 0x1,
77 REMOVE_DUPLICATE_VERTICES = 0x40,
82 RECALCULATE_NORMALS_GIVEN_FIRST_TRIANGLE = 0x80
146 virtual void calculatePossibleTriangleOverlapsAlongLineSegment(
158 virtual void calculatePossibleTriangleOverlapsAlongLineSegment(
163 virtual Shape* clone()
const override;
192 void updateMeshGeometry(
bool showWarnings,
bool recalculateMassProperties =
true);
195 uint32_t getOptionsMask()
const;
239 const char* sourceName,
240 uint32_t optionsMask);
246 void finalize(
const char* sourceName,
bool showWarnings, uint32_t optionsMask);
252 void flipNormal(
const size_t triangleIndex);
257 bool getTriangleHalfEdgePartnerTriangleIndexAndLocalEdgeIndex(
const size_t triangleIndex,
const size_t localEdgeIndex,
size_t& neighborIndex,
size_t& neighborLocalEdgeIndex);
265 void calculateMassProperties(
bool showWarnings);
274 void finalizeMeshTopology(
bool showWarnings, uint32_t optionsMask);
278 const char* sourceName, uint32_t optionsMask = 0);
284 void setValuesAsShallowCopy(
const Trimesh* other);
290 virtual void updateBvhTree()
override;
309 this->
getBvhTree()->findCollisionWithLineSegment(segmentStartLocal, segmentEndLocal, triangleIndices);
319 this->
getBvhTree()->findCollisionWithLineSegment(segmentStartLocal, segmentEndLocal, triangleIndices);
Removes exactly identical duplicates in the vertices, as well as (resulting or previously existing) t...
Mesh is a common base class for triangle meshes, such as Mesh or HeightField.
#define AGXPHYSICS_EXPORT
Pointer to a entity instance of type Physics.Geometry.Shape.
TrimeshOptionsFlags
Parameters for trimesh creation from data set.
const AabbTree * getBvhTree() const
Smart pointer for handling referenced counted objects.
agx::ref_ptr< const Trimesh > m_shallowCopySource
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Type
Define the type of a Shape.
virtual void calculatePossibleTriangleOverlapsAlongLineSegment(const agx::Vec3 &segmentStartLocal, const agx::Vec3 &segmentEndLocal, agx::UInt32Vector &triangleIndices) const override
Calculates an array of triangle indices of the triangles whose bounding volumes get intersected by a ...
Triangle mesh for geometric intersection tests.
AGX_DECLARE_POINTER_TYPES(SpaceListener)