63 virtual const AxisAlignedBox& getWorldBoundingBox(
bool derive =
false)
const;
65 virtual const Sphere& getWorldBoundingSphere(
bool derive =
false)
const;
70 void setCurrentHomeZone(
PCZone* zone);
72 void setNewHomeZone(
PCZone* zone);
75 void setCorner(
int index,
const Vector3& point);
77 void setCorners(
const Vector3* corners);
87 case PORTAL_TYPE_QUAD:
89 "Cannot setDirection on a Quad type portal",
90 "Portal::setDirection");
92 case PORTAL_TYPE_AABB:
93 case PORTAL_TYPE_SPHERE:
98 "Valid parameters are Vector3::UNIT_Z or Vector3::NEGATIVE_UNIT_Z",
99 "Portal::setDirection");
107 void calcDirectionAndRadius()
const;
112 Real getRadius()
const;
116 {
return mCurrentHomeZone; }
119 {
return mNewHomeZone; }
123 {
return mCorners[index]; }
126 {
return mDirection; }
130 {
return mDerivedCorners[index]; }
133 {
return mDerivedDirection; }
136 {
return mDerivedCP; }
139 {
return mDerivedSphere; }
142 {
return mDerivedPlane; }
146 {
return mPrevDerivedCP; }
149 {
return mPrevDerivedPlane; }
152 void updateDerivedValues()
const;
157 { mEnabled = value; }
173 bool intersects(
const Sphere& sphere);
179 bool intersects(
const Ray& ray);
187 bool crossedPortal(
const PortalBase* otherPortal);
196 {
return getRadius(); }
209 updateDerivedValues();
217 mDerivedUpToDate =
false;
224 const Capsule& getCapsule()
const;
Representation of a ray in space, i.e.
const Vector3 & getDerivedCP() const
Get the position (centerpoint) of the portal in world coordinates.
Real mRadius
Radius of the sphere enclosing the portal.
static const Vector3 UNIT_Z
Class encapsulating a standard 4x4 homogeneous matrix.
const Vector3 & getPrevDerivedCP() const
Get the previous position (centerpoint) of the portal in world coordinates.
PCZone * mCurrentHomeZone
Zone this portal is currently owned by (in)
float Real
Software floating point type.
Vector3 * mDerivedCorners
Derived (world coordinates) Corners of the portal.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Defines a plane in 3D space.
const Vector3 & getCorner(int index) const
Get the coordinates of one of the portal corners in local space.
Vector3 mDerivedCP
Derived (world coordinates) of portal (center point)
PCZone * getCurrentHomeZone()
Get the Zone the Portal is currently "in".
Vector3 * mCorners
Corners of the portal - coordinates are relative to the sceneNode.
Plane mDerivedPlane
Derived (world coordinates) Plane of the portal.
const Vector3 & getDerivedCorner(int index) const
Get the derived (world) coordinates of one of the portal corners.
Plane mPrevDerivedPlane
Previous frame derived plane.
A 3D box aligned with the x/y/z axes.
void _updateRenderQueue(RenderQueue *queue)
void _notifyMoved()
Called when scene node moved.
Interface definition for a factory class which produces a certain kind of MovableObject, and can be registered with Root in order to allow all clients to produce new instances of this object, integrated with the standard Ogre processing.
PCZone * mNewHomeZone
zone to transfer this portal to
PortalBase - Base class to Portal and AntiPortal classes.
const Plane & getDerivedPlane() const
Get the portal plane in world coordinates.
Abstract class defining a movable object in a scene.
Class representing a node in the scene graph.
bool mDerivedUpToDate
flag indicating whether or not derived values are up-to-date
PCZone * getNewHomeZone()
Get the Zone the Portal should be moved to.
Vector3 mDerivedDirection
Derived (world coordinates) direction of the portal.
Matrix4 mPrevWorldTransform
bool getEnabled() const
check if portal is enabled
void setEnabled(bool value)
enable the portal
AxisAlignedBox mLocalPortalAAB
static const Vector3 NEGATIVE_UNIT_Z
void setDirection(const Vector3 &d)
Set the "inward/outward norm" direction of AAB or SPHERE portals NOTE: UNIT_Z = "outward" norm...
void _notifyAttached(Node *parent, bool isTagPoint=false)
Called when attached to a scene node.
A sphere primitive, mostly used for bounds checking.
#define _OgrePCZPluginExport
Vector3 mPrevDerivedCP
Previous frame portal cp (in world coordinates)
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
Real getBoundingRadius() const
virtual void _notifyAttached(Node *parent, bool isTagPoint=false)
Internal method called to notify the object that it has been attached to a node.
Standard 3-dimensional vector.
#define OGRE_EXCEPT(code, desc, src)
AxisAlignedBox mPortalAAB
PORTAL_TYPE getType() const
get the type of portal
Represents a convex volume bounded by planes.
const Vector3 & getDirection() const
Get the direction vector of the portal in local space.
const Vector3 & getDerivedDirection() const
Get the direction of the portal in world coordinates.
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Class to manage the scene object rendering queue.
Portal-Connected Zone datastructure for managing scene nodes.
Vector3 mDirection
Direction ("Norm") of the portal -.
AxisAlignedBox mPrevPortalAAB
Factory object for creating Portal instances.
const Plane & getPrevDerivedPlane() const
Get the previous portal plane in world coordinates.
Class representing a general-purpose node an articulated scene graph.
Sphere mDerivedSphere
Sphere of the portal centered on the derived CP.
const Sphere & getDerivedSphere() const
Get the sphere centered on the derived CP of the portal in world coordinates.
bool mLocalsUpToDate
flag indicating whether or not local values are up-to-date