Navigation
API > API/Plugins > API/Plugins/ModelingComponents > API/Plugins/ModelingComponents/Components
Inheritance Hierarchy
- UMeshComponent
- IToolFrameworkComponent
- IMeshVertexCommandChangeTarget
- IMeshCommandChangeTarget
- IMeshReplacementCommandChangeTarget
- UBaseDynamicMeshComponent
- UOctreeDynamicMeshComponent
References
| Module | ModelingComponents |
| Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Components/OctreeDynamicMeshComponent.h |
| Include | #include "Components/OctreeDynamicMeshComponent.h" |
Syntax
UCLASS (HideCategories=(LOD, Physics, Collision), EditInlineNew, ClassGroup=Rendering)
class UOctreeDynamicMeshComponent : public UBaseDynamicMeshComponent
Remarks
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!)
Variables
| Type | Name | Description | |
|---|---|---|---|
| FSimpleMulticastDelegate | OnMeshChanged | This delegate fires when a FCommandChange is applied to this component, so that parent objects know the mesh has changed. | |
| TFunction< FColor(const FDynamicMesh3 *, int)> | TriangleColorFunc | If this function is set, we will use these colors instead of vertex colors |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UOctreeDynamicMeshComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UE::Geometry::FDynamicMeshOctree3 * | GetOctree () |
||
| void | SetDynamicMesh
(
UDynamicMesh* NewMesh |
Overridden from UBaseDynamicMeshComponent
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyTransform
(
const FTransform3d& Transform, |
Apply transform to internal mesh. Invalidates RenderProxy. | |
| UDynamicMesh * | |||
| FDynamicMesh3 * | GetMesh () |
Avoid usage of this function, access via GetDynamicMesh() instead | |
| const FDynamicMesh3 * | GetMesh () |
||
| void | This is called to tell our RenderProxy about modifications to the material set. | ||
| void | Change tracking/etc Call this if you update the mesh via GetMesh() | ||
| void | ProcessMesh
(
TFunctionRef< void(const UE::Geometry::FDynamicMesh3&)> ProcessFunc |
Allow external code to read the internal mesh. | |
| void | SetMesh
(
UE::Geometry::FDynamicMesh3&& MoveMesh |
Initialize the internal mesh from a DynamicMesh |
Overridden from IMeshVertexCommandChangeTarget
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyChange
(
const FMeshVertexChange* Change, |
Apply a vertex deformation change to the internal mesh |
Overridden from IMeshCommandChangeTarget
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyChange
(
const FMeshChange* Change, |
Apply a general mesh change to the internal mesh |
Overridden from IMeshReplacementCommandChangeTarget
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyChange
(
const FMeshReplacementChange* Change, |
Apply a general mesh replacement change to the internal mesh |