![]() |
Public API Reference |
#include <portal.h>
Inheritance diagram for iPortal:
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 const csVector3 * | GetVertices () const=0 |
Get an array of object space vertices. More... | |
virtual int * | GetVertexIndices () const=0 |
Get an array of vertex indices (indices in the array returned by GetVertices()). More... | |
virtual int | GetVertexIndicesCount () const=0 |
Get the number of vertex indices. 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 0 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... |
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.
|
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). |
|
Check if the destination sector is 0 and if so call the callback. This function returns false if the portal should not be traversed. |
|
Get the current color filter.
|
|
Set portal flags (see CS_PORTAL_XXX values).
|
|
Get the maximum sector visit.
|
|
Get the specified missing sector callback.
|
|
Get the number of missing sector callbacks.
|
|
Get the specified portal callback.
|
|
Get the number of portal callbacks.
|
|
Return the sector that this portal points too.
|
|
Get the filter texture.
|
|
Get an array of vertex indices (indices in the array returned by GetVertices()).
|
|
Get the number of vertex indices.
|
|
Get an array of object space vertices. Use this in combination with GetVertexIndices() to find out where the portal is. |
|
Get the warping transformation.
|
|
Hard transform the warp matrix.
|
|
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). |
|
Transform the warp matrix from object space to world space. The transform 't' is object to world (this==object, other==world). |
|
Get the iObject for this portal.
|
|
Remove a missing sector callback.
|
|
Remove a portal callback.
|
|
Set a color filter (instead of the texture).
|
|
Set the filter texture.
|
|
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. |
|
Set warping transformation to mirror around the given plane.
|
|
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. |
|
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. |
|
Set the sector that this portal points too. To avoid circular references, the sector is not IncRef'ed! |
|
Set the warping transformation for this portal in object space and world space.
|
|
Set the warping transformation for this portal in object space and world space.
|
|
Warp a position in world space given a object space to world space transform (this==object, other==world).
|
|
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. |