class csPortal This class represents a portal
| | CalculateLighting (csLightView& lview) Update lighting of all polygons reachable through this portal |
| | csPortal () Create a portal |
| | DisableSpaceWarping () Disable space warping |
| | Draw (csPolygon2D* new_clipper, csPolygon3D* portal_polygon, csRenderView& rview) Draw the sector that is visible through this portal |
| | FollowSegment (csReversibleTransform& t, csVector3& new_position, bool& mirror) Follow a segment through this portal and modify the given camera transformation according to the space warping |
| | GetAlpha () |
| | GetSector () Return the sector that this portal points too |
| | HitBeam (csVector3& start, csVector3& end) Follow a beam through this portal and return the polygon that it hits with |
| | IntersectSphere (csVector3& center, float radius, float* pr = NULL) Intersects world-space sphere through this sector |
| | IsClippingPortal () Is this a clipping portal? |
| | IsSpaceWarped () Check if space is warped by this portal |
| | IsStaticDest () Get static destination |
| | ObjectToWorld (const csReversibleTransform& t) Transform the warp matrix from object space to world space |
| | SetAlpha (int a) |
| | SetClippingPortal (bool c) Disable/enable clipping portal |
| | SetFilter (float r, float g, float b) Set the filter (instead of the texture) |
| | SetSector (csSector* s) Set the sector that this portal points too |
| | SetStaticDest (bool sd) Set static destination |
| | SetTexture (ITextureHandle* ft) Set the texture (used for filtering) |
| | SetWarp (const csTransform& t) Set the warping transformation for this portal in object space and world space |
| | SetWarp (const csMatrix3& m_w, const csVector3& v_w_before, const csVector3& v_w_after) Set the warping transformation for this portal in object space and world space |
| | WarpSpace (csReversibleTransform& t, bool& mirror) Warp space using the given world->camera transformation |
| | ~csPortal () Destructor. |
| | cfg_alpha 0 is no alpha, 25 is 25% see through and 75% texture, |
| | do_clip_portal If true then this portal will clip geometry in the destination sector |
| | do_mirror A flag which indicates if this portal mirrors space (changes the order of the vertices) |
| | do_warp_space If this polygon is a portal it possibly has a transformation matrix and vector to warp space in some way |
| | filter_r If filter_texture is NULL then this filter is used instead |
| | filter_texture A portal will change the intensity/color of the light that passes through it depending on the texture |
| | static_dest A flag which indicates if the destination of this portal should not be transformed from object to world space |
| | warp_obj Warp transform in object space. |
| | warp_wor Warp transform in world space. |
| | sector The sector that this portal points to. |
This class represents a portal. It belongs to some polygon which is then considered a portal to another sector.
't' is the transformation from world to camera space.
'new_clipper' is the new 2D polygon to which all things drawn
should be clipped.
Return true if succesful, false otherwise.
Failure to draw through a portal does not need to
be harmful. It can just mean that some maximum number is
reached (like the maximum number of times a certain sector
can be drawn through a mirror).
This function returns the destination.
int cfg_alpha
bool do_warp_space
bool do_mirror
bool do_clip_portal
bool static_dest
csReversibleTransform warp_obj
csReversibleTransform warp_wor
ITextureHandle* filter_texture
float filter_r
csPortal()
virtual ~csPortal()
csSector* GetSector()
void SetSector(csSector* s)
void ObjectToWorld(const csReversibleTransform& t)
void SetWarp(const csTransform& t)
void SetWarp(const csMatrix3& m_w, const csVector3& v_w_before, const csVector3& v_w_after)
bool IsSpaceWarped()
void DisableSpaceWarping()
void SetClippingPortal(bool c)
bool IsClippingPortal()
void SetStaticDest(bool sd)
bool IsStaticDest()
void SetTexture(ITextureHandle* ft)
void SetFilter(float r, float g, float b)
int GetAlpha()
void SetAlpha(int a)
void WarpSpace(csReversibleTransform& t, bool& mirror)
'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.
virtual bool Draw(csPolygon2D* new_clipper, csPolygon3D* portal_polygon, csRenderView& rview)
'portal_polygon' is the polygon containing this portal. This routine
will use the camera space plane of the portal polygon.
'rview' is the current csRenderView.
virtual csPolygon3D* HitBeam(csVector3& start, csVector3& end)
virtual csPolygon3D* IntersectSphere(csVector3& center, float radius, float* pr = NULL)
virtual csSector* FollowSegment(csReversibleTransform& t, csVector3& new_position, bool& mirror)
virtual void CalculateLighting(csLightView& lview)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de