Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
PUDynamicAttributeCurved Class Reference

This is a more complex usage of the DynamicAttribute principle. More...

Inherits PUDynamicAttribute.

Public Member Functions

 PUDynamicAttributeCurved (void)
 Constructor.
 
 PUDynamicAttributeCurved ()
 Constructor.
 
 PUDynamicAttributeCurved ()
 Constructor.
 
 PUDynamicAttributeCurved (const PUDynamicAttributeCurved &dynamicAttributeCurved)
 Copy constructor.
 
 PUDynamicAttributeCurved ( var dynamicAttributeCurved)
 Copy constructor.
 
 PUDynamicAttributeCurved ( local dynamicAttributeCurved)
 Copy constructor.
 
 ~PUDynamicAttributeCurved (void)
 Destructor.
 
void setInterpolationType (PUInterpolationType interpolationType)
 Sets the interpolation type. More...
 
PUInterpolationType getInterpolationType (void) const
 Gets the interpolation type. More...
 
virtual float getValue (float x=0) override
 override
 
var getValue ( var 0)
 override
 
local getValue ( local 0)
 override
 
virtual void addControlPoint (float x, float y)
 Add the control points. More...
 
local addControlPoint ( local x, local y)
 Add the control points. More...
 
const ControlPointList & getControlPoints (void) const
 Get the control points. More...
 
local getControlPoints ()
 Get the control points. More...
 
void processControlPoints (void)
 Process the control points.
 
var processControlPoints ()
 Process the control points.
 
local processControlPoints ()
 Process the control points.
 
size_t getNumControlPoints (void) const
 Get the number of control points. More...
 
void removeAllControlPoints (void)
 Remove all control points.
 
virtual PUDynamicAttributeCurvedclone () override
 override
 
local clone ()
 override
 
virtual void copyAttributesTo (PUDynamicAttribute *dynamicAttribute) override
 override
 
var copyAttributesTo ( var dynamicAttribute)
 override
 
local copyAttributesTo ( local dynamicAttribute)
 override
 
- Public Member Functions inherited from PUDynamicAttribute
 PUDynamicAttribute (void)
 Constructor.
 
virtual ~PUDynamicAttribute (void)
 Destructor.
 
DynamicAttributeType getType (void) const
 Get the type of dynamic attribute. More...
 
local getType ()
 Get the type of dynamic attribute. More...
 
void setType (DynamicAttributeType type)
 Set the type of dynamic attribute. More...
 
bool isValueChangedExternally (void) const
 Returns true if one of the attributes was changed by an external source. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
local retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor.
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

Detailed Description

This is a more complex usage of the DynamicAttribute principle.

This class returns a value on an curve. After setting a number of control points, this class is able to interpolate a point on the curve that is based on these control points. Interpolation is done in different flavours. linear?provides linear interpolation of a value on the curve, while spline?generates a smooth curve and the returns a value that lies on that curve.

Member Function Documentation

void setInterpolationType ( PUInterpolationType  interpolationType)

Sets the interpolation type.

The interpolation type.

var setInterpolationType ( var  interpolationType)

Sets the interpolation type.

The interpolation type.

local setInterpolationType ( local  interpolationType)

Sets the interpolation type.

The interpolation type.

PUInterpolationType
getInterpolationType
( void  ) const

Gets the interpolation type.

The interpolation type.

var getInterpolationType (   )

Gets the interpolation type.

The interpolation type.

local getInterpolationType (   )

Gets the interpolation type.

The interpolation type.

virtual void addControlPoint ( float  x,
float  y 
)
virtual

Add the control points.

The x value. The y value.

var addControlPoint ( var  x,
var  y 
)
virtual

Add the control points.

The x value. The y value.

local addControlPoint ( local  x,
local  y 
)
virtual

Add the control points.

The x value. The y value.

const ControlPointList&
getControlPoints
( void  ) const

Get the control points.

The all control points.

var getControlPoints (   )

Get the control points.

The all control points.

local getControlPoints (   )

Get the control points.

The all control points.

size_t getNumControlPoints ( void  ) const

Get the number of control points.

The number of control points.

var getNumControlPoints (   )

Get the number of control points.

The number of control points.

local getNumControlPoints (   )

Get the number of control points.

The number of control points.


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