Navigation
API > API/Plugins > API/Plugins/ChaosVD
Generates Dynamic mesh components and dynamic meshes based on Chaos implicit object data
| Name | FChaosVDGeometryBuilder |
| Type | class |
| Header File | /Engine/Plugins/ChaosVD/Source/ChaosVD/Public/ChaosVDGeometryBuilder.h |
| Include Path | #include "ChaosVDGeometryBuilder.h" |
Syntax
class FChaosVDGeometryBuilder :
public FGCObject ,
public TSharedFromThis< FChaosVDGeometryBuilder >
Inheritance Hierarchy
- FGCObject → FChaosVDGeometryBuilder
- FSharedFromThisBase → TSharedFromThis → FChaosVDGeometryBuilder
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FChaosVDGeometryBuilder() |
ChaosVDGeometryBuilder.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FChaosVDGeometryBuilder() |
ChaosVDGeometryBuilder.h |
Structs
| Name | Remarks |
|---|---|
| FSourceGeometryHashCache |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BasicShapesMeshes | TObjectPtr< UStaticMesh > | ChaosVDGeometryBuilder.h | ||
| bInitialized | bool | ChaosVDGeometryBuilder.h | ||
| ComponentMeshPool | FChaosVDMeshComponentPool | Instance of uninitialized mesh components pool | ChaosVDGeometryBuilder.h | |
| GameThreadTickDelegate | FTSTicker::FDelegateHandle | Handle to the ticker used to ticker the Geometry Builder in the game thread | ChaosVDGeometryBuilder.h | |
| GeometryBeingGeneratedByKey | TMap< uint32, TSharedPtr< FChaosVDGeometryGenerationTask > > | Set of all geometry keys of the Meshes that are being generated but not ready yet | ChaosVDGeometryBuilder.h | |
| GeometryCacheRWLock | FRWLock | Used to lock Read or Writes to the Geometry cache and in flight job tracking containers | ChaosVDGeometryBuilder.h | |
| GeometryTasksPendingLaunch | TUniquePtr< FObjectsWaitingProcessingQueue< TSharedPtr< FChaosVDGeometryGenerationTask > > > | ChaosVDGeometryBuilder.h | ||
| InstancedMeshComponentByGeometryKey | TMap< uint32, UChaosVDInstancedStaticMeshComponent * > | Map containing already initialized Instanced static mesh components for any given geometry key | ChaosVDGeometryBuilder.h | |
| MeshComponentsPendingDisposal | TArray< TObjectPtr< UMeshComponent > > | Components that need to be processed and added to the pool in the next frame | ChaosVDGeometryBuilder.h | |
| MeshComponentsWaitingForGeometry | TUniquePtr< FObjectsWaitingGeometryList< FMeshComponentWeakPtr > > | Object containing all the meshes component waiting for geometry, by geometry key | ChaosVDGeometryBuilder.h | |
| MeshComponentsWaitingForMaterial | TUniquePtr< FObjectsWaitingProcessingQueue< FMeshComponentWeakPtr > > | ChaosVDGeometryBuilder.h | ||
| MirroredInstancedMeshComponentByGeometryKey | TMap< uint32, UChaosVDInstancedStaticMeshComponent * > | Map containing already initialized Instanced static mesh components for mesh instances that required a negative scale transform, for any given geometry key | ChaosVDGeometryBuilder.h | |
| SceneWeakPtr | TWeakPtr< FChaosVDScene > | Weak Ptr to the CVD scene owning this geometry builder | ChaosVDGeometryBuilder.h | |
| SourceGeometryCache | FSourceGeometryHashCache | ChaosVDGeometryBuilder.h | ||
| StaticMeshCacheMap | TMap< uint32, TObjectPtr< UStaticMesh > > | Map containing already generated static mesh for any given implicit object | ChaosVDGeometryBuilder.h | |
| TranslucentInstancedMeshComponentByGeometryKey | TMap< uint32, UChaosVDInstancedStaticMeshComponent * > | Map containing already initialized Instanced static mesh components ready to be use with translucent materials, for any given geometry key | ChaosVDGeometryBuilder.h | |
| TranslucentMirroredInstancedMeshComponentByGeometryKey | TMap< uint32, UChaosVDInstancedStaticMeshComponent * > | Map containing already initialized Instanced static mesh components for mesh instances that required a negative scale transform and use a translucent material, for any given geometry key | ChaosVDGeometryBuilder.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AdjustedTransformForImplicit
(
const Chaos::FImplicitObject* InImplicit, |
Re-adjust the provided transform if needed, so it can be visualized properly with its generated mesh | ChaosVDGeometryBuilder.h | |
TSharedPtr< FChaosVDInstancedMeshData > CreateMeshDataInstance
(
const FChaosVDParticleDataWrapper& InOwningParticleData, |
Finds or creates a Mesh component for the geometry data handle provided, and add a new instance of that geometry to it | ChaosVDGeometryBuilder.h | |
void CreateMeshesFromImplicitObject
(
const Chaos::FImplicitObject* InImplicitObject, |
Creates Dynamic Mesh components for each object within the provided Implicit object | ChaosVDGeometryBuilder.h | |
TSharedPtr< UE::Geometry::FMeshShapeGenerator > CreateMeshGeneratorForImplicitObject
(
const Chaos::FImplicitObject* InImplicit, |
Creates a mesh generator for the provided Implicit object which will be used to create a Static Mesh | ChaosVDGeometryBuilder.h | |
void DeInitialize() |
ChaosVDGeometryBuilder.h | ||
void DestroyMeshComponent
(
UMeshComponent* MeshComponent |
Destroys a Mesh component that will not longer be used. | ChaosVDGeometryBuilder.h | |
UStaticMesh * GetCachedMeshForImplicit
(
const uint32 GeometryCacheKey |
Returns an already mesh for the provided implicit object if exists, otherwise returns null | ChaosVDGeometryBuilder.h | |
void HandleNewGeometryData
(
const Chaos::FConstImplicitObjectPtr& Geometry, |
ChaosVDGeometryBuilder.h | ||
bool HasGeometryInCache
(
uint32 GeometryKey |
Return true if we have cached geometry for the provided Geometry Key | ChaosVDGeometryBuilder.h | |
bool HasGeometryInCache_AssumesLocked
(
uint32 GeometryKey |
ChaosVDGeometryBuilder.h | ||
bool ImplicitObjectNeedsUnpacking
(
const Chaos::FImplicitObject* InImplicitObject |
Returns true if the implicit object if of one of the types we need to unpack before generating a mesh for it | ChaosVDGeometryBuilder.h | |
void Initialize
(
const TWeakPtr< FChaosVDScene >& ChaosVDScene |
ChaosVDGeometryBuilder.h | ||
void RequestMaterialUpdate
(
UMeshComponent* MeshComponent |
Enqueues a component to have its material updated based on its configuration | ChaosVDGeometryBuilder.h | |
const Chaos::FImplicitObject * UnpackImplicitObject
(
const Chaos::FImplicitObject* InImplicitObject, |
Unwraps the provided Implicit object into the object it self so a mesh can be generated from it | ChaosVDGeometryBuilder.h | |
void UpdateMeshDataInstance
(
const TSharedRef< FChaosVDInstancedMeshData >& InHandleToUpdate, |
Finds or creates a Mesh component compatible with the provided mesh data handle, and updates the handle to use that new component. | ChaosVDGeometryBuilder.h |
Overridden from FGCObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
ChaosVDGeometryBuilder.h | ||
virtual FString GetReferencerName() |
ChaosVDGeometryBuilder.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool DoesImplicitContainType
(
const Chaos::FImplicitObject* InImplicitObject, |
Evaluates an Implicit objects and returns true if it contains an object of the specified type | ChaosVDGeometryBuilder.h | |
static bool HasNegativeScale
(
const Chaos::FRigidTransform3& InTransform |
Evaluates the provided transform's scale, and returns true if the scale has a negative component | ChaosVDGeometryBuilder.h |