SplineMapperKnot Struct Reference

#include <splinemapper.h>

Detailed Description

Represents a generator point in a spline.

Public Member Functions

Bool operator== (const SplineMapperKnot &k) const
 
Bool operator!= (const SplineMapperKnot &k) const
 
HashInt GetHashCode () const
 

Static Public Member Functions

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

Public Attributes

Vector2d position
 
SPLINEMAPPER_KNOT_INTERPOLATION_TYPE interpolation
 
Vector2d tangentLeft
 
Vector2d tangentRight
 
SPLINEMAPPER_KNOT_FLAGS flags
 

Member Function Documentation

◆ operator==()

Bool operator== ( const SplineMapperKnot k) const

Equality operator. Checks if two knots are equal.

Parameters
[in]kA spline knot.
Returns
true if the knots are equal, otherwise false.

◆ operator!=()

Bool operator!= ( const SplineMapperKnot k) const

Inequality operator. Checks if two knots are not equal.

Parameters
[in]kA spline knot.
Returns
true if the knots are not equal, otherwise false.

◆ GetHashCode()

HashInt GetHashCode ( ) const

◆ DescribeIO()

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

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

Parameters
[in]streamThe stream that is used to register the class members.
Returns
OK on success.

Member Data Documentation

◆ position

Vector2d position

Position. To make sure position of new/modified knots are inside spline range (.

See also
SplineMapper::GetRange(). SplineMapper::SetRange()) , use SplineMapper::ClampPosition().

◆ interpolation

Interpolation.

◆ tangentLeft

Vector2d tangentLeft

Left Tangent. Used only with Bezier interpolation type. Ignored by first point.

◆ tangentRight

Vector2d tangentRight

Right Tangent. Used only with Bezier interpolation type. Ignored by last point.

◆ flags

Note
Flag settings for Bezier interpolation.
See also
SPLINEMAPPER_KNOT_FLAGS. The flags must be accessed using |= and &=. Also contains the point ID.
The point ID must only be retrieved using the helpers SPLINE_KNOT_GET_ID() and SPLINE_KNOT_SET_ID()