Navigation
API > API/Plugins > API/Plugins/ModelingComponents > API/Plugins/ModelingComponents/Scene
References
| Module | ModelingComponents |
| Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Scene/MeshSceneAdapter.h |
| Include | #include "Scene/MeshSceneAdapter.h" |
Syntax
class FMeshSceneAdapter
Remarks
FMeshSceneAdapter creates an internal representation of an Actor/Component/Asset hierarchy, so that a minimal set of Mesh data structures can be constructed for the unique Meshes (generally Assets). This allows queries against the Actor set to be computed without requiring mesh copies or duplicates of the mesh data structures (ie, saving memory, at the cost of some computation overhead).
Currently this builds an AABBTree and FastWindingTree for each unique Mesh, and supports various queries based on those data structures.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bHaveSpatialEvaluationCache | ||
| bool | bSceneIsAllSolids | ||
| FAxisAlignedBox3d | CachedWorldBounds | ||
| TSharedPtr< FSparseDynamicOctree3 > | Octree | Octree of elements in SortedSpatials list. | |
| TArray< TUniquePtr< FActorAdapter > > | SceneActors | Top-level list of ActorAdapters, which represent each Actor and set of Components | |
| TArray< FSpatialCacheInfo > | SortedSpatials | List of all unique scene meshes that have spatial data structure available | |
| TMap< void *, TSharedPtr< FSpatialWrapperInfo > > | SpatialAdapters | Unique set of spatial data structure query interfaces, one for each Mesh object, which is identified by void* pointer. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FMeshSceneAdapter
(
const FMeshSceneAdapter& |
|||
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Mesh Scene Setup etc Add the given Actors to the Mesh Scene | ||
| void | AddComponents
(
const TArray< UActorComponent* >& ComponentSetIn |
Add the given Components to the Mesh Scene. | |
| void | Build
(
const FMeshSceneAdapterBuildOptions& BuildOptions |
Build the Mesh Scene. | |
| void | Build_FullDecompose
(
const FMeshSceneAdapterBuildOptions& BuildOptions |
||
| void | Precompute data structures that accelerate spatial evaluation queries. | ||
| void | CollectMeshSeedPoints
(
TArray< FVector3d >& PointsOut |
||
| void | FastUpdateTransforms
(
bool bRebuildSpatialCache |
Update the transforms on all the Components in the current Mesh Scene. | |
| double | FastWindingNumber
(
const FVector3d& WorldPoint, |
||
| bool | FindNearestRayIntersection
(
const FRay3d& WorldRay, |
Intersect the given Ray with the MeshScene and find the nearest mesh hit | |
| void | GenerateBaseClosingMesh
(
double BaseHeight, |
Generate a new mesh that "caps" the mesh scene on the bottom. | |
| void | GetAccumulatedMesh
(
FDynamicMesh3& AccumMesh |
Append all instance triangles to a single mesh. May be very large. | |
| FAxisAlignedBox3d | Mesh Scene Queries | ||
| void | GetGeometryStatistics
(
FStatistics& StatsOut |
||
| FAxisAlignedBox3d | GetMeshBoundingBox
(
UActorComponent* Component, |
||
| void | GetMeshBoundingBoxes
(
TArray< FAxisAlignedBox3d >& Bounds |
Get all world-space bounding boxes for all Scene Meshes | |
| void | InitializeSpatialWrappers
(
const TArray< FActorAdapter* >& NewItemsToProcess |
||
| void | ParallelMeshVertexEnumeration
(
TFunctionRef< bool(int32 NumMeshes)> InitializeFunc, |
Run a custom query across all world-transformed scene mesh vertices. | |
| void | ProcessActorChildMeshes
(
TFunctionRef< void(const FActorAdapter*ActorAdapter, const FActorChildMesh*ChildMesh)> Pro... |
Run a custom query across all scene actor child meshes. | |
| void | UpdateActorBounds
(
FActorAdapter& Actor |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FSpatialCacheInfo | FSpatialCacheInfo represents a unique scene mesh with spatial data structure. | ||
| FSpatialWrapperInfo | FSpatialWrapperInfo is a "unique mesh" that knows which parent objects have references to it. | ||
| FStatistics | Statistics about the Mesh Scene returned by GetGeometryStatistics() |