Class: UTrilerpMeshComponent

//  TrilerpMeshComponent.h : 41

class NBTRILINEARINTERPOLATION_API UTrilerpMeshComponent
    : public UDynamicMeshComponent;

Reflection-enabled

Specifiers:

  • ClassGroup = Rendering

Meta Specifiers:

  • BlueprintSpawnableComponent

A DynamicMeshComponent which supports trilinear interpolation of the underlying mesh.


Properties

  • Lattice

    public:
    TArray<FVector> Lattice;
    

    Reflection-enabled

    Specifiers:

    • BlueprintReadWrite
    • EditAnywhere
    • EditFixedSize
    • Category = NBTrilinearInterpolation

    Offsets from interpolation lattice corners. Do not modify length.

    First four values represent the bottom four corners, second four the top four corners.

    Because this is a list of offsets, if all vectors are zero the trilinear interpolation will not modify the mesh, it will just return the original vertex positions.

    lattice corner indices

  • SourceBounds

    public:
    FBoxSphereBounds SourceBounds;
    

    Reflection-enabled

    Specifiers:

    • BlueprintReadOnly
    • Category = NBTrilinearInterpolation

    The bounds of the source mesh this component was initialized with.

Constructors


Methods

  • Centroid

    //  TrilerpMeshComponent.h : 166
    
    protected:
    FVector Centroid(
        FVector a,
        FVector b,
        FVector c,
        FVector d
    ) const;
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Computes the centroid of four points.

    All four points are assumed to be in the same coordinate frame.


    Arguments

    • a

      FVector a
      
    • b

      FVector b
      
    • c

      FVector c
      
    • d

      FVector d
      

    Returns

    • FVector
      
  • DebugDrawLattice

    //  TrilerpMeshComponent.h : 157
    
    public:
    void DebugDrawLattice(
        float Lifetime
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Visualizes the current lattice configuration.


    Arguments

  • GetCentroid

    //  TrilerpMeshComponent.h : 112
    
    public:
    FVector GetCentroid(
        const ELatticeFace Face
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Computes the centroid (in world-space) of the specified lattice face.


    Arguments

    • Face

      const ELatticeFace Face
      


    Returns

    • FVector
      
  • GetCornersWS

    //  TrilerpMeshComponent.h : 99
    
    public:
    TArray<FVector> GetCornersWS() const;
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Gets the world-space positions of the Lattice corners (including offsets)


    Returns

    • TArray<FVector>
      

      lattice corner indices

  • GetSourceCornersWS

    //  TrilerpMeshComponent.h : 106
    
    public:
    TArray<FVector> GetSourceCornersWS() const;
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Gets the world-space positions of the untransformed Lattice corners. i.e. the original/base position based on the input mesh bounds.


    Returns

    • TArray<FVector>
      

      lattice corner indices

  • InitFromDynamicMesh

    //  TrilerpMeshComponent.h : 78
    
    public:
    bool InitFromDynamicMesh(
        UDynamicMesh* Mesh
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Initializes the dynamic mesh from another given dynamic mesh.


    Arguments

    • Mesh

      UDynamicMesh* Mesh
      

      Mesh to copy


    Returns

    • bool
      

      True if copying the mesh data was successful, otherwise false

  • InitFromSkeletalMesh

    //  TrilerpMeshComponent.h : 70
    
    public:
    bool InitFromSkeletalMesh(
        USkeletalMesh* Mesh
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Initializes the dynamic mesh from a given skeletal mesh.


    Arguments

    • Mesh

      USkeletalMesh* Mesh
      

      Mesh to copy


    Returns

    • bool
      

      True if copying the mesh data was successful, otherwise false

  • InitFromStaticMesh

    //  TrilerpMeshComponent.h : 62
    
    public:
    bool InitFromStaticMesh(
        UStaticMesh* Mesh,
        EIncludeCollisionType IncludeCollision = EIncludeCollisionType::NONE
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Initializes the dynamic mesh from a given static mesh.


    Arguments

    • Mesh

      UStaticMesh* Mesh
      

      Mesh to copy

    • IncludeCollision

      EIncludeCollisionType IncludeCollision = EIncludeCollisionType::NONE
      

      Whether to copy and process the mesh's collision data as well


    Returns

    • bool
      

      True if copying the mesh data was successful, otherwise false

  • OnRegister

    //  TrilerpMeshComponent.h : 49
    
    public:
    virtual void OnRegister() override;
    
  • PostEditChangeChainProperty

    //  TrilerpMeshComponent.h : 52
    
    public:
    virtual void PostEditChangeChainProperty(
        FPropertyChangedChainEvent& PropertyChangedEvent
    ) override;
    

    Arguments

  • PostEditUndo

    //  TrilerpMeshComponent.h : 53
    
    public:
    virtual void PostEditUndo() override;
    
  • RotateFace

    //  TrilerpMeshComponent.h : 150
    
    public:
    void RotateFace(
        const ELatticeFace Face,
        const FRotator& Rotation
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Applies a rotation to one whole side of the lattice, relative to its current orientatoin, around the centroid of the face vertices.

    Calls UpdateMesh.


    Arguments

    • Face

      const ELatticeFace Face
      

    • Rotation

      const FRotator& Rotation
      
  • ScaleFace

    //  TrilerpMeshComponent.h : 141
    
    public:
    void ScaleFace(
        const ELatticeFace Face,
        const FVector& Scale
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Scales a face by moving its corners relative to their centroid.

    Calls UpdateMesh.


    Arguments

    • Face

      const ELatticeFace Face
      

    • Scale

      const FVector& Scale
      
  • SetFaceTranslation

    //  TrilerpMeshComponent.h : 133
    
    public:
    void SetFaceTranslation(
        const ELatticeFace Face,
        const FVector& Translation
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Sets the translation (absolute movement) of one whole side of the lattice, relative to the base position of the vertices on that face.

    Given translation is expected to be in world space.

    Calls UpdateMesh.


    Arguments

  • SetLatticeWS

    //  TrilerpMeshComponent.h : 93
    
    public:
    void SetLatticeWS(
        TArray<FVector> WSLattice
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Sets the lattice corners to the given world-space coordinates.


    Arguments

    • WSLattice

      TArray<FVector> WSLattice
      

      New lattice points, in world-space. Should have length 8.

      lattice corner indices

  • TranslateFace

    //  TrilerpMeshComponent.h : 122
    
    public:
    void TranslateFace(
        const ELatticeFace Face,
        const FVector& DeltaTranslation
    );
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Applies a translation (relative movement) to one whole side of the lattice.

    Given translation is expected to be in world space.

    Calls UpdateMesh.


    Arguments

  • UpdateMesh

    //  TrilerpMeshComponent.h : 86
    
    public:
    void UpdateMesh();
    

    Reflection-enabled

    Specifiers:

    • BlueprintCallable
    • Category = NBTrilinearInterpolation

    Updates the underlying mesh data to match the current Lattice configuration.

    Should be called whenever Lattice has been modified to keep the mesh up-to-date.






For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com