Navigation
API > API/Plugins > API/Plugins/AvalancheShapes > API/Plugins/AvalancheShapes/DynamicMeshes
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UAvaShapeDynamicMeshBase
- UAvaShape2DDynMeshBase
- UAvaShape2DArrowDynamicMesh
- UAvaShapeChevronDynamicMesh
- UAvaShapeEllipseDynamicMesh
- UAvaShapeIrregularPolygonDynamicMesh
- UAvaShapeRectangleDynamicMesh
- UAvaShapeRingDynamicMesh
- UAvaShapeRoundedPolygonDynamicMesh
- UAvaShapeLineDynamicMesh
- UAvaShapeNGonDynamicMesh
- UAvaShapeStarDynamicMesh
- UAvaShape3DDynMeshBase
- UAvaShapeConeDynamicMesh
- UAvaShapeCubeDynamicMesh
- UAvaShapeSphereDynamicMesh
- UAvaShapeTorusDynamicMesh
References
| Module | AvalancheShapes |
| Header | /Engine/Plugins/Experimental/Avalanche/Source/AvalancheShapes/Public/DynamicMeshes/AvaShapeDynMeshBase.h |
| Include | #include "DynamicMeshes/AvaShapeDynMeshBase.h" |
Syntax
UCLASS (MinimalAPI, ClassGroup="Shape", Abstract, BlueprintType, CustomConstructor, EditInlineNew,
DefaultToInstanced, HideCategories=(Tags, Activation, Cooking, AssetUserData, Navigation))
class UAvaShapeDynamicMeshBase :
public UActorComponent ,
public IAvaInteractiveToolsModeDetailsObject ,
public IAvaGizmoObjectInterface
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bAllowEditSize | Enable mesh size property editing | |
| bool | bUsePrimaryMaterialEverywhere | Use primary material for every slot available | |
| TArray< FAvaSnapPoint > | LocalSnapPoints | ||
| TMap< int32, FAvaShapeMeshData > | MeshDatas | Meshes used for the current shape sections. | |
| ESizeType | SizeType | The type of size you want to handle | |
| float | UniformScaledSize | Uniform scaled size of the mesh. | |
| FLinearColor | VertexColor |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UAvaShapeDynamicMeshBase
(
const FObjectInitializer& ObjectInitializer |
|||
UAvaShapeDynamicMeshBase
(
const FLinearColor& InVertexColor, |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | Can we change the size of this shape | ||
| bool | ApplyUVsBoxProjection
(
FAvaShapeMesh& InMesh, |
Apply a box projection on a dynamic mesh section | |
| bool | ApplyUVsManually
(
FAvaShapeMesh& InMesh |
Sets the uvs manually on a dynamic mesh section | |
| bool | ApplyUVsPlanarProjection
(
FAvaShapeMesh& InMesh, |
Apply a planar projection on a dynamic mesh section | |
| bool | ApplyUVsTransform
(
FAvaShapeMesh& InMesh, |
Apply scale, offset, rotation on dynamic mesh section | |
| bool | Used to check for material changes in slot of DMC to match with our current material settings | ||
| bool | Clear the whole dynamic mesh | ||
| bool | ClearDynamicMeshSection
(
int32 MeshIndex |
Clear the dynamic mesh section with a specific index | |
| bool | ClearMesh () |
Clears the mesh sections that are dirty. | |
| bool | CreateColors
(
FAvaShapeMesh& InMesh |
Adds vertex colors to the vertex colour array. Does not empty it. | |
| bool | CreateDynamicMesh
(
FAvaShapeMesh& InMesh |
Creates a section in the dynamic mesh component. | |
| bool | CreateMesh
(
FAvaShapeMesh& InMesh |
Override this in child classes to create the mesh if it's visible | |
| bool | CreateUVs
(
FAvaShapeMesh& InMesh, |
Override this in child classes when you create UV for a specific mesh | |
| bool | ExportToStaticMesh
(
UStaticMesh* DestinationMesh |
Converts dynamic mesh to static mesh | |
| FAvaColorChangeData | |||
| EAvaAnchors | GetAnchorFromNumerics
(
const FVector2D& AnchorNumeric |
||
| void | Gets the bounds of the shape, override this in child classes for custom bounds Origin is the center of the box, BoxExtent is half the size, pivot is the default location of the pivot for this shape | ||
| FAvaShapeMaterialUVParameters * | GetInUseMaterialUVParams
(
int32 MeshIndex |
||
| const FAvaShapeMaterialUVParameters * | GetInUseMaterialUVParams
(
int32 MeshIndex |
||
| void | GetLocalSnapPoints
(
TArray< FAvaSnapPoint >& Points |
||
| TArray< FAvaSnapPoint > | Generate a list of 3d-space snap points for this shape. | ||
| UMaterialInterface * | GetMaterial
(
int32 MeshIndex |
||
| bool | GetMaterialHorizontalFlip
(
int32 MeshIndex |
||
| EMaterialType & | GetMaterialType
(
int32 MeshIndex |
||
| const FVector2D & | GetMaterialUVAnchor
(
int32 MeshIndex |
||
| EAvaAnchors | GetMaterialUVAnchorPreset
(
int32 MeshIndex |
||
| EAvaShapeUVMode | GetMaterialUVMode
(
int32 MeshIndex |
Helper function to quickly get what you need instead of using GetMeshData() | |
| const FVector2D & | GetMaterialUVOffset
(
int32 MeshIndex |
||
| FAvaShapeMaterialUVParameters * | GetMaterialUVParams
(
int32 MeshIndex |
||
| const FAvaShapeMaterialUVParameters * | GetMaterialUVParams
(
int32 MeshIndex |
||
| float | GetMaterialUVRotation
(
int32 MeshIndex |
||
| const FVector2D & | GetMaterialUVScale
(
int32 MeshIndex |
||
| bool | GetMaterialVerticalFlip
(
int32 MeshIndex |
||
| FAvaShapeMeshData * | GetMeshData
(
int32 MeshIndex |
Find a registered mesh and gets a pointer to it | |
| const TArray< UMaterialInterface * > | Returns the materials used by every mesh | ||
| FName | GetMeshDataName
(
int32 InMeshIndex |
Returns the name of the mesh | |
| TArray< FName > | Returns the name of the meshes | ||
| TSet< int32 > | Get the registered meshes indexes | ||
| const FString & | GetMeshName () |
Get the name of the shape | |
| const FVector & | |||
| EAvaDynamicMeshUpdateState | |||
| FVector2D | GetNumericsFromAnchor
(
EAvaAnchors AnchorEnum |
||
| const FAvaShapeParametricMaterial * | GetParametricMaterial
(
int32 MeshIndex |
||
| FAvaShapeParametricMaterial * | GetParametricMaterial
(
int32 MeshIndex |
||
| AAvaShapeActor * | Converts the Outer of this object to a AAvaShapeActor. | ||
| UDynamicMeshComponent * | Gets the Dynamic Mesh component from the Shape actor, this will load it if its nullptr. | ||
| const FVector & | GetSize3D () |
||
| FTransform | GetTransform () |
||
| float | |||
| bool | |||
| bool | |||
| bool | HasSameTopology
(
FAvaShapeMesh& InMesh |
Checks whether the topology of the mesh has changed (different vertices count and different triangles count than current) | |
| void | Clears everything and reinitialize the DM to use it properly | ||
| void | InvalidateSection
(
bool& bInvalidatedSection, |
Invalidates a section and runs the mesh update if necessary. | |
| bool | Checks to see if attributes are initialized and mesh is ready | ||
| bool | IsMaterialType
(
int32 MeshIndex, |
||
| bool | IsMeshDirty
(
int32 MeshIndex |
Returns whether the mesh is dirty, called before creating mesh if visible | |
| bool | Checks if shape size is render-able and not minimal | ||
| bool | IsMeshVisible
(
int32 MeshIndex |
Override this in child classes, called before creating mesh if visible | |
| bool | IsValidMeshIndex
(
int32 MeshIndex |
Checks if the mesh section is valid | |
| void | Flag all mesh sections dirty to regenerate them | ||
| void | MarkMeshDirty
(
int32 MeshIndex |
Flag a mesh section dirty to regenerate it | |
| void | Only update vertices from mesh | ||
| void | OnAssetDropped
(
UObject* DroppedObj, |
Triggers when we drop an asset (material) onto our actor | |
| void | OnColorPicked
(
const FAvaColorChangeData& InNewColorData |
||
| void | OnMaterialChanged
(
int32 MaterialIndex |
||
| void | OnMaterialTypeChanged
(
int32 MaterialIndex |
||
| void | OnMeshChanged
(
int32 MeshIndex |
||
| bool | OnMeshSectionUpdated
(
FAvaShapeMesh& InMesh |
||
| void | Called once the mesh is done updating | ||
| void | OnParametricMaterialChanged
(
FAvaShapeParametricMaterial& InMaterial |
When a parametric material is updated. | |
| void | OnParametricMaterialChanged
(
int32 MaterialIndex |
||
| void | Called once the pixel size has changed, only in editor | ||
| void | OnRegisteredMesh
(
int32 MeshIndex |
Called when a new mesh has been registered | |
| void | Called when all the meshes have been registered and the setup is done | ||
| void | Override this in child classes | ||
| void | Override this in child classes, for 2D and 3D shape to update the scale | ||
| void | OnUsesPrimaryUVParamsChanged
(
int32 MeshIndex |
||
| void | OnUVParamsChanged
(
int32 MeshIndex |
||
| void | |||
| bool | RegisterMesh
(
FAvaShapeMeshData& NewMeshData |
Call to register meshes used for this shape, call this inside RegisterMeshes() | |
| void | Override this in child classes, to register new meshes | ||
| void | RequireUpdate
(
bool bDoAsync |
Runs the update for this mesh, async by default | |
| void | ScaleVertices
(
const FVector2D& InScale |
||
| void | ScaleVertices
(
const FVector& InScale |
Scale the vertices on all sections of the mesh | |
| bool | SetAlignmentSize
(
AActor* InActor, |
||
| bool | SetMaterial
(
int32 MeshIndex, |
||
| bool | SetMaterialDirect
(
int32 MeshIndex, |
||
| bool | SetMaterialHorizontalFlip
(
int32 MeshIndex, |
||
| bool | SetMaterialType
(
int32 MeshIndex, |
||
| bool | SetMaterialUVAnchor
(
int32 MeshIndex, |
||
| bool | SetMaterialUVAnchorPreset
(
int32 MeshIndex, |
||
| bool | SetMaterialUVMode
(
int32 MeshIndex, |
||
| bool | SetMaterialUVOffset
(
int32 MeshIndex, |
||
| bool | SetMaterialUVParams
(
int32 MeshIndex, |
||
| bool | SetMaterialUVRotation
(
int32 MeshIndex, |
||
| bool | SetMaterialUVScale
(
int32 MeshIndex, |
||
| bool | SetMaterialVerticalFlip
(
int32 MeshIndex, |
||
| void | SetMeshRegenWorldLocation
(
const FVector& NewLocation, |
||
| bool | SetOverridePrimaryUVParams
(
int32 MeshIndex, |
Allows custom uv params per mesh section instead of using the primary one. | |
| bool | SetParametricMaterial
(
int32 MeshIndex, |
Internal materials are not copied over, only settings. | |
| void | SetShapeComponentMaterial
(
int32 InMaterialIndex, |
Changes the material on the shape component and keeps the MDI up to date. | |
| void | Override in child classes, represents the mesh size | ||
| void | SetUniformScaledSize
(
float InSize |
||
| void | SetupMeshes () |
Register all meshes once, calls RegisterMeshes() | |
| void | SetUsePrimaryMaterialEverywhere
(
bool bInUse |
Primary material override. | |
| void | ToggleGizmo_Implementation
(
const UAvaGizmoComponent* InGizmoComponent, |
||
| bool | UpdateColors () |
Performs a vertex-colour-only update. Then calls OnMeshUpdate to the PMC. | |
| void | Takes all dirty flags, regenerate whatever is needed and updates the DMC, called by RunUpdate or RequireUpdate. | ||
| bool | UpdateDynamicMesh
(
FAvaShapeMesh& InMesh |
Updates a section in the dynamic mesh component. | |
| void | Special case when the mesh is scaled, rather than reconfigured. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | Called when a component is created (not loaded). This can happen in the editor or during gameplay | ||
| void | OnComponentDestroyed
(
bool bDestroyingHierarchy |
Called when a component is destroyed | |
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostDuplicate
(
EDuplicateMode::Type DuplicateMode |
||
| void | PostEditChangeChainProperty
(
FPropertyChangedChainEvent& PropertyChangedEvent |
This alternate version of PostEditChange is called when properties inside structs are modified. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization | ||
| void | PostEditUndo () |
Called after applying a transaction to the object. | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | PreEditUndo () |
Called before applying a transaction to the object. |