Navigation
API > API/Runtime > API/Runtime/GeometryCore
FColliderMesh is a minimal representation of an Indexed Triangle Mesh suitable to use with a TMeshAABBTree3. This class is intended to be used in situations where a copy of a FDynamicMesh3 would be created/kept only to use with an AABBTree or FWNTree. In such situations, the FDynamicMesh3 copy is (relatively) heavy memory-wise, particularly if a large number of small mesh/AABBTree pairs are stored. In those cases a FColliderMesh can be used instead.
If FBuildOptions.bBuildAABBTree is true (default), then an AABBTree will automatically be built and available via GetAABBTree()
If the source FDynamicMesh3 is not compact, it will be compacted. ID mappings can optionally be stored if the FBuildOptions are configured to request it (default false), allowing hit-triangle/vertex IDs to be mapped back to IDs on the source mesh.
Currently there is no support for UVs or Vertex Normals.
FColliderMesh (effectively) implements the TTriangleMeshAdapter interface, and so can be used anywhere a TTriangleMeshAdapter could be used (eg with TMeshQueries functions).
| Name | FColliderMesh |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/ColliderMesh.h |
| Include Path | #include "DynamicMesh/ColliderMesh.h" |
Syntax
class FColliderMesh
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FColliderMesh
(
const FDynamicMesh3& SourceMesh, |
DynamicMesh/ColliderMesh.h | ||
| DynamicMesh/ColliderMesh.h |
Structs
| Name | Remarks |
|---|---|
| FBuildOptions |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool FindNearestHitTriangle
(
const FRay3d& Ray, |
DynamicMesh/ColliderMesh.h | ||
int FindNearestTriangle
(
const FVector3d& Point, |
Find the TriangleID closest to P on the collider mesh, and distance to it, within distance MaxDist, or return InvalidID. | DynamicMesh/ColliderMesh.h | |
uint64 GetChangeStamp() |
DynamicMesh/ColliderMesh.h | ||
| Direct access to the AABBTree pointer inside the ColliderMesh. | DynamicMesh/ColliderMesh.h | ||
int32 GetSourceTriangleID
(
int32 TriangleID |
DynamicMesh/ColliderMesh.h | ||
int32 GetSourceVertexID
(
int32 VertexID |
DynamicMesh/ColliderMesh.h | ||
FIndex3i GetTriangle
(
int32 TriangleID |
DynamicMesh/ColliderMesh.h | ||
FVector3d GetTriNormal
(
int32 TriangleID |
DynamicMesh/ColliderMesh.h | ||
void GetTriVertices
(
int32 TriangleID, |
DynamicMesh/ColliderMesh.h | ||
FVector3d GetVertex
(
int32 VertexID |
DynamicMesh/ColliderMesh.h | ||
bool HasTriangleIDMap() |
DynamicMesh/ColliderMesh.h | ||
bool HasVertexIDMap() |
DynamicMesh/ColliderMesh.h | ||
void Initialize
(
const FDynamicMesh3& SourceMesh, |
DynamicMesh/ColliderMesh.h | ||
bool IsTriangle
(
int32 TriangleID |
Mesh API required for TMeshAABBTree3 | DynamicMesh/ColliderMesh.h | |
bool IsVertex
(
int32 VertexID |
DynamicMesh/ColliderMesh.h | ||
int32 MaxTriangleID() |
DynamicMesh/ColliderMesh.h | ||
int32 MaxVertexID() |
DynamicMesh/ColliderMesh.h | ||
void Reset
(
EAllowShrinking AllowShrinking |
DynamicMesh/ColliderMesh.h | ||
void Reset
(
bool bReleaseMemory |
DynamicMesh/ColliderMesh.h | ||
bool SourceWasCompactT() |
DynamicMesh/ColliderMesh.h | ||
bool SourceWasCompactV() |
DynamicMesh/ColliderMesh.h | ||
int32 TriangleCount() |
DynamicMesh/ColliderMesh.h | ||
int32 VertexCount() |
DynamicMesh/ColliderMesh.h |