raSystem  1.0 bata
raEntity< VertexType, bIndexed, IndexType > Class Template Referenceabstract

#include <raEntity.h>

Inheritance diagram for raEntity< VertexType, bIndexed, IndexType >:
raVisual raRender IRAMesh

Public Member Functions

 raEntity (raSmartPointer< raDirectX >, raMaterial *pMaterial, bool bAlpha=false, bool bAdditive=false, UINT numMaterials=1)
 
 ~raEntity ()
 
virtual bool CreateMesh ()
 
virtual bool DestroyMesh ()
 
virtual bool RenderMesh (LPCSTR techniqueName="")
 
virtual bool Intersects (const raVector3 *pRayPos, const raVector3 *pRayDir, float *pDist)
 
virtual ID3D11Buffer * GetVertexBuffer ()
 
virtual ID3D11Buffer * GetIndexBuffer ()
 
virtual UINT GetStrideSize ()
 
virtual D3D11_PRIMITIVE_TOPOLOGY GetPrimitiveTopology (UINT n)
 
virtual SDKMESH_SUBSETGetSubset (UINT n)
 
virtual UINT GetNumSubsets ()
 
- Public Member Functions inherited from raVisual
 raVisual (raSmartPointer< raDirectX > dx, bool bAlpha=false, bool bAdditive=false, bool bDepthDisable=false, D3D11_FILL_MODE fillMode=D3D11_FILL_SOLID, D3D11_CULL_MODE cullMode=D3D11_CULL_BACK)
 
 ~raVisual (void)
 
virtual bool CreateVertexLayout ()
 
virtual bool Create ()
 
virtual void Destroy ()
 
virtual void CreateEffectVariables ()
 
virtual void DestroyEffectVariables ()
 
virtual void SetupEffectVariables (const raMatrix &pView, const raMatrix &pProj, const raLight *pLight)
 
virtual bool Render (UINT drawOrder, const raMatrix &pView, const raMatrix &pProj, const raLight *pLight, LPCSTR techniqueName="")
 
virtual void CreateMaterials ()
 
virtual void DestroyMaterials ()
 
bool SetState ()
 
bool RestoreState ()
 
virtual UINT GetNumMaterials ()
 
virtual raMaterialGetMaterial (UINT n)
 
void SetMaterial (UINT n, raMaterial *pMaterial)
 
void SetMaterial_1 (UINT n, raMaterial *pMaterial)
 
void SetTexture (UINT n, LPCSTR textureFileName)
 
void SetTexture_1 (UINT n, LPCSTR textureFileName)
 
virtual void SetVisible (bool bVisible)
 
virtual void SetDrawOder (UINT Value)
 
virtual void SetSelected (bool bSelected)
 
virtual const float GetBoundingsphereRadius ()
 
- Public Member Functions inherited from raRender
 raRender (raSmartPointer< raDirectX > dx, const raMatrix *mWorld=NULL, LPCSTR Name="Render")
 
virtual ~raRender (void)
 
virtual bool Update (float fTime, float fRunTime)
 
LPCSTR GetName ()
 
void SetName (LPCSTR Name)
 
virtual void SetWorldMatrix (const raMatrix &value)
 
virtual raMatrixGetWorldMatrix (void)
 
- Public Member Functions inherited from IRAMesh
virtual ~IRAMesh ()
 

Protected Member Functions

virtual void SetupVertices ()=0
 
virtual void SetupIndices ()
 
virtual void CreateVertexBuffer ()
 
virtual void CreateIndexBuffer ()
 
virtual void DeleteTempData ()
 
virtual const D3D11_INPUT_ELEMENT_DESC * GetVertexLayout ()
 
virtual UINT GetNumElements ()
 
virtual DXGI_FORMAT GetIndexBufferFormat ()
 
virtual void ComputeBoundingBox ()
 
- Protected Member Functions inherited from raVisual
bool CreateAlphaBlendState ()
 
bool CreateDepthStencilState ()
 
bool CreateRasterizerState ()
 

Protected Attributes

ID3D11Buffer * m_pVB
 
ID3D11Buffer * m_pIB
 
DWORD m_nVertices
 
DWORD m_nIndices
 
VertexType * m_pVertices
 
IndexType * m_pIndices
 
raOctreem_OctreeRoot
 
- Protected Attributes inherited from raVisual
UINT m_DrawOder
 
DWORD m_numMaterials
 
raMaterial ** m_pMaterials
 
raSmartPointer< raDirectXm_dx
 
ID3D11InputLayout * m_pVertexLayout
 
ID3D11BlendState * m_pAlphaBlendState
 
ID3D11BlendState * m_pOldAlphaBlendState
 
ID3D11DepthStencilState * m_pDepthStencilState
 
ID3D11DepthStencilState * m_pOldDepthStencilState
 
ID3D11RasterizerState * m_pRasterState
 
ID3D11RasterizerState * m_pOldRasterState
 
bool m_bVisible
 
bool m_bAlpha
 
bool m_bAdditive
 
float m_blendFactor [4]
 
UINT m_sampleMask
 
bool m_bDepthDisable
 
UINT m_StencilRef
 
D3D11_FILL_MODE m_FillMode
 
D3D11_CULL_MODE m_CullMode
 
DWORD m_numSubsets
 
SDKMESH_SUBSETm_pSubsets
 
- Protected Attributes inherited from raRender
raSmartPointer< raDirectXm_dx
 
raMatrix m_World
 
LPCSTR m_Name
 

Friends

class raOctree
 

Additional Inherited Members

- Public Attributes inherited from raVisual
raVector3 m_bbMin
 
raVector3 m_bbMax
 
- Static Public Attributes inherited from raVisual
static raString EffectfileName
 
static raString TechniqueName
 
static raString TexturedTechniqueName
 
static raString SkinnedEffectfileName
 
static raString SkinnedEffectfileName2
 
static raString SkinnedTechniqueName
 
static raString SkinnedTexturedTechniqueName
 

Detailed Description

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
class raEntity< VertexType, bIndexed, IndexType >

Definition at line 4 of file raEntity.h.

Constructor & Destructor Documentation

◆ raEntity()

template<class VertexType , bool bIndexed, typename IndexType >
raEntity< VertexType, bIndexed, IndexType >::raEntity ( raSmartPointer< raDirectX dx,
raMaterial pMaterial,
bool  bAlpha = false,
bool  bAdditive = false,
UINT  numMaterials = 1 
)

Definition at line 73 of file raEntity.h.

◆ ~raEntity()

template<class VertexType , bool bIndexed, typename IndexType >
raEntity< VertexType, bIndexed, IndexType >::~raEntity ( )

Definition at line 163 of file raEntity.h.

Member Function Documentation

◆ ComputeBoundingBox()

template<class VertexType , bool bIndexed, typename IndexType >
void raEntity< VertexType, bIndexed, IndexType >::ComputeBoundingBox ( )
protectedvirtual

Definition at line 244 of file raEntity.h.

◆ CreateIndexBuffer()

template<class VertexType , bool bIndexed, typename IndexType >
void raEntity< VertexType, bIndexed, IndexType >::CreateIndexBuffer ( )
protectedvirtual

Definition at line 144 of file raEntity.h.

◆ CreateMesh()

template<class VertexType , bool bIndexed, typename IndexType >
bool raEntity< VertexType, bIndexed, IndexType >::CreateMesh ( void  )
virtual

Implements IRAMesh.

Reimplemented in raSystem::raMeshFile, and raModel.

Definition at line 170 of file raEntity.h.

◆ CreateVertexBuffer()

template<class VertexType , bool bIndexed, typename IndexType >
void raEntity< VertexType, bIndexed, IndexType >::CreateVertexBuffer ( )
protectedvirtual

Definition at line 118 of file raEntity.h.

◆ DeleteTempData()

template<class VertexType , bool bIndexed, typename IndexType >
void raEntity< VertexType, bIndexed, IndexType >::DeleteTempData ( )
protectedvirtual

Definition at line 181 of file raEntity.h.

◆ DestroyMesh()

template<class VertexType , bool bIndexed, typename IndexType >
bool raEntity< VertexType, bIndexed, IndexType >::DestroyMesh ( )
virtual

Implements IRAMesh.

Reimplemented in raSystem::raMeshFile.

Definition at line 110 of file raEntity.h.

◆ GetIndexBuffer()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual ID3D11Buffer* raEntity< VertexType, bIndexed, IndexType >::GetIndexBuffer ( )
inlinevirtual

Implements IRAMesh.

Definition at line 23 of file raEntity.h.

◆ GetIndexBufferFormat()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual DXGI_FORMAT raEntity< VertexType, bIndexed, IndexType >::GetIndexBufferFormat ( )
inlineprotectedvirtual

Reimplemented from raVisual.

Definition at line 61 of file raEntity.h.

◆ GetNumElements()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual UINT raEntity< VertexType, bIndexed, IndexType >::GetNumElements ( )
inlineprotectedvirtual

Reimplemented from raVisual.

Definition at line 56 of file raEntity.h.

◆ GetNumSubsets()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual UINT raEntity< VertexType, bIndexed, IndexType >::GetNumSubsets ( )
inlinevirtual

Implements IRAMesh.

Definition at line 30 of file raEntity.h.

◆ GetPrimitiveTopology()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual D3D11_PRIMITIVE_TOPOLOGY raEntity< VertexType, bIndexed, IndexType >::GetPrimitiveTopology ( UINT  n)
inlinevirtual

Implements IRAMesh.

Definition at line 25 of file raEntity.h.

◆ GetStrideSize()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual UINT raEntity< VertexType, bIndexed, IndexType >::GetStrideSize ( )
inlinevirtual

Reimplemented from raVisual.

Definition at line 24 of file raEntity.h.

◆ GetSubset()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual SDKMESH_SUBSET* raEntity< VertexType, bIndexed, IndexType >::GetSubset ( UINT  n)
inlinevirtual

Implements IRAMesh.

Definition at line 29 of file raEntity.h.

◆ GetVertexBuffer()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual ID3D11Buffer* raEntity< VertexType, bIndexed, IndexType >::GetVertexBuffer ( )
inlinevirtual

Implements IRAMesh.

Definition at line 22 of file raEntity.h.

◆ GetVertexLayout()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual const D3D11_INPUT_ELEMENT_DESC* raEntity< VertexType, bIndexed, IndexType >::GetVertexLayout ( )
inlineprotectedvirtual

Reimplemented from raVisual.

Definition at line 51 of file raEntity.h.

◆ Intersects()

template<class VertexType , bool bIndexed, typename IndexType >
bool raEntity< VertexType, bIndexed, IndexType >::Intersects ( const raVector3 pRayPos,
const raVector3 pRayDir,
float *  pDist 
)
virtual

Reimplemented from raRender.

Definition at line 264 of file raEntity.h.

◆ RenderMesh()

template<class VertexType , bool bIndexed, typename IndexType >
bool raEntity< VertexType, bIndexed, IndexType >::RenderMesh ( LPCSTR  techniqueName = "")
virtual

Implements IRAMesh.

Reimplemented in raParticleSystem, raGSEntity, and raTesselatinObject.

Definition at line 188 of file raEntity.h.

◆ SetupIndices()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual void raEntity< VertexType, bIndexed, IndexType >::SetupIndices ( )
inlineprotectedvirtual

◆ SetupVertices()

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
virtual void raEntity< VertexType, bIndexed, IndexType >::SetupVertices ( )
protectedpure virtual

Friends And Related Function Documentation

◆ raOctree

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
friend class raOctree
friend

Definition at line 6 of file raEntity.h.

Member Data Documentation

◆ m_nIndices

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
DWORD raEntity< VertexType, bIndexed, IndexType >::m_nIndices
protected

Definition at line 37 of file raEntity.h.

◆ m_nVertices

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
DWORD raEntity< VertexType, bIndexed, IndexType >::m_nVertices
protected

Definition at line 36 of file raEntity.h.

◆ m_OctreeRoot

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
raOctree* raEntity< VertexType, bIndexed, IndexType >::m_OctreeRoot
protected

Definition at line 42 of file raEntity.h.

◆ m_pIB

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
ID3D11Buffer* raEntity< VertexType, bIndexed, IndexType >::m_pIB
protected

Definition at line 34 of file raEntity.h.

◆ m_pIndices

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
IndexType* raEntity< VertexType, bIndexed, IndexType >::m_pIndices
protected

Definition at line 40 of file raEntity.h.

◆ m_pVB

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
ID3D11Buffer* raEntity< VertexType, bIndexed, IndexType >::m_pVB
protected

Definition at line 33 of file raEntity.h.

◆ m_pVertices

template<class VertexType, bool bIndexed = true, typename IndexType = UINT16>
VertexType* raEntity< VertexType, bIndexed, IndexType >::m_pVertices
protected

Definition at line 39 of file raEntity.h.


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