GradientRenderDataInterface Class Reference

#include <gradient.h>

Detailed Description

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

Public Member Functions

MAXON_METHOD Color CalcGradientPixel (Float pos) const
 
MAXON_METHOD Int GetKnotCount () const
 
MAXON_METHOD const GradientKnotGetKnot (Int index) const
 
MAXON_METHOD const BaseArray< GradientKnot > & GetKnots () const
 
MAXON_METHOD COMPARERESULT Compare (const GradientRenderDataInterface *arg2) const
 
MAXON_METHOD HashInt GetHashCode () const
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (GradientRenderDataInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.gradientrenderdata")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( GradientRenderDataInterface  ,
MAXON_REFERENCE_COPY_ON_WRITE  ,
"net.maxon.interface.gradientrenderdata"   
)
private

◆ CalcGradientPixel()

MAXON_METHOD Color CalcGradientPixel ( Float  pos) const

Calculates a gradient pixel.

Parameters
[in]posThe X position.
Returns
The calculated gradient pixel.

◆ GetKnotCount()

MAXON_METHOD Int GetKnotCount ( ) const

Gets the number of knots for GetRenderKnot().

Returns
The render knot count.

◆ GetKnot()

MAXON_METHOD const GradientKnot* GetKnot ( Int  index) const

Gets a pointer to the knot at index.

Parameters
[in]indexThe knot index. 0 <= index < GetKnotCount()
Returns
The render knot at index. The gradient data owns the pointed knot.

◆ GetKnots()

MAXON_METHOD const BaseArray<GradientKnot>& GetKnots ( ) const

Gets a read only reference to internal knot list for fast access.

Returns
The knot list.

◆ Compare()

MAXON_METHOD COMPARERESULT Compare ( const GradientRenderDataInterface arg2) const

Compares this with another GradientRenderData value.

Parameters
[in]arg2The other GradientRenderData value to compare with.
Returns
The comparison result.

◆ GetHashCode()

MAXON_METHOD HashInt GetHashCode ( ) const

Gets the checksum of the gradient render data.

Returns
The checksum of the gradient render data.