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

This is a node class for static meshes which is more faster. More...

#include <StaticMesh.h>

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

Public Member Functions

 StaticMesh (gfx::MeshBuffer *pMeshBuffer)
 Constructor.
 ~StaticMesh ()
 Destructor.
virtual void PreRender (float elapsedTime=0.0f)
 Karhayee ke Ghabl az render bayad anjam shvad. Mesle colision detection.
virtual void Render ()
 Render kardane Object.
virtual void PostRender ()
 Karhaee ke bad az render bayad anjam beshe.
virtual bool AddEffect (efx::EffectType p, efx::Effect **ppOut)
virtual void Draw (bool WithMaterial, bool WithTransform, bool bPosition, bool bNormalTexcoord, bool bTangentBinormal)
virtual void SetShader (gfx::ShaderInstance *shader)
virtual u32 GetMaterialCount ()
 Get the count of materials this node has.
virtual gfx::MaterialGetMaterial (u32 Index)
void SetFileName (core::String *str)
 For internal use.
core::StringGetFileName ()
 Returns the mesh file name.
u32 GetMeshCount ()
 Returns the mesh count for this node.
sn::MeshGetMesh (u32 index)
 Gets the mesh.
virtual void UpdateFinalMat ()
 Update final matrix.
- Public Member Functions inherited from kge::sn::SceneNode
 SceneNode ()
 Constructor.
virtual ~SceneNode ()
 Destructor.
virtual void AddChild (SceneNode *child)
 Adds a node as child.
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 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
- 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.

Protected Member Functions

virtual void CreateMirrorPlane (efx::Effect **ppCreatedMirror)
virtual void CreateShadowPlane (efx::Effect **ppCreatedShadow)
- Protected Member Functions inherited from kge::sn::SceneNode
virtual bool HasThisEffect (efx::EffectType p)
- Protected Member Functions inherited from kge::KgeUnknown
void SetDebugText (char *text)

Protected Attributes

sn::Meshm_pMeshes
core::Stringm_pFileName
 Meshes.
u32 m_iNumMeshes
 *< Mesh file name
gfx::Materialm_pMaterials
 The count of meshes.
gfx::MeshBuffer * m_pMeshBuffer
 Mesh materials.
- 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

This is a node class for static meshes which is more faster.

Definition at line 26 of file StaticMesh.h.

Constructor & Destructor Documentation

kge::sn::StaticMesh::StaticMesh ( gfx::MeshBuffer *  pMeshBuffer)

Constructor.

kge::sn::StaticMesh::~StaticMesh ( )

Destructor.

Member Function Documentation

virtual bool kge::sn::StaticMesh::AddEffect ( efx::EffectType  p,
efx::Effect **  ppOut 
)
virtual

Ezafe kardane effect be hamin gereh.

Parameters
pEffecti ke mikhahid ezafe konid.
ppOutClass Effect sakhte shode.
Returns
agar ke in gereh betavanad in effect ra bepazirad true bar migardanad.

Reimplemented from kge::sn::SceneNode.

virtual void kge::sn::StaticMesh::CreateMirrorPlane ( efx::Effect **  ppCreatedMirror)
protectedvirtual
virtual void kge::sn::StaticMesh::CreateShadowPlane ( efx::Effect **  ppCreatedShadow)
protectedvirtual
virtual void kge::sn::StaticMesh::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.

core::String* kge::sn::StaticMesh::GetFileName ( )
inline

Returns the mesh file name.

Definition at line 72 of file StaticMesh.h.

virtual gfx::Material* kge::sn::StaticMesh::GetMaterial ( u32  Index)
virtual

Get the node material by its index.

Parameters
IndexThe material index. Some nodes have more than one material.

Reimplemented from kge::sn::SceneNode.

virtual u32 kge::sn::StaticMesh::GetMaterialCount ( )
virtual

Get the count of materials this node has.

Reimplemented from kge::sn::SceneNode.

sn::Mesh* kge::sn::StaticMesh::GetMesh ( u32  index)
inline

Gets the mesh.

Definition at line 78 of file StaticMesh.h.

u32 kge::sn::StaticMesh::GetMeshCount ( )
inline

Returns the mesh count for this node.

Definition at line 75 of file StaticMesh.h.

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

Karhaee ke bad az render bayad anjam beshe.

Implements kge::sn::SceneNode.

virtual void kge::sn::StaticMesh::PreRender ( float  elapsedTime = 0.0f)
virtual

Karhayee ke Ghabl az render bayad anjam shvad. Mesle colision detection.

Implements kge::sn::SceneNode.

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

Render kardane Object.

Implements kge::sn::SceneNode.

void kge::sn::StaticMesh::SetFileName ( core::String str)
inline

For internal use.

Definition at line 69 of file StaticMesh.h.

virtual void kge::sn::StaticMesh::SetShader ( gfx::ShaderInstance shader)
virtual
virtual void kge::sn::StaticMesh::UpdateFinalMat ( )
virtual

Update final matrix.

Reimplemented from kge::sn::SceneNode.

Member Data Documentation

u32 kge::sn::StaticMesh::m_iNumMeshes
protected

*< Mesh file name

Definition at line 89 of file StaticMesh.h.

core::String* kge::sn::StaticMesh::m_pFileName
protected

Meshes.

Definition at line 87 of file StaticMesh.h.

gfx::Material* kge::sn::StaticMesh::m_pMaterials
protected

The count of meshes.

Definition at line 91 of file StaticMesh.h.

gfx::MeshBuffer* kge::sn::StaticMesh::m_pMeshBuffer
protected

Mesh materials.

Definition at line 93 of file StaticMesh.h.

sn::Mesh* kge::sn::StaticMesh::m_pMeshes
protected

Definition at line 85 of file StaticMesh.h.


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