iPortalContainer Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
iPortalContainer Struct Reference
Crystal Space 3D Engine

A container for portals. More...

`#include <iengine/portalcontainer.h>`

Inheritance diagram for iPortalContainer:

List of all members.

## Public Member Functions
virtual void | ComputeScreenPolygons (iRenderView *rview, csVector2 *verts2D, csVector3 *verts3D, size_t vertsSize, size_t *numVerts, int viewWidth, int viewHeight)=0
| Compute the normalized screen-space and camera-space polygons for all portals.
virtual iPortal * | CreatePortal (csVector3 *vertices, int num)=0
| Create a new portal.
virtual void | Draw (iRenderView *rview)=0
| Render the portal container.
virtual iPortal * | GetPortal (int idx) const =0
| Get a specific portal.
virtual int | GetPortalCount () const =0
| Get the number of portals in this contain.
virtual size_t | GetTotalVertexCount () const =0
| Get the total amount of vertices used by all portals.
virtual void | RemovePortal (iPortal *portal)=0
| Remove a portal.

## Detailed Description

A container for portals.

Main creators of instances implementing this interface:

- iEngine::CreatePortalContainer()
- iEngine::CreatePortal()

Main ways to get pointers to this interface:

- scfQueryInterface<iMeshObject>() from a portal container mesh.

Main users of this interface:

- iEngine

Definition at line 51 of file portalcontainer.h.

## Member Function Documentation

virtual void iPortalContainer::ComputeScreenPolygons | ( | iRenderView * | rview,
|  | csVector2 * | verts2D,
|  | csVector3 * | verts3D,
|  | size_t | vertsSize,
|  | size_t * | numVerts,
|  | int | viewWidth,
|  | int | viewHeight
| ) |  | `[pure virtual]`

Compute the normalized screen-space and camera-space polygons for all portals.

Parameters:

  rview | Render view for which to compute the screen space polys.
  verts2D | Output buffer receiving the normalized screen space coordinates.
  verts3D | Output buffer receiving the camera space coordinates corresponding to the screen space coordinates.
  vertsSize | Size of the verts buffer.
  numVerts | Output buffer receiving the number of vertices in each polygon.
  viewWidth | Width of the view in which the polys are computed.
  viewHeight | Height of the view in which the polys are computed.

Remarks:
  The polygon vertices are stored in a flat fashion. To obtain the vertices for a certain polygon, sum up the vertex numbers for all previous polygons and use that as an index into the vertices array.
  Portals that face away from the camera, are culled etc. will result in polygons with 0 vertices.

virtual iPortal* iPortalContainer::CreatePortal | ( | csVector3 * | vertices,
|  | int | num
| ) |  | `[pure virtual]`

Create a new portal.

virtual void iPortalContainer::Draw | ( | iRenderView * | rview | ) | `[pure virtual]`

Render the portal container.

virtual iPortal* iPortalContainer::GetPortal | ( | int | idx | ) | const`[pure virtual]`

Get a specific portal.

virtual int iPortalContainer::GetPortalCount | ( |  | ) | const`[pure virtual]`

Get the number of portals in this contain.

virtual size_t iPortalContainer::GetTotalVertexCount | ( |  | ) | const`[pure virtual]`

Get the total amount of vertices used by all portals.

virtual void iPortalContainer::RemovePortal | ( | iPortal * | portal | ) | `[pure virtual]`

Remove a portal.

The documentation for this struct was generated from the following file:

- iengine/portalcontainer.h