Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

SkyBox Class Reference

#include <skybox.h>

Inheritance diagram for SkyBox:

Inheritance graph
[legend]
Collaboration diagram for SkyBox:

Collaboration graph
[legend]
List of all members.

Detailed Description

Wrapper class for skybox rendering.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 DefineVisitable () public
 Skybox planes.

 SkyBox (float fSize=100.0f, const Vector3d &rkOffset=Vector3d::ZERO)
virtual ~SkyBox ()
void SetMaterial (SKYBOXPLANE ePlane, MaterialPtr &pkMaterial)
virtual bool Render (Frustum *pkFrustum=0, bool bForce=false)
SceneNodeGetSceneNode ()
BoundingVolumeGetBoundingVolume ()
void SetBoundingVolume (BoundingVolume *pkBoundingVolume)
virtual SceneEntityDuplicate ()
virtual bool Intersection (BoundingVolume *pkObj, ContactSet *pkContactSet=0, bool bInvertNormal=false)
virtual bool Intersection (const Ray &rkRay, ContactSet *pkContactSet=0)
virtual void Update (float fDeltaTime)
bool IsActive () const
virtual void Activate ()
virtual void Deactivate ()
bool Toggle ()
virtual void Accept (BaseVisitor &rkVisitor)=0

Public Attributes

unsigned int m_uiLastFrame

Static Public Attributes

unsigned int s_uiFrameCount

Protected Member Functions

virtual void SetNode ()

Static Protected Member Functions

template<class NodeType> void AcceptImpl (NodeType &rkVisited, BaseVisitor &rkVisitor)

Protected Attributes

VertexBufferPtr m_apkVertexBuffer [NUMPLANES]
PolygonStripBufferPtr m_pkPolygonBuffer
MaterialPtr m_apkMaterial [NUMPLANES]
SceneNodem_pkNode
BoundingVolumem_pkBoundingVolume
bool m_bActive


Constructor & Destructor Documentation

SkyBox float  fSize = 100.0f,
const Vector3d rkOffset = Vector3d::ZERO
 

Parameters:
fSize Size
rkOffset Offset vector

virtual ~SkyBox  )  [virtual]
 

Deallocate memory, free textures


Member Function Documentation

DefineVisitable  )  [inline]
 

Skybox planes.

-Z plane

+Z plane

-X plane

+X plane

+Y plane

-Y plane

Number of planes in box

Reimplemented from SceneEntity.

void SetMaterial SKYBOXPLANE  ePlane,
MaterialPtr &  pkMaterial
 

Set material for plane

Parameters:
ePlane Plane
pkMaterial New material

virtual bool Render Frustum pkFrustum = 0,
bool  bForce = false
[virtual]
 

Render skybox

Reimplemented from RenderEntity.

virtual void SetNode  )  [inline, protected, virtual, inherited]
 

Called by scene node when entity has been set to a node

Reimplemented in MeshEntity.

SceneNode* GetSceneNode  )  [inline, inherited]
 

Returns:
parent scene node

BoundingVolume* GetBoundingVolume  )  [inline, inherited]
 

Returns:
Bounding volume

void SetBoundingVolume BoundingVolume pkBoundingVolume  )  [inherited]
 

Set new bounding volume object. Old bounding volume object will be deleted. The new bounding volume SRT data should be in LOCAL space, the world space SRT data will be calculated internally

Parameters:
pkBoundingVolume New bounding volume object

virtual SceneEntity* Duplicate  )  [inline, virtual, inherited]
 

Duplicate entity

Returns:
New entity that is exact copy of entity, or null if not supported by entity type

Reimplemented in MeshEntity.

virtual bool Intersection BoundingVolume pkObj,
ContactSet pkContactSet = 0,
bool  bInvertNormal = false
[inline, virtual, inherited]
 

Intersection test with unknown object type

Parameters:
pkObj Bounding volume object to test for intersection with
pkContactSet Collision set object receiving collision contact data, 0 if not needed
bInvertNormal If false, collision normal will point from passed object to this. If true, normal will point in other direction
Returns:
true if volumes intersect, false if not

Reimplemented in MeshEntity.

virtual bool Intersection const Ray rkRay,
ContactSet pkContactSet = 0
[inline, virtual, inherited]
 

Intersection test with ray

Parameters:
rkRay Ray
pkContactSet Collision set object receiving collision contact data, 0 if not needed
Returns:
true if volumes intersect, false if not

Reimplemented in MeshEntity.

virtual void Update float  fDeltaTime  )  [inline, virtual, inherited]
 

Update object

Parameters:
fDeltaTime Time passed since last update

Reimplemented in AnimatedNode, AnimatedSubMesh, Animation, AnimatorController, MassParticle, MeshEntity, NodeAnimatorController, ParticleSystem, PhysicsManager, PhysicsNode, RigidBody, SceneNode, Skeleton, SkeletalSubMesh, SubMesh, SubMeshAnimatorController, Animation< SubMeshKeyframe >, Animation< NodeKeyframe >, AnimatorController< SubMeshAnimation >, AnimatorController< NodeAnimation >, and AnimatorController< SkeletonAnimation >.

bool IsActive  )  const [inline, inherited]
 

Query state of object

Returns:
true if active, false if not

void Activate  )  [inline, virtual, inherited]
 

Activate object

void Deactivate  )  [inline, virtual, inherited]
 

Deactivate object

bool Toggle  )  [inline, inherited]
 

Toggle active state. This method does not need to be overloaded, it is only a wrapper to Activate and Deactivate

Returns:
true if activated, false if deactivated

void AcceptImpl NodeType &  rkVisited,
BaseVisitor rkVisitor
[inline, static, protected, inherited]
 

Accept visitors if implementation available

Parameters:
rkVisited Node being visited
rkVisitor Visitor

virtual void Accept BaseVisitor rkVisitor  )  [pure virtual, inherited]
 

Accept a visitor

Parameters:
rkVisitor Visitor


Member Data Documentation

VertexBufferPtr m_apkVertexBuffer[NUMPLANES] [protected]
 

Vertex buffers

PolygonStripBufferPtr m_pkPolygonBuffer [protected]
 

Polygon buffer

MaterialPtr m_apkMaterial[NUMPLANES] [protected]
 

Materials for all sides

SceneNode* m_pkNode [protected, inherited]
 

Parent scene node object

BoundingVolume* m_pkBoundingVolume [protected, inherited]
 

Bounding volume for this entity

bool m_bActive [protected, inherited]
 

Active flag

unsigned int s_uiFrameCount [static, inherited]
 

Frame counter (at 500 frames per second, can be active ~100 days continously before loop, and then it will just skip one frame -> safe enough)

unsigned int m_uiLastFrame [inherited]
 

Last frame count we were rendered


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:15 2004 for NeoEngine by doxygen 1.3.5