cocos2d-x  3.5
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PUDynamicAttributeOscillate Class Reference

#include <CCPUDynamicAttribute.h>

Inheritance diagram for PUDynamicAttributeOscillate:
PUDynamicAttribute Ref

Public Types

enum  OscillationType { OSCT_SINE, OSCT_SQUARE }
 
- Public Types inherited from PUDynamicAttribute
enum  DynamicAttributeType { DAT_FIXED, DAT_RANDOM, DAT_CURVED, DAT_OSCILLATE }
 

Public Member Functions

 PUDynamicAttributeOscillate (void)
 Constructor. More...
 
 PUDynamicAttributeOscillate (const PUDynamicAttributeOscillate &dynamicAttributeOscillate)
 Copy constructor. More...
 
 ~PUDynamicAttributeOscillate (void)
 Destructor. More...
 
virtual float getValue (float x=0) override
 Todo. More...
 
OscillationType getOscillationType (void) const
 Get and set the OscillationType. More...
 
void setOscillationType (OscillationType oscillationType)
float getFrequency (void) const
 Get and set the Frequency. More...
 
void setFrequency (float frequency)
float getPhase (void) const
 Get and set the Phase. More...
 
void setPhase (float phase)
float getBase (void) const
 Get and set the Base. More...
 
void setBase (float base)
float getAmplitude (void) const
 Get and set the Amplitude. More...
 
void setAmplitude (float amplitude)
virtual
PUDynamicAttributeOscillate
clone () override
virtual void copyAttributesTo (PUDynamicAttribute *dynamicAttribute) override
- Public Member Functions inherited from PUDynamicAttribute
 PUDynamicAttribute (void)
 Constructor. More...
 
virtual ~PUDynamicAttribute (void)
 Destructor. More...
 
DynamicAttributeType getType (void) const
 Todo. More...
 
void setType (DynamicAttributeType type)
 Todo. 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...
 
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...
 
virtual ~Ref ()
 Destructor. More...
 

Protected Attributes

OscillationType _oscillationType
float _frequency
float _phase
float _base
float _amplitude
- Protected Attributes inherited from PUDynamicAttribute
DynamicAttributeType _type
bool _valueChangedExternally
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Member Enumeration Documentation

Enumerator
OSCT_SINE 
OSCT_SQUARE 

Constructor & Destructor Documentation

Constructor.

PUDynamicAttributeOscillate ( const PUDynamicAttributeOscillate dynamicAttributeOscillate)

Copy constructor.

Destructor.

Member Function Documentation

virtual
PUDynamicAttributeOscillate*
clone
( )
overridevirtual

Implements PUDynamicAttribute.

virtual void copyAttributesTo ( PUDynamicAttribute dynamicAttribute)
overridevirtual

Implements PUDynamicAttribute.

float getAmplitude ( void  ) const

Get and set the Amplitude.

float getBase ( void  ) const

Get and set the Base.

float getFrequency ( void  ) const

Get and set the Frequency.

OscillationType getOscillationType ( void  ) const

Get and set the OscillationType.

float getPhase ( void  ) const

Get and set the Phase.

virtual float getValue ( float  x = 0)
overridevirtual

Todo.

Implements PUDynamicAttribute.

void setAmplitude ( float  amplitude)
void setBase ( float  base)
void setFrequency ( float  frequency)
void setOscillationType ( OscillationType  oscillationType)
void setPhase ( float  phase)

Member Data Documentation

float _amplitude
protected
float _base
protected
float _frequency
protected
OscillationType _oscillationType
protected
float _phase
protected

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