Navigation
API > API/Plugins > API/Plugins/ModelingComponents
UOctreeDynamicMeshComponent is a mesh component similar to UProceduralMeshComponent, except it bases the renderable geometry off an internal FDynamicMesh3 instance. The class generally has the same capabilities as UDynamicMeshComponent.
A FDynamicMeshOctree3 is available to dynamically track the triangles of the mesh (however the client is responsible for updating this octree). Based on the Octree, the mesh is partitioned into chunks that are stored in separate RenderBuffers in the FOctreeDynamicMeshSceneProxy. Calling NotifyMeshUpdated() will result in only the "dirty" chunks being updated, rather than the entire mesh.
(So, if you don't need this capability, and don't want to update an Octree, use UDynamicMeshComponent!)
| Name | UOctreeDynamicMeshComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Components/OctreeDynamicMeshComponent.h |
| Include Path | #include "Components/OctreeDynamicMeshComponent.h" |
Syntax
UCLASS (MinimalAPI, HideCategories=(LOD, Physics, Collision), EditInlineNew, ClassGroup=Rendering)
class UOctreeDynamicMeshComponent : public UBaseDynamicMeshComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UMeshComponent → UBaseDynamicMeshComponent → UOctreeDynamicMeshComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
- IMeshCommandChangeTarget
- IMeshReplacementCommandChangeTarget
- IMeshVertexCommandChangeTarget
- IToolFrameworkComponent
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UOctreeDynamicMeshComponent
(
const FObjectInitializer& ObjectInitializer |
Components/OctreeDynamicMeshComponent.h |
Structs
| Name | Remarks |
|---|---|
| FCutCellIndexSet |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnMeshChanged | FSimpleMulticastDelegate | This delegate fires when a FCommandChange is applied to this component, so that parent objects know the mesh has changed. | Components/OctreeDynamicMeshComponent.h | |
| TriangleColorFunc | TFunction< FColor(const FDynamicMesh3 *, int)> | If this function is set, we will use these colors instead of vertex colors | Components/OctreeDynamicMeshComponent.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CutCellSetMap | TArray< FCutCellIndexSet > | Components/OctreeDynamicMeshComponent.h | ||
| MeshObject | TObjectPtr< UDynamicMesh > | Components/OctreeDynamicMeshComponent.h | ||
| MeshObjectChangedHandle | FDelegateHandle | Components/OctreeDynamicMeshComponent.h | ||
| Octree | TUniquePtr< UE::Geometry::FDynamicMeshOctree3 > | Components/OctreeDynamicMeshComponent.h | ||
| OctreeCut | TUniquePtr< UE::Geometry::FDynamicMeshOctree3::FTreeCutSet > | Components/OctreeDynamicMeshComponent.h | ||
| PreMeshChangeHandle | FDelegateHandle | Components/OctreeDynamicMeshComponent.h | ||
| SpillDecompSetID | int32 | Components/OctreeDynamicMeshComponent.h | ||
| TriangleDecomposition | UE::Geometry::FArrayIndexSetsDecomposition | Components/OctreeDynamicMeshComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UE::Geometry::FDynamicMeshOctree3 * GetOctree() |
Components/OctreeDynamicMeshComponent.h | ||
void SetDynamicMesh
(
UDynamicMesh* NewMesh |
Components/OctreeDynamicMeshComponent.h |
|
Overridden from UBaseDynamicMeshComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyTransform
(
const FTransform3d& Transform, |
Apply transform to internal mesh. Invalidates RenderProxy. | Components/OctreeDynamicMeshComponent.h | |
virtual UDynamicMesh * GetDynamicMesh() |
Components/OctreeDynamicMeshComponent.h | ||
virtual FDynamicMesh3 * GetMesh () |
Components/OctreeDynamicMeshComponent.h | ||
virtual const FDynamicMesh3 * GetMesh () |
Components/OctreeDynamicMeshComponent.h | ||
virtual void NotifyMeshUpdated() |
Change tracking/etc Call this if you update the mesh via GetMesh() | Components/OctreeDynamicMeshComponent.h | |
virtual void ProcessMesh
(
TFunctionRef< void(const UE::Geometry::FDynamicMesh3&)> ProcessFunc |
Components/OctreeDynamicMeshComponent.h | ||
virtual void SetMesh
(
UE::Geometry::FDynamicMesh3&& MoveMesh |
Initialize the internal mesh from a DynamicMesh | Components/OctreeDynamicMeshComponent.h |
Overridden from IMeshVertexCommandChangeTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyChange
(
const FMeshVertexChange* Change, |
Apply a vertex deformation change to the internal mesh | Components/OctreeDynamicMeshComponent.h |
Overridden from IMeshCommandChangeTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyChange
(
const FMeshChange* Change, |
Apply a general mesh change to the internal mesh | Components/OctreeDynamicMeshComponent.h |
Overridden from IMeshReplacementCommandChangeTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyChange
(
const FMeshReplacementChange* Change, |
Apply a general mesh replacement change to the internal mesh | Components/OctreeDynamicMeshComponent.h |
Protected
Overridden from UBaseDynamicMeshComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void NotifyMaterialSetUpdated () |
This is called to tell our RenderProxy about modifications to the material set. | Components/OctreeDynamicMeshComponent.h |