C4 Engine
C4 Engine API Documentation

class PortalObject

Defined in:  C4Portals.h
The PortalObject class encapsulates data for a portal.
Definition

class PortalObject : public Object

Member Functions
PortalObject::GetPortalType Returns the portal type.
PortalObject::GetPortalFlags Returns the portal flags.
PortalObject::SetPortalFlags Sets the portal flags.
PortalObject::GetVertexCount Returns the number of vertices defining the boundary of the portal.
PortalObject::SetVertexCount Sets the number of vertices defining the boundary of the portal.
PortalObject::GetVertexArray Returns the object-space vertex array defining the boundary of the portal.
PortalObject::SetPortalSize Configures a portal to be a rectangle of given size.
Constructor

PortalObject(PortalType type);

PortalObject(PortalType type, const Vector2D& size);

The constructors have protected access. The PortalObject class can only exist as the base class for a more specific type of portal.
Parameters
type The portal type. See below for a list of possible types.
size The width and height of a rectangular portal.
Description
The PortalObject class is the base class for all types of portal objects, and it stores data that is common to all of them. Each specific type of portal has an associated object that is a subclass of the PortalObject class.

A portal object can have one of the following types.
kPortalDirect Ordinary portal that leads from one zone to another through a polygonal boundary.
kPortalIndirect Portal having an indirect transform. This is used for rendering into the reflection and refraction buffers for things like mirrors and portals through which remote areas of the world can be seen.
kPortalCamera Special portal used internally for camera widgets in panel effects.
kPortalOcclusion Occluder, or antiportal, that blocks objects behind it from the perspective of the camera.
Base Classes
Object A PortalObject is an object that can be shared by multiple portal nodes.
See Also

Portal

ZoneObject

Wiki Articles

Portals