Navigation
API > API/Plugins > API/Plugins/ModelingComponents
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.
| Name | FMeshSceneAdapter |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Scene/MeshSceneAdapter.h |
| Include Path | #include "Scene/MeshSceneAdapter.h" |
Syntax
class FMeshSceneAdapter
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Scene/MeshSceneAdapter.h | |||
| Scene/MeshSceneAdapter.h | |||
FMeshSceneAdapter
(
const FMeshSceneAdapter& |
Scene/MeshSceneAdapter.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMeshSceneAdapter() |
Scene/MeshSceneAdapter.h |
Structs
| Name | Remarks |
|---|---|
| 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() |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Mesh Scene Setup etc Add the given Actors to the Mesh Scene | Scene/MeshSceneAdapter.h | ||
void AddComponents
(
const TArray< UActorComponent* >& ComponentSetIn |
Add the given Components to the Mesh Scene. | Scene/MeshSceneAdapter.h | |
void Build
(
const FMeshSceneAdapterBuildOptions& BuildOptions |
Build the Mesh Scene. | Scene/MeshSceneAdapter.h | |
virtual void BuildSpatialEvaluationCache () |
Precompute data structures that accelerate spatial evaluation queries. | Scene/MeshSceneAdapter.h | |
virtual void CollectMeshSeedPoints
(
TArray< FVector3d >& PointsOut |
Scene/MeshSceneAdapter.h | ||
void FastUpdateTransforms
(
bool bRebuildSpatialCache |
Update the transforms on all the Components in the current Mesh Scene. | Scene/MeshSceneAdapter.h | |
virtual double FastWindingNumber
(
const FVector3d& WorldPoint, |
Scene/MeshSceneAdapter.h | ||
virtual bool FindNearestRayIntersection
(
const FRay3d& WorldRay, |
Intersect the given Ray with the MeshScene and find the nearest mesh hit | Scene/MeshSceneAdapter.h | |
void GenerateBaseClosingMesh
(
double BaseHeight, |
Generate a new mesh that "caps" the mesh scene on the bottom. | Scene/MeshSceneAdapter.h | |
virtual void GetAccumulatedMesh
(
FDynamicMesh3& AccumMesh |
Append all instance triangles to a single mesh. May be very large. | Scene/MeshSceneAdapter.h | |
virtual FAxisAlignedBox3d GetBoundingBox() |
Mesh Scene Queries | Scene/MeshSceneAdapter.h | |
virtual void GetGeometryStatistics
(
FStatistics& StatsOut |
Scene/MeshSceneAdapter.h | ||
virtual FAxisAlignedBox3d GetMeshBoundingBox
(
UActorComponent* Component, |
Scene/MeshSceneAdapter.h | ||
virtual void GetMeshBoundingBoxes
(
TArray< FAxisAlignedBox3d >& Bounds |
Get all world-space bounding boxes for all Scene Meshes | Scene/MeshSceneAdapter.h | |
bool IsValid() |
Whether valid actors/components were added to the scene representation | Scene/MeshSceneAdapter.h | |
virtual void ParallelMeshVertexEnumeration
(
TFunctionRef< bool(int32 NumMeshes)> InitializeFunc, |
Run a custom query across all world-transformed scene mesh vertices. | Scene/MeshSceneAdapter.h | |
virtual void ProcessActorChildMeshes
(
TFunctionRef< void(const FActorAdapter*ActorAdapter, const FActorChildMesh*ChildMesh)> Pro... |
Run a custom query across all scene actor child meshes. | Scene/MeshSceneAdapter.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Build_FullDecompose
(
const FMeshSceneAdapterBuildOptions& BuildOptions |
Scene/MeshSceneAdapter.h | ||
void InitializeSpatialWrappers
(
const TArray< FActorAdapter* >& NewItemsToProcess |
Scene/MeshSceneAdapter.h | ||
void UpdateActorBounds
(
FActorAdapter& Actor |
Scene/MeshSceneAdapter.h |