Navigation
API > API/Plugins > API/Plugins/DynamicMesh
Remove "occluded" triangles, i.e. triangles on the "inside" of the mesh(es). This is a fuzzy definition, current implementation has a couple of options including a winding number-based version and an ambient-occlusion-ish version, where if face is occluded for all test rays, then we classify it as inside and remove it.
Note this class always removes triangles from an FDynamicMesh3, but can use any mesh type to define the occluding geometry (as long as the mesh type implements the TTriangleMeshAdapter fns)
| Name | TRemoveOccludedTriangles |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/RemoveOccludedTriangles.h |
| Include Path | #include "Operations/RemoveOccludedTriangles.h" |
Syntax
template<typename OccluderTriangleMeshType>
class TRemoveOccludedTriangles
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TRemoveOccludedTriangles
(
FDynamicMesh3* Mesh |
Operations/RemoveOccludedTriangles.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~TRemoveOccludedTriangles() |
Operations/RemoveOccludedTriangles.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AddRandomRays | int | Number of additional ray directions to add to raycast-based occlusion checks, beyond the default +/- major axis directions | Operations/RemoveOccludedTriangles.h | |
| AddTriangleSamples | int | Number of additional samples to add per triangle | Operations/RemoveOccludedTriangles.h | |
| bRemoveFailed | bool | True if it wanted to remove triangles but the actual remove operation failed | Operations/RemoveOccludedTriangles.h | |
| InsideMode | EOcclusionCalculationMode | Operations/RemoveOccludedTriangles.h | ||
| Mesh | FDynamicMesh3 * | Operations/RemoveOccludedTriangles.h | ||
| NormalOffset | double | We nudge points out by this amount to try to counteract numerical issues | Operations/RemoveOccludedTriangles.h | |
| Progress | FProgressCancel * | Set this to be able to cancel running operation | Operations/RemoveOccludedTriangles.h | |
| RemovedT | TArray< int > | Outputs indices of removed triangles. will be empty if nothing removed | Operations/RemoveOccludedTriangles.h | |
| TriangleSamplingMethod | EOcclusionTriangleSampling | Input settings | Operations/RemoveOccludedTriangles.h | |
| WindingIsoValue | double | Use this as winding isovalue for WindingNumber mode | Operations/RemoveOccludedTriangles.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Apply
(
const FTransformSRT3d& MeshLocalToOccluderSpace, |
Remove the occluded triangles single instance case w/out precomputed winding tree | Operations/RemoveOccludedTriangles.h | |
virtual bool Apply
(
const TArrayView< const FTransformSRT3d > MeshLocalToOccluderSpaces, |
Remove the occluded triangles, considering the given occluder AABB tree (which may represent more geometry than a single mesh) See simpler invocations below for the single instance case or the case where you'd like the spatial data structures built for you | Operations/RemoveOccludedTriangles.h | |
virtual bool Apply
(
const FTransformSRT3d& MeshLocalToOccluderSpace, |
Remove the occluded triangles single instance case | Operations/RemoveOccludedTriangles.h | |
virtual bool Apply
(
const TArrayView< const FTransformSRT3d > MeshLocalToOccluderSpaces, |
Remove the occluded triangles, considering the given occluder AABB trees (which may represent more geometry than a single mesh) See simpler invocations below for the single instance case or the case where you'd like the spatial data structures built for you | Operations/RemoveOccludedTriangles.h | |
virtual bool RemoveSelected() |
Remove triangles that were selected (the triangle IDs in the RemoveT array) | Operations/RemoveOccludedTriangles.h | |
virtual bool Select
(
const FTransformSRT3d& MeshLocalToOccluderSpace, |
Select the occluded triangles single instance case w/out precomputed winding tree | Operations/RemoveOccludedTriangles.h | |
virtual bool Select
(
const TArrayView< const FTransformSRT3d > MeshLocalToOccluderSpaces, |
Select the occluded triangles, considering the given occluder AABB tree (which may represent more geometry than a single mesh) See simpler invocations below for the single instance case or the case where you'd like the spatial data structures built for you | Operations/RemoveOccludedTriangles.h | |
virtual bool Select
(
const FTransformSRT3d& MeshLocalToOccluderSpace, |
Select the occluded triangles single instance case | Operations/RemoveOccludedTriangles.h | |
virtual bool Select
(
const TArrayView< const FTransformSRT3d > MeshLocalToOccluderSpaces, |
Select the occluded triangles, considering the given occluder AABB trees (which may represent more geometry than a single mesh) See simpler invocations below for the single instance case or the case where you'd like the spatial data structures built for you Selection will be stored in the RemovedT array, but no triangles will be removed. | Operations/RemoveOccludedTriangles.h | |
virtual EOperationValidationResult Validate() |
Operations/RemoveOccludedTriangles.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Cancelled() |
If this returns true, abort computation. | Operations/RemoveOccludedTriangles.h |