FI3DHSplineData Struct Reference

instant3Dhub: FI3DHSplineData Struct Reference
instant3Dhub
FI3DHSplineData Struct Reference

#include "I3DHSplineData.h"

+ Collaboration diagram for FI3DHSplineData:

Detailed Description

Raw data of a single spline created by the AI3DHDrawingEditor.

Public Member Functions

int32 GetSliceSize (const int32 SliceId) const
 
TConstArrayView< FVector > GetSlicePoints (const int32 SliceId) const
 
TArrayView< FVector > GetSlicePoints (const int32 SliceId)
 
int32 FindSliceId (const int32 PointIndex) const
 

Public Attributes

TArray< FVector > Points
 
TArray< int32 > SliceIndices
 
FLinearColor Color { FLinearColor::Black }
 
double Scale { 1 }
 

Member Function Documentation

◆ FindSliceId()

int32 FI3DHSplineData::FindSliceId ( const int32 PointIndex) const
inline

Searches the SliceId the given PointIndex is contained in using Binary Search.

Parameters
PointIndexZero-based index of the point.
Returns
SliceId the Point is contained in or -1 if there are no Slices.

◆ GetSlicePoints() [1/2]

TArrayView< FVector > FI3DHSplineData::GetSlicePoints ( const int32 SliceId)
inline

Constructs a View of all Points belonging to the given SliceId.

Points are mutable.

Parameters
SliceIdIdentifier for the slice.
Returns
The slice points.

◆ GetSlicePoints() [2/2]

TConstArrayView< FVector > FI3DHSplineData::GetSlicePoints ( const int32 SliceId) const
inline

Constructs a View of all Points belonging to the given SliceId.

Parameters
SliceIdIdentifier for the slice.
Returns
The slice points.

◆ GetSliceSize()

int32 FI3DHSplineData::GetSliceSize ( const int32 SliceId) const
inline

Returns the Size of the given SliceId.

Parameters
SliceIdIdentifier for the slice.
Returns
The slice size.

Member Data Documentation

◆ Points

TArray<FVector> FI3DHSplineData::Points

List of Points of the Spline.

While Editing Points are relative to the DrawingEditor. After finalizing Points are relative to the Parent which is usually the HubConnector.

◆ SliceIndices

TArray<int32> FI3DHSplineData::SliceIndices

Sorted list of Indices into Points Array defining Slices of a Spline.

  • A slice is defined by a StartIndex into the Points Array and the next Slice.
  • If Points is not empty, there exists at least 1 Slice. Example for 8 Points:
  • SliceIndices: 0, 3, 6
  • Slice 0 contains Points 0, 1, 2
  • Slice 1 contains Points 3, 4, 5
  • Slice 2 contains Points 6, 7.
    See also
    GetSliceSize, GetSlicePoints

The documentation for this struct was generated from the following file: