SplineMapperInterface Class Reference Data Types

#include <splinemapper.h>

详细描述

This is the interface for the SplineMapper data type. The data is reference-counted and a copy will automatically be created if a non-const function is called.

公共成员函数

MAXON_METHOD Vector2d   GetPoint ( Float positionX) const
MAXON_METHOD void  GetRange ( Vector2d &min, Vector2d &max) const
MAXON_METHOD void  SetRange (const Vector2d &min, const Vector2d &max)
MAXON_METHOD void  AdaptRange (const Vector2d &min, const Vector2d &max)
MAXON_METHOD Float   GetTension () const
MAXON_METHOD void  SetTension ( Float tension)
MAXON_METHOD Int   GetKnotCount () const
MAXON_METHOD SplineMapperKnot GetKnot ( Int knotIndex)
MAXON_METHOD Bool   SetKnot ( Int knotIndex, const SplineMapperKnot &knot)
MAXON_METHOD Bool   IsEqual (const SplineMapperInterface *other, EQUALITY equality) const
MAXON_METHOD HashInt   GetHashCode () const
MAXON_METHOD Result < void >  InsertKnot ( Int knotIndex, const SplineMapperKnot &knot)
MAXON_METHOD Result < Int InsertKnot ( Float x, Float y, SPLINEMAPPER_KNOT_FLAGS flags, Bool adaptTangents)
MAXON_METHOD Result < void >  DeleteKnot ( Int knotIndex)
MAXON_METHOD void  DeleteAllKnots ()
const MAXON_METHOD BaseArray < SplineMapperKnot > &  GetKnots () const
MAXON_METHOD BaseArray < SplineMapperKnot > *  GetKnotsRW ()
MAXON_METHOD void  SortKnots ()
MAXON_METHOD Vector2d   ClampPosition (const Vector2d &position) const

静态公共成员函数

static MAXON_METHOD Result < void >  DescribeIO (const DataSerializeInterface &stream)

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( SplineMapperInterface , MAXON_REFERENCE_COPY_ON_WRITE , "net.maxon.interface.splinemapper")

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( SplineMapperInterface   ,
MAXON_REFERENCE_COPY_ON_WRITE   ,
"net.maxon.interface.splinemapper"   
)
private

◆  GetPoint()

MAXON_METHOD Vector2d GetPoint ( Float   positionX ) const

Gets a point from its X coordinate. If out of range, the first or last spline knots will be returned.

注意
Make sure knots are sorted before calling this (
另请参阅
SortKnots )
参数
[in] positionX The X coordinate.
返回
The retrieved position.

◆  GetRange()

MAXON_METHOD void GetRange ( Vector2d min ,
Vector2d max  
) const

◆  SetRange()

MAXON_METHOD void SetRange ( const Vector2d min ,
const Vector2d max  
)

◆  AdaptRange()

MAXON_METHOD void AdaptRange ( const Vector2d min ,
const Vector2d max  
)

◆  GetTension()

MAXON_METHOD Float GetTension ( ) const

◆  SetTension()

MAXON_METHOD void SetTension ( Float   tension )

◆  GetKnotCount()

MAXON_METHOD Int GetKnotCount ( ) const

◆  GetKnot()

MAXON_METHOD SplineMapperKnot * GetKnot ( Int   knotIndex )

◆  SetKnot()

MAXON_METHOD Bool SetKnot ( Int   knotIndex ,
const SplineMapperKnot knot  
)

◆  IsEqual()

MAXON_METHOD Bool IsEqual ( const SplineMapperInterface other ,
EQUALITY   equality  
) const

Compares this SplineMapper with another if both are identical.

参数
[in] other The other SplineMapper to compare this object with.
返回
True if the object is identical.

◆  GetHashCode()

MAXON_METHOD HashInt GetHashCode ( ) const

Returns a hash code for this SplineMapper which depends on the content.

返回
Hash code for the SplineMapper.

◆  InsertKnot() [1/2]

MAXON_METHOD Result <void> InsertKnot ( Int   knotIndex ,
const SplineMapperKnot knot  
)

Inserts a new knot at index position (0 <= position <= GetCount() ).

参数
[in] knotIndex Insert index (the internal array size will increase and if (0 <= position < GetCount() ), the existing elements are moved, but if (position == GetCount() ), then element is appended to the end).
[in] knot The knot to insert

◆  InsertKnot() [2/2]

MAXON_METHOD Result < Int > InsertKnot ( Float   x ,
Float   y ,
SPLINEMAPPER_KNOT_FLAGS   flags ,
Bool   adaptTangents  
)

◆  DeleteKnot()

MAXON_METHOD Result <void> DeleteKnot ( Int   knotIndex )

◆  DeleteAllKnots()

MAXON_METHOD void DeleteAllKnots ( )

◆  GetKnots()

const MAXON_METHOD BaseArray < SplineMapperKnot >& GetKnots ( ) const

Gets the internal array for read-only operations.

返回
Reference to internal array.

◆  GetKnotsRW()

MAXON_METHOD BaseArray < SplineMapperKnot >* GetKnotsRW ( )

Gets the internal array for read/write operations.

返回
Pointer to internal array. It's guaranteed to be valid.

◆  SortKnots()

MAXON_METHOD void SortKnots ( )

Sorts the knots by its position X. Call this when an new knot is added or if a knot postion X has been modified.

◆  ClampPosition()

MAXON_METHOD Vector2d ClampPosition ( const Vector2d position ) const

Clamps a position to the defined range (

另请参阅
GetRange() , SetRange() ).
参数
[in] position The position.
返回
The clamped position.

◆  DescribeIO()

static MAXON_METHOD Result <void> DescribeIO ( const DataSerializeInterface stream )
static

Describe all elements of this class for I/O operations.

参数
[in] stream The stream that is used to register the class members.
返回
OK on success.