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

#include <AnimatedTexture.h>

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

Public Member Functions

 AnimatedTexture (const AnimatedTextureParameters &p)
 Constructor.
 ~AnimatedTexture ()
 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 Play (bool repeat=false)
void Stop ()
void SetTexture (const char *filename)
void SetShader (const char *filename)
void SetVertexBuffer ()
 This function called by SceneManager only.
void SetTextureRect (const math::Vector &rect, unsigned int horizontalFrames, unsigned int verticalFrames)
 rect.x = left, rect.y = top, rect.z = right, rect.w = bottom
void SetSize (const math::Vector &size)
 Sets size of billboard.
void SetMiddleSize (const math::Vector &size)
void SetDuration (float duration)
void SetAngularVelocity (float angularVelocity)
 Sets rotation speed.
void SetInitialColor (const gfx::Colorf &initialColor)
void SetMiddleColor (const gfx::Colorf &middleColor)
void SetFinalColor (const gfx::Colorf &finalColor)
void SetFixedAxis (bool fixedAxis)
void SetPositionOnly (bool positionOnly)
const char * GetTextureName () const
const char * GetShaderName () const
const math::VectorGetTextureRect () const
unsigned int GetHorizontalImages () const
unsigned int GetVerticalImages () const
math::Vector GetSize () const
math::Vector GetMiddleSize () const
float GetDuration () const
float GetAngularVelocity () const
const gfx::ColorfGetInitialColor () const
const gfx::ColorfGetMiddleColor () const
const gfx::ColorfGetFinalColor () const
bool IsFixedAxis () const
bool PositionOnly () 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

 AnimatedTexture (const AnimatedTexture &other)
 Copy constructor.
AnimatedTextureoperator= (const AnimatedTexture &other)
 Assignment operator.

Private Attributes

std::string m_textureName
std::string m_shaderName
gfx::Materialm_pMaterial
RBufferm_pRB
unsigned int m_bufferOffset
const kge::u32 m_sizeOfData
math::Vector m_rect
unsigned int m_horizontalImages
unsigned int m_verticalImages
math::Vector m_size
math::Vector m_middleSize
float m_duration
float m_angularVelocity
float m_fRot
gfx::Colorf m_initialColor
gfx::Colorf m_middleColor
gfx::Colorf m_finalColor
bool m_repeat
float m_elapsed
bool m_running
bool m_fixedAxis
bool m_positionOnly

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 60 of file AnimatedTexture.h.

Constructor & Destructor Documentation

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

Copy constructor.

kge::sn::AnimatedTexture::AnimatedTexture ( const AnimatedTextureParameters p)

Constructor.

kge::sn::AnimatedTexture::~AnimatedTexture ( )

Destructor.

Member Function Documentation

void kge::sn::AnimatedTexture::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.

float kge::sn::AnimatedTexture::GetAngularVelocity ( ) const
inline

Definition at line 157 of file AnimatedTexture.h.

float kge::sn::AnimatedTexture::GetDuration ( ) const
inline

Definition at line 154 of file AnimatedTexture.h.

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

Definition at line 166 of file AnimatedTexture.h.

unsigned int kge::sn::AnimatedTexture::GetHorizontalImages ( ) const
inline

Definition at line 142 of file AnimatedTexture.h.

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

Definition at line 160 of file AnimatedTexture.h.

const gfx::Colorf& kge::sn::AnimatedTexture::GetMiddleColor ( ) const
inline

Definition at line 163 of file AnimatedTexture.h.

math::Vector kge::sn::AnimatedTexture::GetMiddleSize ( ) const
const char* kge::sn::AnimatedTexture::GetShaderName ( ) const
inline

Definition at line 136 of file AnimatedTexture.h.

math::Vector kge::sn::AnimatedTexture::GetSize ( ) const
const char* kge::sn::AnimatedTexture::GetTextureName ( ) const
inline

Definition at line 133 of file AnimatedTexture.h.

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

Definition at line 139 of file AnimatedTexture.h.

unsigned int kge::sn::AnimatedTexture::GetVerticalImages ( ) const
inline

Definition at line 145 of file AnimatedTexture.h.

bool kge::sn::AnimatedTexture::IsFixedAxis ( ) const
inline

Definition at line 169 of file AnimatedTexture.h.

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

Assignment operator.

void kge::sn::AnimatedTexture::Play ( bool  repeat = false)
bool kge::sn::AnimatedTexture::PositionOnly ( ) const
inline

Definition at line 172 of file AnimatedTexture.h.

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

The jobs after rendering.

Implements kge::sn::SceneNode.

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

The jobs before rendering like culling and calculate position.

Implements kge::sn::SceneNode.

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

Render the objects.

Implements kge::sn::SceneNode.

void kge::sn::AnimatedTexture::SetAngularVelocity ( float  angularVelocity)
inline

Sets rotation speed.

Definition at line 115 of file AnimatedTexture.h.

void kge::sn::AnimatedTexture::SetDuration ( float  duration)
inline

Definition at line 112 of file AnimatedTexture.h.

void kge::sn::AnimatedTexture::SetFinalColor ( const gfx::Colorf finalColor)
inline

Definition at line 124 of file AnimatedTexture.h.

void kge::sn::AnimatedTexture::SetFixedAxis ( bool  fixedAxis)
inline

Definition at line 127 of file AnimatedTexture.h.

void kge::sn::AnimatedTexture::SetInitialColor ( const gfx::Colorf initialColor)
inline

Definition at line 118 of file AnimatedTexture.h.

void kge::sn::AnimatedTexture::SetMiddleColor ( const gfx::Colorf middleColor)
inline

Definition at line 121 of file AnimatedTexture.h.

void kge::sn::AnimatedTexture::SetMiddleSize ( const math::Vector size)
void kge::sn::AnimatedTexture::SetPositionOnly ( bool  positionOnly)
inline

Definition at line 130 of file AnimatedTexture.h.

void kge::sn::AnimatedTexture::SetShader ( const char *  filename)
void kge::sn::AnimatedTexture::SetSize ( const math::Vector size)

Sets size of billboard.

void kge::sn::AnimatedTexture::SetTexture ( const char *  filename)
void kge::sn::AnimatedTexture::SetTextureRect ( const math::Vector rect,
unsigned int  horizontalFrames,
unsigned int  verticalFrames 
)

rect.x = left, rect.y = top, rect.z = right, rect.w = bottom

void kge::sn::AnimatedTexture::SetVertexBuffer ( )

This function called by SceneManager only.

void kge::sn::AnimatedTexture::Stop ( )

Member Data Documentation

float kge::sn::AnimatedTexture::m_angularVelocity
private

Definition at line 188 of file AnimatedTexture.h.

unsigned int kge::sn::AnimatedTexture::m_bufferOffset
private

Definition at line 180 of file AnimatedTexture.h.

float kge::sn::AnimatedTexture::m_duration
private

Definition at line 187 of file AnimatedTexture.h.

float kge::sn::AnimatedTexture::m_elapsed
private

Definition at line 194 of file AnimatedTexture.h.

gfx::Colorf kge::sn::AnimatedTexture::m_finalColor
private

Definition at line 192 of file AnimatedTexture.h.

bool kge::sn::AnimatedTexture::m_fixedAxis
private

Definition at line 196 of file AnimatedTexture.h.

float kge::sn::AnimatedTexture::m_fRot
private

Definition at line 189 of file AnimatedTexture.h.

unsigned int kge::sn::AnimatedTexture::m_horizontalImages
private

Definition at line 183 of file AnimatedTexture.h.

gfx::Colorf kge::sn::AnimatedTexture::m_initialColor
private

Definition at line 190 of file AnimatedTexture.h.

gfx::Colorf kge::sn::AnimatedTexture::m_middleColor
private

Definition at line 191 of file AnimatedTexture.h.

math::Vector kge::sn::AnimatedTexture::m_middleSize
private

Definition at line 186 of file AnimatedTexture.h.

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

Definition at line 177 of file AnimatedTexture.h.

bool kge::sn::AnimatedTexture::m_positionOnly
private

Definition at line 197 of file AnimatedTexture.h.

RBuffer* kge::sn::AnimatedTexture::m_pRB
private

Definition at line 179 of file AnimatedTexture.h.

math::Vector kge::sn::AnimatedTexture::m_rect
private

Definition at line 182 of file AnimatedTexture.h.

bool kge::sn::AnimatedTexture::m_repeat
private

Definition at line 193 of file AnimatedTexture.h.

bool kge::sn::AnimatedTexture::m_running
private

Definition at line 195 of file AnimatedTexture.h.

std::string kge::sn::AnimatedTexture::m_shaderName
private

Definition at line 176 of file AnimatedTexture.h.

math::Vector kge::sn::AnimatedTexture::m_size
private

Definition at line 185 of file AnimatedTexture.h.

const kge::u32 kge::sn::AnimatedTexture::m_sizeOfData
private

Definition at line 181 of file AnimatedTexture.h.

std::string kge::sn::AnimatedTexture::m_textureName
private

Definition at line 175 of file AnimatedTexture.h.

unsigned int kge::sn::AnimatedTexture::m_verticalImages
private

Definition at line 184 of file AnimatedTexture.h.


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