QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::PortalInstance Struct Reference
[QServer]

Instance required for using Portal. More...

#include <Q/q.h>

Inheritance diagram for Q::PortalInstance:

Q::Instance Q::Object Q::ObjectBase List of all members.

Public Member Functions

 PortalInstance ()
 PortalInstance (const char *name)
PortalInstance neighbour () const
Text neighbourName () const
bool active () const
bool loadThrough () const
Utils::Result setLoadThrough (bool)
Utils::Result setNeighbour (const PortalInstance &)
Utils::Result setNeighbourName (const char *name)
Utils::Result setActive (bool b)

Static Public Member Functions

PortalInstance create (const char *name, const Portal &p, const Group &group, const Database &db=Database())
PortalInstance find (const char *name)
ClassType classType ()
PortalInstance cast (const ObjectBase &)

Detailed Description

Instance required for using Portal.

The PortalInstance object is used with Portal to define a link to a neighbouring zone. The portal instance contains a reference to a corresponding portal instance in the neighbouring zone. The portal polygon of this instance is rendered with an appropriate view of the neighbouring zone's scene graph based on the location of the neighbouring portal instance.

Neighbouring portal instances can be referenced by name, in which case the neighbouring portal is searched for at runtime. This makes it possible to author zones in separate databases.


Constructor & Destructor Documentation

Q::PortalInstance::PortalInstance  )  [inline]
 

Create a null portal instance reference.

Q::PortalInstance::PortalInstance const char *  name  ) 
 

Search the currently attached databases for a portal instance with the given name.


Member Function Documentation

bool Q::PortalInstance::active  )  const
 

Return true if this portal instance is active. Only active portal instances are rendered. This is identical to calling !Instance::disabled().

PortalInstance Q::PortalInstance::cast const ObjectBase  )  [static]
 

If the object referenced by obj is a portal instance, then return a suitable PortalInstance reference to the object.

Note:
Casting this object will cause it to be loaded from the database if it is not currently resident.

Reimplemented from Q::Instance.

ClassType Q::PortalInstance::classType  )  [static]
 

Return the type for this class.

Reimplemented from Q::Instance.

PortalInstance Q::PortalInstance::create const char *  name,
const Portal p,
const Group group,
const Database db = Database()
[static]
 

Create a new portal instance named name in the given database, db, (or the most recently attached read-write database if db is null). The portal p is bound into the scene graph at location group.

PortalInstance Q::PortalInstance::find const char *  name  )  [static]
 

Search the currently attached databases for a portal instance with the given name and return that object, if it exists.

Reimplemented from Q::Instance.

bool Q::PortalInstance::loadThrough  )  const
 

Return the load through state of the portal instance. If this state is true, preloading and simulation operate normally. When false the neighbour zone is not preloaded nor simulated unless reachable from another portal.

Warning:
This feature is currently not implemented.

PortalInstance Q::PortalInstance::neighbour  )  const
 

Return the neighbouring portal instance.

Text Q::PortalInstance::neighbourName  )  const
 

Return the name of the neighbouring portal instance.

Utils::Result Q::PortalInstance::setActive bool  b  ) 
 

If b is true then set the portal to be active, otherwise set it to inactive. This is identical to calling Instance::setDisabled(!b).

Utils::Result Q::PortalInstance::setLoadThrough bool   ) 
 

Change the load through state of the portal instance. load through is true by default.

Warning:
This feature is currently not implemented.

Utils::Result Q::PortalInstance::setNeighbour const PortalInstance  ) 
 

Set the neighbouring portal instance.

Utils::Result Q::PortalInstance::setNeighbourName const char *  name  ) 
 

Set the name of the neighbouring portal instance.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004