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

#include <CCPURender.h>

Inheritance diagram for PUParticle3DQuadRender:
PUParticle3DEntityRender PURender Particle3DRender Ref

Public Types

enum  Type {
  POINT, ORIENTED_COMMON, ORIENTED_SELF, ORIENTED_SHAPE,
  PERPENDICULAR_COMMON, PERPENDICULAR_SELF
}
 
enum  Origin {
  TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT,
  CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER,
  BOTTOM_RIGHT
}
 
enum  RotateType { TEXTURE_COORDS, VERTEX }
 

Public Member Functions

void setType (Type type)
Type getType () const
void setOrigin (Origin origin)
var setOrigin ( var origin)
local setOrigin ( local origin)
Origin getOrigin () const
void setRotateType (RotateType type)
RotateType getRotateType () const
void setCommonDirection (const Vec3 &dir)
var setCommonDirection ( var dir)
local setCommonDirection ( local dir)
const Vec3getCommonDirection () const
void setCommonUp (const Vec3 &up)
const Vec3getCommonUp () const
unsigned short getTextureCoordsRows () const
void setTextureCoordsRows (unsigned short textureCoordsRows)
unsigned short getTextureCoordsColumns () const
void setTextureCoordsColumns (unsigned short textureCoordsColumns)
unsigned int getNumTextureCoords ()
virtual void render (Renderer *renderer, const Mat4 &transform, ParticleSystem3D *particleSystem) override
local render ( local renderer, local transform, local particleSystem)
virtual PUParticle3DQuadRenderclone () override
virtual void copyAttributesTo (PURender *render) override
var copyAttributesTo ( var render)
local copyAttributesTo ( local render)
virtual ~PUParticle3DQuadRender ()
- Public Member Functions inherited from PUParticle3DEntityRender
virtual void setDepthTest (bool isDepthTest) override
var setDepthTest ( var isDepthTest)
local setDepthTest ( local isDepthTest)
virtual void setDepthWrite (bool isDepthWrite) override
local setDepthWrite ( local isDepthWrite)
virtual ~PUParticle3DEntityRender ()
- Public Member Functions inherited from PURender
virtual void prepare ()
virtual void unPrepare ()
virtual void updateRender (PUParticle3D *particle, float deltaTime, bool firstParticle)
local updateRender ( local particle, local deltaTime, local firstParticle)
const std::string & getRenderType (void) const
local getRenderType ()
void setRenderType (const std::string &observerType)
- Public Member Functions inherited from Particle3DRender
virtual void notifyStart ()
 Perform activities when a Renderer is started. More...
 
var notifyStart ()
 Perform activities when a Renderer is started. More...
 
local notifyStart ()
 Perform activities when a Renderer is started. More...
 
virtual void notifyStop ()
 Perform activities when a Renderer is stopped. More...
 
virtual void notifyRescaled (const Vec3 &scale)
 Notify that the Particle System is rescaled. More...
 
local notifyRescaled ( local scale)
 Notify that the Particle System is rescaled. More...
 
void setVisible (bool isVisible)
bool isVisible () const
CC_CONSTRUCTOR_ACCESS _isVisible (true)
CC_CONSTRUCTOR_ACCESS _rendererScale (Vec3::ONE)
CC_CONSTRUCTOR_ACCESS _depthTest (true)
CC_CONSTRUCTOR_ACCESS _depthWrite (false)
virtual ~Particle3DRender ()
- 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...
 

Static Public Member Functions

static PUParticle3DQuadRendercreate (const std::string &texFile="")
var create ()
local create ()

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: PUParticle3DQuadRender()
- Public Attributes inherited from PUParticle3DEntityRender
CC_CONSTRUCTOR_ACCESS __pad0__: PUParticle3DEntityRender()
local __pad0__: PUParticle3DEntityRender()
- Public Attributes inherited from PURender
bool autoRotate
- Public Attributes inherited from Particle3DRender
CC_CONSTRUCTOR_ACCESS __pad0__: Particle3DRender() : _particleSystem(nullptr)

Protected Member Functions

void getOriginOffset (int &offsetX, int &offsetY)
var getOriginOffset ( var offsetX, var offsetY)
local getOriginOffset ( local offsetX, local offsetY)
void determineUVCoords (PUParticle3D *particle)
void fillVertex (unsigned short index, const Vec3 &pos, const Vec4 &color, const Vec2 &uv)
var fillVertex ( var index, var pos, var color, var uv)
local fillVertex ( local index, local pos, local color, local uv)
void fillTriangle (unsigned short index, unsigned short v0, unsigned short v1, unsigned short v2)
- Protected Member Functions inherited from PUParticle3DEntityRender
bool initRender (const std::string &texFile)
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Protected Attributes

Type _type
Origin _origin
RotateType _rotateType
Vec3 _commonDir
Vec3 _commonUp
unsigned short _textureCoordsRows
var _textureCoordsRows
local _textureCoordsRows
unsigned short _textureCoordsColumns
var _textureCoordsColumns
local _textureCoordsColumns
float _textureCoordsRowStep
float _textureCoordsColStep
- Protected Attributes inherited from PUParticle3DEntityRender
MeshCommand_meshCommand
Texture2D_texture
GLProgramState_glProgramState
IndexBuffer_indexBuffer
VertexBuffer_vertexBuffer
std::vector< VertexInfo_vertices
std::vector< unsigned short > _indices
var _indices
local _indices
std::string _texFile
- Protected Attributes inherited from PURender
std::string _renderType
- Protected Attributes inherited from Particle3DRender
ParticleSystem3D_particleSystem
bool _isVisible
Vec3 _rendererScale
bool _depthTest
bool _depthWrite
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Member Enumeration Documentation

enum Origin
Enumerator
TOP_LEFT 
TOP_CENTER 
TOP_RIGHT 
CENTER_LEFT 
CENTER 
CENTER_RIGHT 
BOTTOM_LEFT 
BOTTOM_CENTER 
BOTTOM_RIGHT 
var Origin
Enumerator
TOP_LEFT 
TOP_CENTER 
TOP_RIGHT 
CENTER_LEFT 
CENTER 
CENTER_RIGHT 
BOTTOM_LEFT 
BOTTOM_CENTER 
BOTTOM_RIGHT 
local Origin
Enumerator
TOP_LEFT 
TOP_CENTER 
TOP_RIGHT 
CENTER_LEFT 
CENTER 
CENTER_RIGHT 
BOTTOM_LEFT 
BOTTOM_CENTER 
BOTTOM_RIGHT 
enum RotateType
Enumerator
TEXTURE_COORDS 
VERTEX 
Enumerator
TEXTURE_COORDS 
VERTEX 
local RotateType
Enumerator
TEXTURE_COORDS 
VERTEX 
enum Type
Enumerator
POINT 
ORIENTED_COMMON 
ORIENTED_SELF 
ORIENTED_SHAPE 
PERPENDICULAR_COMMON 
PERPENDICULAR_SELF 
var Type
Enumerator
POINT 
ORIENTED_COMMON 
ORIENTED_SELF 
ORIENTED_SHAPE 
PERPENDICULAR_COMMON 
PERPENDICULAR_SELF 
local Type
Enumerator
POINT 
ORIENTED_COMMON 
ORIENTED_SELF 
ORIENTED_SHAPE 
PERPENDICULAR_COMMON 
PERPENDICULAR_SELF 

Constructor & Destructor Documentation

virtual ~PUParticle3DQuadRender ( )
virtual
var ~PUParticle3DQuadRender ( )
virtual
local ~PUParticle3DQuadRender ( )
virtual

Member Function Documentation

virtual PUParticle3DQuadRender*
clone
( )
overridevirtual

Implements PURender.

var clone ( )
overridevirtual

Implements PURender.

local clone ( )
overridevirtual

Implements PURender.

virtual void copyAttributesTo ( PURender render)
overridevirtual

Reimplemented from PUParticle3DEntityRender.

var copyAttributesTo ( var  render)
overridevirtual

Reimplemented from PUParticle3DEntityRender.

local copyAttributesTo ( local  render)
overridevirtual

Reimplemented from PUParticle3DEntityRender.

static PUParticle3DQuadRender*
create
( const std::string &  texFile = "")
static
var create ( var  texFile = "")
static
local create ( local  texFile = "")
static
void determineUVCoords ( PUParticle3D particle)
protected
var determineUVCoords ( var  particle)
protected
local determineUVCoords ( local  particle)
protected
void fillTriangle ( unsigned short  index,
unsigned short  v0,
unsigned short  v1,
unsigned short  v2 
)
protected
var fillTriangle ( var  index,
var  v0,
var  v1,
var  v2 
)
protected
local fillTriangle ( local  index,
local  v0,
local  v1,
local  v2 
)
protected
void fillVertex ( unsigned short  index,
const Vec3 pos,
const Vec4 color,
const Vec2 uv 
)
protected
var fillVertex ( var  index,
var  pos,
var  color,
var  uv 
)
protected
local fillVertex ( local  index,
local  pos,
local  color,
local  uv 
)
protected
const Vec3& getCommonDirection ( ) const
inline
var getCommonDirection ( )
inline
local getCommonDirection ( )
inline
const Vec3& getCommonUp ( ) const
inline
var getCommonUp ( )
inline
local getCommonUp ( )
inline
unsigned int getNumTextureCoords ( )
var getNumTextureCoords ( )
local getNumTextureCoords ( )
Origin getOrigin ( ) const
inline
var getOrigin ( )
inline
local getOrigin ( )
inline
void getOriginOffset ( int &  offsetX,
int &  offsetY 
)
protected
var getOriginOffset ( var  offsetX,
var  offsetY 
)
protected
local getOriginOffset ( local  offsetX,
local  offsetY 
)
protected
RotateType getRotateType ( ) const
inline
var getRotateType ( )
inline
local getRotateType ( )
inline
unsigned short
getTextureCoordsColumns
( ) const
var getTextureCoordsColumns ( )
local getTextureCoordsColumns ( )
unsigned short getTextureCoordsRows ( ) const
var getTextureCoordsRows ( )
local getTextureCoordsRows ( )
Type getType ( ) const
inline
var getType ( )
inline
local getType ( )
inline
virtual void render ( Renderer renderer,
const Mat4 transform,
ParticleSystem3D particleSystem 
)
overridevirtual

Implements Particle3DRender.

var render ( var  renderer,
var  transform,
var  particleSystem 
)
overridevirtual

Implements Particle3DRender.

local render ( local  renderer,
local  transform,
local  particleSystem 
)
overridevirtual

Implements Particle3DRender.

void setCommonDirection ( const Vec3 dir)
inline
var setCommonDirection ( var  dir)
inline
local setCommonDirection ( local  dir)
inline
void setCommonUp ( const Vec3 up)
inline
var setCommonUp ( var  up)
inline
local setCommonUp ( local  up)
inline
void setOrigin ( Origin  origin)
inline
var setOrigin ( var  origin)
inline
local setOrigin ( local  origin)
inline
void setRotateType ( RotateType  type)
inline
var setRotateType ( var  type)
inline
local setRotateType ( local  type)
inline
void setTextureCoordsColumns ( unsigned short  textureCoordsColumns)
var setTextureCoordsColumns ( var  textureCoordsColumns)
local setTextureCoordsColumns ( local  textureCoordsColumns)
void setTextureCoordsRows ( unsigned short  textureCoordsRows)
var setTextureCoordsRows ( var  textureCoordsRows)
local setTextureCoordsRows ( local  textureCoordsRows)
void setType ( Type  type)
var setType ( var  type)
local setType ( local  type)

Member Data Documentation

var __pad0__
local __pad0__
Vec3 _commonDir
protected
var _commonDir
protected
local _commonDir
protected
Vec3 _commonUp
protected
var _commonUp
protected
local _commonUp
protected
Origin _origin
protected
var _origin
protected
local _origin
protected
RotateType _rotateType
protected
var _rotateType
protected
local _rotateType
protected
float _textureCoordsColStep
protected
var _textureCoordsColStep
protected
local _textureCoordsColStep
protected
unsigned short
_textureCoordsColumns
protected
var _textureCoordsColumns
protected
local _textureCoordsColumns
protected
unsigned short _textureCoordsRows
protected
var _textureCoordsRows
protected
local _textureCoordsRows
protected
float _textureCoordsRowStep
protected
var _textureCoordsRowStep
protected
local _textureCoordsRowStep
protected
Type _type
protected
var _type
protected
local _type
protected

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