Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::sn::RibbonTrail Class Reference

#include <RibbonTrail.h>

Inheritance diagram for kge::sn::RibbonTrail:
kge::sn::SceneNode kge::KgeUnknown

Public Member Functions

 RibbonTrail (SceneManager *sceneMan, const char *shaderName, const char *textureName, const math::Vector &textureRect, const gfx::Colorf &initialColor, const gfx::Colorf &finalColor, float width, float speed, float age, float chaosRatio)
 Constructor.
 ~RibbonTrail ()
 Destructor.
void PreRender (float elapsedTime)
 The jobs before rendering like culling and calculate position.
void Render ()
 Render the objects.
void PostRender ()
 The jobs after rendering.
void Draw (bool WithMaterial, bool WithTransform, bool bPosition, bool bNormalTexcoord, bool bTangentBinormal)
void Start (const math::Vector &target)
void Start ()
void Finish ()
bool Running () const
void SetWidth (float width)
void SetSpeed (float speed)
void SetAge (float age)
void SetInitialColor (const gfx::Colorf &color)
void SetFinalColor (const gfx::Colorf &color)
void SetChaosRatio (float chaosRatio)
float GetWidth () const
float GetSpeed () const
float GetAge () const
float GetChaosRatio () const
const char * GetTextureName () const
const char * GetShaderName () const
const math::VectorGetTextureRect () const
const gfx::ColorfGetInitialColor () const
const gfx::ColorfGetFinalColor () const
- Public Member Functions inherited from kge::sn::SceneNode
 SceneNode ()
 Constructor.
virtual ~SceneNode ()
 Destructor.
virtual void AddChild (SceneNode *child)
 Adds a node as child.
virtual bool AddEffect (efx::EffectType p, efx::Effect **ppOut)
virtual void SetSceneManager (SceneManager *smgr)
 Sets the scene manager and renderer pointer.
virtual void SetPosition (const math::Vector &v)
 Set the position of the scenenode.
virtual void SetRotation (const math::Vector &v)
 Set the rotation of the scenenode.
virtual void SetScale (const math::Vector &v)
 Set the scale of the scenenode.
virtual void SetAutomaticCulling (bool isTrue)
 Set Cutting Enable or Disable.
virtual void SetVisible (bool isVisible)
 Set Visible Enable or Disable.
virtual bool GetVisible ()
 Get Visible.
virtual bool IsVisibleInFrame ()
 Is it visible in this frame?
virtual const math::VectorGetPosition () const
 Returns the node position.
virtual const math::VectorGetRotation () const
 Returns the node rotation.
virtual const math::VectorGetScale () const
 Returns the node scale.
virtual math::MatrixGetAbsoluteMatrix () const
 Get the absolute matrix.
virtual math::MatrixGetFinalMatrix ()
 Get the final matrix.
virtual u32 GetMaterialCount ()
 Get the count of materials this node has.
virtual gfx::MaterialGetMaterial (u32 Index)
virtual math::SphereGetBoundingBox ()
 Returns the node bounding box.
virtual math::AABBGetAxisAlignedBoundingBox ()
 Returns the node Axis aligned bounding box.
virtual NodeType GetType () const
 Returns the node type.
virtual void RemoveChild (SceneNode *child)
virtual void RemoveChildren ()
 Removes all children of this node.
virtual const SceneNodeGetParent ()
 Returns the node parent.
virtual void SetParent (SceneNode *parent)
 Sets the node parent.
virtual void SetName (const char *name)
 Sets the node name.
virtual core::StringGetName ()
 Gets the node name.
virtual void SetID (int ID)
 Sets the node ID.
virtual int GetID ()
 Gets the node ID.
void EnableShadow (bool enable)
bool HasShadow () const
virtual void UpdateFinalMat ()
 Update final matrix.
- Public Member Functions inherited from kge::KgeUnknown
 KgeUnknown ()
 Constructor.
virtual ~KgeUnknown ()
 Destructor.
virtual void AddRef ()
 Add a reference to the object.
virtual void DecRef ()
 Decrease a reference from the object. if its reference count get 0 then the object will destroy.
u32 GetRefCount ()
 Return resource reference count.
const char * GetDebugText ()
 returns the instance debug text.

Private Member Functions

 RibbonTrail (const RibbonTrail &other)
 Copy constructor.
RibbonTrailoperator= (const RibbonTrail &other)
 Assignment operator.

Private Attributes

std::string m_shaderName
std::string m_textureName
gfx::Materialm_pMaterial
RBufferm_pRB
unsigned int m_sizeOfData
unsigned int m_bufferOffset
math::Vector m_rect
gfx::Colorf m_initialColor
gfx::Colorf m_finalColor
float m_width
float m_speed
float m_totalAge
float m_currentAge
float m_chaosRatio
float m_elapsed
bool m_running
unsigned int m_maxCount
unsigned int m_activeCount
math::Vectorm_positions
gfx::Colorm_colors
math::Vector m_prevPos
unsigned int m_index
bool m_bolt

Additional Inherited Members

- Protected Member Functions inherited from kge::sn::SceneNode
virtual bool HasThisEffect (efx::EffectType p)
- Protected Attributes inherited from kge::sn::SceneNode
core::String m_sName
int m_iID
SceneManagerm_pSnMan
gfx::Rendererm_pRenderer
bool m_bVis
bool m_bAutoCulling
bool m_bVisFrame
SceneNodem_pParent
std::vector< SceneNode * > m_vChilds
std::vector< int > m_vEffectType
std::vector< efx::Effect * > m_vEffect
math::Matrixm_pAbsMat
math::Matrixm_pFinalMat
math::Vector m_Position
math::Vector m_Rotation
math::Vector m_Scale
math::Spherem_pBB
math::AABBm_pAABB
NodeType m_eNodeType
bool m_hasShadow

Detailed Description

Definition at line 24 of file RibbonTrail.h.

Constructor & Destructor Documentation

kge::sn::RibbonTrail::RibbonTrail ( const RibbonTrail other)
private

Copy constructor.

kge::sn::RibbonTrail::RibbonTrail ( SceneManager sceneMan,
const char *  shaderName,
const char *  textureName,
const math::Vector textureRect,
const gfx::Colorf initialColor,
const gfx::Colorf finalColor,
float  width,
float  speed,
float  age,
float  chaosRatio 
)

Constructor.

kge::sn::RibbonTrail::~RibbonTrail ( )

Destructor.

Member Function Documentation

void kge::sn::RibbonTrail::Draw ( bool  WithMaterial,
bool  WithTransform,
bool  bPosition,
bool  bNormalTexcoord,
bool  bTangentBinormal 
)
virtual

Draw the node with/without its Materials and Transforms.

Parameters
WithMaterialDraw it with its own materials or not?
WithMaterialDraw it with its own Transformations or not?

Implements kge::sn::SceneNode.

void kge::sn::RibbonTrail::Finish ( )
inline

Definition at line 68 of file RibbonTrail.h.

float kge::sn::RibbonTrail::GetAge ( ) const
inline

Definition at line 98 of file RibbonTrail.h.

float kge::sn::RibbonTrail::GetChaosRatio ( ) const
inline

Definition at line 101 of file RibbonTrail.h.

const gfx::Colorf& kge::sn::RibbonTrail::GetFinalColor ( ) const
inline

Definition at line 116 of file RibbonTrail.h.

const gfx::Colorf& kge::sn::RibbonTrail::GetInitialColor ( ) const
inline

Definition at line 113 of file RibbonTrail.h.

const char* kge::sn::RibbonTrail::GetShaderName ( ) const
inline

Definition at line 107 of file RibbonTrail.h.

float kge::sn::RibbonTrail::GetSpeed ( ) const
inline

Definition at line 95 of file RibbonTrail.h.

const char* kge::sn::RibbonTrail::GetTextureName ( ) const
inline

Definition at line 104 of file RibbonTrail.h.

const math::Vector& kge::sn::RibbonTrail::GetTextureRect ( ) const
inline

Definition at line 110 of file RibbonTrail.h.

float kge::sn::RibbonTrail::GetWidth ( ) const
inline

Definition at line 92 of file RibbonTrail.h.

RibbonTrail& kge::sn::RibbonTrail::operator= ( const RibbonTrail other)
private

Assignment operator.

void kge::sn::RibbonTrail::PostRender ( )
virtual

The jobs after rendering.

Implements kge::sn::SceneNode.

void kge::sn::RibbonTrail::PreRender ( float  elapsedTime)
virtual

The jobs before rendering like culling and calculate position.

Implements kge::sn::SceneNode.

void kge::sn::RibbonTrail::Render ( )
virtual

Render the objects.

Implements kge::sn::SceneNode.

bool kge::sn::RibbonTrail::Running ( ) const
inline

Definition at line 71 of file RibbonTrail.h.

void kge::sn::RibbonTrail::SetAge ( float  age)
inline

Definition at line 80 of file RibbonTrail.h.

void kge::sn::RibbonTrail::SetChaosRatio ( float  chaosRatio)
inline

Definition at line 89 of file RibbonTrail.h.

void kge::sn::RibbonTrail::SetFinalColor ( const gfx::Colorf color)
inline

Definition at line 86 of file RibbonTrail.h.

void kge::sn::RibbonTrail::SetInitialColor ( const gfx::Colorf color)
inline

Definition at line 83 of file RibbonTrail.h.

void kge::sn::RibbonTrail::SetSpeed ( float  speed)
inline

Definition at line 77 of file RibbonTrail.h.

void kge::sn::RibbonTrail::SetWidth ( float  width)
inline

Definition at line 74 of file RibbonTrail.h.

void kge::sn::RibbonTrail::Start ( const math::Vector target)
void kge::sn::RibbonTrail::Start ( )

Member Data Documentation

unsigned int kge::sn::RibbonTrail::m_activeCount
private

Definition at line 137 of file RibbonTrail.h.

bool kge::sn::RibbonTrail::m_bolt
private

Definition at line 143 of file RibbonTrail.h.

unsigned int kge::sn::RibbonTrail::m_bufferOffset
private

Definition at line 124 of file RibbonTrail.h.

float kge::sn::RibbonTrail::m_chaosRatio
private

Definition at line 132 of file RibbonTrail.h.

gfx::Color* kge::sn::RibbonTrail::m_colors
private

Definition at line 139 of file RibbonTrail.h.

float kge::sn::RibbonTrail::m_currentAge
private

Definition at line 131 of file RibbonTrail.h.

float kge::sn::RibbonTrail::m_elapsed
private

Definition at line 133 of file RibbonTrail.h.

gfx::Colorf kge::sn::RibbonTrail::m_finalColor
private

Definition at line 127 of file RibbonTrail.h.

unsigned int kge::sn::RibbonTrail::m_index
private

Definition at line 142 of file RibbonTrail.h.

gfx::Colorf kge::sn::RibbonTrail::m_initialColor
private

Definition at line 126 of file RibbonTrail.h.

unsigned int kge::sn::RibbonTrail::m_maxCount
private

Definition at line 136 of file RibbonTrail.h.

gfx::Material* kge::sn::RibbonTrail::m_pMaterial
private

Definition at line 121 of file RibbonTrail.h.

math::Vector* kge::sn::RibbonTrail::m_positions
private

Definition at line 138 of file RibbonTrail.h.

RBuffer* kge::sn::RibbonTrail::m_pRB
private

Definition at line 122 of file RibbonTrail.h.

math::Vector kge::sn::RibbonTrail::m_prevPos
private

Definition at line 141 of file RibbonTrail.h.

math::Vector kge::sn::RibbonTrail::m_rect
private

Definition at line 125 of file RibbonTrail.h.

bool kge::sn::RibbonTrail::m_running
private

Definition at line 134 of file RibbonTrail.h.

std::string kge::sn::RibbonTrail::m_shaderName
private

Definition at line 119 of file RibbonTrail.h.

unsigned int kge::sn::RibbonTrail::m_sizeOfData
private

Definition at line 123 of file RibbonTrail.h.

float kge::sn::RibbonTrail::m_speed
private

Definition at line 129 of file RibbonTrail.h.

std::string kge::sn::RibbonTrail::m_textureName
private

Definition at line 120 of file RibbonTrail.h.

float kge::sn::RibbonTrail::m_totalAge
private

Definition at line 130 of file RibbonTrail.h.

float kge::sn::RibbonTrail::m_width
private

Definition at line 128 of file RibbonTrail.h.


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