Public Member Functions | Protected Member Functions | Friends

sp::scene::Portal Class Reference
[Scene Management]

#include <spScenePortal.hpp>

List of all members.

Public Member Functions

 Portal ()
 ~Portal ()
SectorgetNeighbor (Sector *SectorObj) const
bool connected (Sector *SectorObj) const
 Returns true if the given sector is connected with this poral.
bool connected () const
 Returns true if the portal is connected with two sectors.
bool insideViewFrustum (const ViewFrustum &Frustum) const
 Returns true if this portal is inside the given view frustum.
bool transformViewFrustum (const dim::vector3df &ViewOrigin, ViewFrustum &Frustum) const
 Transforms the given view frustum with this portal and returns true if the portal is inside the given frustum.
void setTransformation (const dim::matrix4f &Transform)
 Sets the portal's transformation matrix.
dim::matrix4f getTransformation () const
 Returns the portal's transformation matrix.
void setEnable (bool Enable)
 Enables or disables the portal. This is very useful when doors are closed.
bool getEnable () const
 Returns true if the portal is enabled. By default true.
void setFrontSector (Sector *SectorObj)
 Sets the portal's front sector connection.
SectorgetFrontSector () const
 Returns a pointer to the portal's front sector.
void setBackSector (Sector *SectorObj)
 Sets the portal's back sector connection.
SectorgetBackSector () const
 Returns a pointer to the portal's back sector.
const dim::vector3dfgetPoint (u32 Index) const

Protected Member Functions

bool connect (Sector *SectorObj)
bool disconnect (Sector *SectorObj)

Friends

class Sector

Detailed Description

This is the portal class for portal-based scene graphs.

Since:
Version 3.2

Constructor & Destructor Documentation

sp::scene::Portal::Portal (  ) 
sp::scene::Portal::~Portal (  ) 

Member Function Documentation

bool sp::scene::Portal::connect ( Sector SectorObj  )  [protected]

Connects the given sector with this portal and returns true on success. Otherwise this portal is already connected with two sectors.

bool sp::scene::Portal::connected ( Sector SectorObj  )  const

Returns true if the given sector is connected with this poral.

bool sp::scene::Portal::connected (  )  const

Returns true if the portal is connected with two sectors.

bool sp::scene::Portal::disconnect ( Sector SectorObj  )  [protected]

Disconnects the given sector with this portal and returns true on success. Otherwise this portal was not connected with the given sector.

Sector* sp::scene::Portal::getBackSector (  )  const [inline]

Returns a pointer to the portal's back sector.

bool sp::scene::Portal::getEnable (  )  const [inline]

Returns true if the portal is enabled. By default true.

Sector* sp::scene::Portal::getFrontSector (  )  const [inline]

Returns a pointer to the portal's front sector.

Sector* sp::scene::Portal::getNeighbor ( Sector SectorObj  )  const

Returns the neighbor sector for the given one. If the given sector is not connected to this portal the return value is null.

const dim::vector3df& sp::scene::Portal::getPoint ( u32  Index  )  const [inline]

Returns the portal's points (or rather corner) with the given index.

Parameters:
[in] Index Specifies the point's index. This must be 0, 1, 2 or 3.
Note:
An invalid index will cause a buffer overflow!
dim::matrix4f sp::scene::Portal::getTransformation (  )  const

Returns the portal's transformation matrix.

bool sp::scene::Portal::insideViewFrustum ( const ViewFrustum Frustum  )  const

Returns true if this portal is inside the given view frustum.

void sp::scene::Portal::setBackSector ( Sector SectorObj  )  [inline]

Sets the portal's back sector connection.

void sp::scene::Portal::setEnable ( bool  Enable  )  [inline]

Enables or disables the portal. This is very useful when doors are closed.

void sp::scene::Portal::setFrontSector ( Sector SectorObj  )  [inline]

Sets the portal's front sector connection.

void sp::scene::Portal::setTransformation ( const dim::matrix4f Transform  ) 

Sets the portal's transformation matrix.

bool sp::scene::Portal::transformViewFrustum ( const dim::vector3df ViewOrigin,
ViewFrustum Frustum 
) const

Transforms the given view frustum with this portal and returns true if the portal is inside the given frustum.


Friends And Related Function Documentation

friend class Sector [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines