| UObjectBase
|
Module |
|
Header |
/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/PreviewMesh.h |
Include |
#include "PreviewMesh.h" |
[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Transient)
class UPreviewMesh :
public UObject,
public IMeshVertexCommandChangeTarget,
public IMeshCommandChangeTarget,
public IMeshReplacementCommandChangeTarget
UPreviewMesh is a utility object that spawns and owns a transient mesh object in the World. This can be used to show live preview geometry during modeling operations. Call CreateInWorld() to set it up, and Disconnect() to shut it down.
Currently implemented via an internal Actor that has a USimpleDynamicMeshComponent root component, with an AABBTree created/updated if FProperty bBuildSpatialDataStructure=true. The Actor is destroyed on Disconnect().
The intention with UPreviewMesh is to provide a higher-level interface than the Component. In future the internal Component may be replaced with another class (eg OctreeDynamicMeshComponent), or automatically swap between the two, etc.
As a result direct access to the Actor/Component, or a non-const FDynamicMesh3, is intentionally not provided. Wrapper functions are provided (or should be added) for necessary Actor/Component parameters. To edit the mesh either a copy is done, or EditMesh()/ApplyChange() must be used. These functions automatically update necessary internal data structures.
Name | Description | ||
---|---|---|---|
|
bBuildSpatialDataStructure |
If true, we build a spatial data structure internally for the preview mesh, which allows for hit-testing |
|
|
bDrawOnTop |
Results in component drawing w/o z-testing and with editor compositing. Do not recommend using this flag, will be deprecated/removed. |
|
|
DynamicMeshComponent |
This component is set as the root component of TemporaryParentActor |
|
|
MeshAABBTree |
Spatial data structure that is initialized if bBuildSpatialDataStructure = true when UpdatePreview() is called |
|
|
TemporaryParentActor |
The temporary actor we create internally to own the preview mesh component |
Name | Description | |
---|---|---|
|
UPreviewMesh() |
Name | Description | |
---|---|---|
|
~UPreviewMesh() |
Name | Description | ||
---|---|---|---|
|
Bake ( |
Write the internal mesh to a MeshDescription |
|
|
ClearOverrideRenderMaterial() |
Clear the override material for the preview mesh. |
|
|
ClearPreview() |
Read access to internal mesh Clear the preview mesh |
|
|
ClearSecondaryRenderMaterial() |
Clear the secondary material for the preview mesh. |
|
|
ClearTriangleColorFunction ( |
Clear the triangle color function for rendering / render data construction |
|
|
CreateInWorld ( |
Construction / destruction Create preview mesh in the World with the given transform |
|
|
DeferredEditMesh ( |
Apply EditFunc to the internal mesh, and update spatial data structure if requested, but do not update/rebuild rendering data structures. |
|
|
DisableSecondaryTriangleBuffers() |
Disable secondary triangle buffers |
|
|
Disconnect() |
Remove and destroy preview mesh |
|
|
EditMesh ( |
Apply EditFunc to the internal mesh and update internal data structures as necessary |
|
|
EnableSecondaryTriangleBuffers ( |
Enable secondary triangle buffers. |
|
|
EnableWireframe ( |
Visualization parameters Enable/disable wireframe overlay rendering |
|
|
TUniquePtr< ... |
ExtractPreviewMesh() |
|
|
FindNearestPoint |
Find nearest point on current mesh to given WorldPoint Requires that bBuildSpatialDataStructure = true unless bLinearSearch = true |
|
|
FindRayIntersection ( |
Find ray intersection with the preview mesh. |
|
|
ForceRebuildSpatial() |
Force rebuild of internal spatial data structure. |
|
|
UMaterialInt... |
GetActiveMaterial ( |
|
|
UMaterialInt... |
GetMaterial ( |
Get material from the preview mesh |
|
const FDynam... |
GetMesh() |
|
|
FSimpleMulti... |
GetOnMeshChanged() |
|
|
const FDynam... |
GetPreviewDynamicMesh() |
|
|
UPrimitiveCo... |
GetRootComponent() |
|
|
FMeshTangent... |
GetTangents() |
|
|
GetTransform() |
Get the current transform on the preview mesh |
|
|
InitializeMesh ( |
Initialize the internal mesh based on the given MeshDescription |
|
|
IsVisible() |
||
|
NotifyDeferredEditCompleted ( |
Notify that a DeferredEditMesh sequence is complete and cause update of rendering data structures. |
|
|
ReplaceMesh ( |
Edit access to internal mesh, and change-tracking/notification Replace mesh with new mesh |
|
|
SetMaterial ( |
Set material on the preview mesh |
|
|
SetMaterial ( |
Set material on the preview mesh |
|
|
SetMaterials ( |
Set the entire material set on the preview mesh |
|
|
SetOverrideRenderMaterial ( |
Set an override material for the preview mesh. This material will override all the given materials. |
|
|
SetSecondaryRenderMaterial ( |
Set an secondary material for the preview mesh. |
|
|
SetTangentsMode ( |
Set the tangents mode for the underlying component, if available. |
|
|
SetTransform ( |
Set the transform on the preview mesh |
|
|
SetTriangleColorFunction ( |
Set the triangle color function for rendering / render data construction |
|
|
SetVisible ( |
Set visibility state of the preview mesh |
|
|
TestRayIntersection ( |
Queries Test for ray intersection with the preview mesh. |
|
|
TUniquePtr< ... |
TrackedEditMesh ( |
Apply EditFunc to the internal mesh and update internal data structures as necessary. |
|
UpdatePreview ( |
Update the internal mesh by copying the given Mesh |
Name | Description | ||
---|---|---|---|
|
ApplyChange ( |
Apply/Revert a vertex deformation change to the internal mesh (implements IMeshVertexCommandChangeTarget) |
Name | Description | ||
---|---|---|---|
|
ApplyChange ( |
Apply/Revert a general mesh change to the internal mesh (implements IMeshCommandChangeTarget) |
Name | Description | ||
---|---|---|---|
|
ApplyChange ( |
Apply/Revert a general mesh change to the internal mesh (implements IMeshReplacementCommandChangeTarget) |
Name |
Description |
|
---|---|---|
|
ERenderUpdateMode |
Render data update hint |