CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File 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 iObject * QueryObject ()=0
 Get the iObject for this portal. More...

virtual iSector * GetSector () const=0
 Return the sector that this portal points too. More...

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

virtual csFlags & GetFlags ()=0
 Set portal flags (see CS_PORTAL_XXX values). More...

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. More...

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

virtual void RemovePortalCallback (iPortalCallback *cb)=0
 Remove a portal callback. More...

virtual int GetPortalCallbackCount () const=0
 Get the number of portal callbacks. More...

virtual iPortalCallback * GetPortalCallback (int idx) const=0
 Get the specified portal callback. More...

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

virtual void RemoveMissingSectorCallback (iPortalCallback *cb)=0
 Remove a missing sector callback. More...

virtual int GetMissingSectorCallbackCount () const=0
 Get the number of missing sector callbacks. More...

virtual iPortalCallback * GetMissingSectorCallback (int idx) const=0
 Get the specified missing sector callback. More...

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

virtual iTextureHandle * GetTextureFilter () const=0
 Get the filter texture. More...

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

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

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. More...

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

virtual void SetMirror (const csPlane3 &plane)=0
 Set warping transformation to mirror around the given plane. More...

virtual const csReversibleTransform & GetWarp () const=0
 Get the warping transformation. More...

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

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

virtual csVector3 Warp (const csReversibleTransform &t, const csVector3 &pos) const=0
 Warp a position in world space given a object space to world space transform (this==object, other==world). More...

virtual void WarpSpace (const csReversibleTransform &warp_wor, 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, const csReversibleTransform &t, int alpha)=0
 Check frustum visibility of all polygons reachable through this portal. More...

virtual iPolygon3D * HitBeam (const csReversibleTransform &t, const csVector3 &start, const csVector3 &end, csVector3 &isect)=0
 Follow a beam through this portal and return the polygon that it hits with. 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.

Definition at line 117 of file portal.h.


Member Function Documentation

virtual void iPortal::CheckFrustum (  iFrustumView *    lview,
const csReversibleTransform &    t,
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). 't' is the transform from object to world (this2other).

virtual 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.

virtual void iPortal::GetColorFilter (  float &    r,
float &    g,
float &    b
)  const [pure virtual]
 

Get the current color filter.

virtual csFlags& iPortal::GetFlags (    )  [pure virtual]
 

Set portal flags (see CS_PORTAL_XXX values).

virtual int iPortal::GetMaximumSectorVisit (    )  const [pure virtual]
 

Get the maximum sector visit.

virtual iPortalCallback* iPortal::GetMissingSectorCallback (  int    idx )  const [pure virtual]
 

Get the specified missing sector callback.

virtual int iPortal::GetMissingSectorCallbackCount (    )  const [pure virtual]
 

Get the number of missing sector callbacks.

virtual iPortalCallback* iPortal::GetPortalCallback (  int    idx )  const [pure virtual]
 

Get the specified portal callback.

virtual int iPortal::GetPortalCallbackCount (    )  const [pure virtual]
 

Get the number of portal callbacks.

virtual iSector* iPortal::GetSector (    )  const [pure virtual]
 

Return the sector that this portal points too.

virtual iTextureHandle* iPortal::GetTextureFilter (    )  const [pure virtual]
 

Get the filter texture.

virtual const csReversibleTransform& iPortal::GetWarp (    )  const [pure virtual]
 

Get the warping transformation.

virtual void iPortal::HardTransform (  const csReversibleTransform &    t )  [pure virtual]
 

Hard transform the warp matrix.

virtual iPolygon3D* iPortal::HitBeam (  const csReversibleTransform &    t,
const csVector3 &    start,
const csVector3 &    end,
csVector3 &    isect
)  [pure virtual]
 

Follow a beam through this portal and return the polygon that it hits with.

This function properly acounts for space warping portals and also checks for infinite recursion (does not allow traversing the same sector more than five times). Returns the intersection point with the polygon in 'isect'. The given transform 't' is used to transform the warping matrix in the portal from object to world space (this==object, other==world).

virtual void iPortal::ObjectToWorld (  const csReversibleTransform &    t,
csReversibleTransform &    warp_wor
)  const [pure virtual]
 

Transform the warp matrix from object space to world space.

The transform 't' is object to world (this==object, other==world).

virtual iObject* iPortal::QueryObject (    )  [pure virtual]
 

Get the iObject for this portal.

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

Remove a missing sector callback.

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

Remove a portal callback.

virtual void iPortal::SetFilter (  float    r,
float    g,
float    b
)  [pure virtual]
 

Set a color filter (instead of the texture).

virtual void iPortal::SetFilter (  iTextureHandle *    ft )  [pure virtual]
 

Set the filter texture.

virtual 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.

virtual void iPortal::SetMirror (  const csPlane3 &    plane )  [pure virtual]
 

Set warping transformation to mirror around the given plane.

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

Set the missing sector callback.

This will call IncRef() on the callback So make sure you call DecRef() to release your own reference. Note that as soon as one of these callbacks creates the missing sector, the loop to call these callbacks will stop.

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

Set the portal callback.

This will call IncRef() on the callback So make sure you call DecRef() to release your own reference. Note that ALL portal callbacks have to return true before the portal is traversed.

virtual 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!

virtual void iPortal::SetWarp (  const csTransform &    t )  [pure virtual]
 

Set the warping transformation for this portal in object space and world space.

virtual void iPortal::SetWarp (  const csMatrix3 &    m_w,
const csVector3 &    v_w_before,
const csVector3 &    v_w_after
)  [pure virtual]
 

Set the warping transformation for this portal in object space and world space.

virtual csVector3 iPortal::Warp (  const csReversibleTransform &    t,
const csVector3 &    pos
)  const [pure virtual]
 

Warp a position in world space given a object space to world space transform (this==object, other==world).

virtual void iPortal::WarpSpace (  const csReversibleTransform &    warp_wor,
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.

'warp_wor' is the warp transformation in world space. '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.14