Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iPortal Struct Reference

This is the interface to the Portal objects. More...

#include <portal.h>

Inheritance diagram for iPortal:

iReference iBase List of all members.

Public Methods

virtual iObjectQueryObject ()=0
 Get the iObject for this portal.

virtual iSectorGetSector () const=0
 Return the sector that this portal points too.

virtual void SetSector (iSector *s)=0
 Set the sector that this portal points too. More...

virtual csFlagsGetFlags ()=0
 Set portal flags (see CS_PORTAL_XXX values).

virtual void SetMaximumSectorVisit (int msv)=0
 Set the number of times that this portal will allow for watching the same portal. More...

virtual int GetMaximumSectorVisit () const=0
 Get the maximum sector visit.

virtual void SetPortalCallback (iPortalCallback *cb)=0
 Set the portal callback. More...

virtual iPortalCallbackGetPortalCallback () const=0
 Get the portal callback.

virtual void SetMissingSectorCallback (iPortalCallback *cb)=0
 Set the missing sector callback. More...

virtual iPortalCallbackGetMissingSectorCallback () const=0
 Get the missing sector callback.

virtual void SetFilter (iTextureHandle *ft)=0
 Set the filter texture.

virtual iTextureHandleGetTextureFilter () const=0
 Get the filter texture.

virtual void SetFilter (float r, float g, float b)=0
 Set a color filter (instead of the texture).

virtual void GetColorFilter (float &r, float &g, float &b) const=0
 Get the current color filter.

virtual void SetWarp (const csMatrix3 &m_w, const csVector3 &v_w_before, const csVector3 &v_w_after)=0
 Set the warping transformation for this portal in object space and world space.

virtual void SetWarp (const csTransform &t)=0
 Set the warping transformation for this portal in object space and world space.

virtual void SetMirror (iPolygon3D *iPoly)=0
 Set warping transformation to mirror around given polygon.

virtual const csReversibleTransformGetWarp () const=0
 Get the warping transformation.

virtual void ObjectToWorld (const csReversibleTransform &t)=0
 Transform the warp matrix from object space to world space.

virtual void HardTransform (const csReversibleTransform &t)=0
 Hard transform the warp matrix.

virtual csVector3 Warp (const csVector3 &pos) const=0
 Warp a position in world space.

virtual void WarpSpace (csReversibleTransform &t, bool &mirror) const=0
 Warp space using the given world->camera transformation. More...

virtual bool CompleteSector (iBase *context)=0
 Check if the destination sector is NULL and if so call the callback. More...

virtual void CheckFrustum (iFrustumView *lview, int alpha)=0
 Check frustum visibility of all polygons reachable through this portal. More...


Detailed Description

This is the interface to the Portal objects.

Polygons that are really `openings' to different areas have a portal associated with them. The portal object defines where the opening leads, how exactly the geometry behind portal is to be handled and so on.


Member Function Documentation

void iPortal::CheckFrustum ( iFrustumView * lview,
int alpha ) [pure virtual]
 

Check frustum visibility of all polygons reachable through this portal.

Alpha is the alpha value you'd like to use to pass through this portal (0 is no completely transparent, 100 is complete opaque).

bool iPortal::CompleteSector ( iBase * context ) [pure virtual]
 

Check if the destination sector is NULL and if so call the callback.

This function returns false if the portal should not be traversed.

void iPortal::SetMaximumSectorVisit ( int msv ) [pure virtual]
 

Set the number of times that this portal will allow for watching the same portal.

By default this is 5 which means that in one recursion level this portal will visit every sector at maximum 5 times.

void iPortal::SetMissingSectorCallback ( iPortalCallback * cb ) [pure virtual]
 

Set the missing sector callback.

This will call IncRef() on the callback (and possible DecRef() on the old callback). So make sure you call DecRef() to release your own reference.

void iPortal::SetPortalCallback ( iPortalCallback * cb ) [pure virtual]
 

Set the portal callback.

This will call IncRef() on the callback (and possible DecRef() on the old callback). So make sure you call DecRef() to release your own reference.

void iPortal::SetSector ( iSector * s ) [pure virtual]
 

Set the sector that this portal points too.

To avoid circular references, the sector is not IncRef'ed!

void iPortal::WarpSpace ( csReversibleTransform & t,
bool & mirror ) const [pure virtual]
 

Warp space using the given world->camera transformation.

This function modifies the given camera transformation to reflect the warping change.

't' is the transformation from world to camera space.
'mirror' is true if the camera transformation transforms all polygons so that the vertices are ordered anti-clockwise. 'mirror' will be modified by warp_space if needed.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000