Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OgreRefApp::CollideCamera Class Reference

A camera which can interact with the world. More...

#include <OgreRefAppCollideCamera.h>

Inheritance diagram for OgreRefApp::CollideCamera:

OgreRefApp::ApplicationObject Ogre::UserDefinedObject List of all members.

Public Member Functions

 CollideCamera (const String &name)
CameragetRealCamera (void)
 Gets the internal Camera object.

void _notifyCollided (SceneQuery::WorldFragment *wf, const CollisionInfo &info)
 This method is called automatically if testCollide indicates a real collision.

void setOrientation (const Quaternion &orientation)
 Sets the orientation of this object.

const QuaterniongetOrientation (void)
 Gets the current orientation of this object.

void translate (const Vector3 &d)
 Moves the object along it's local axes.

void roll (const Radian &angle)
 Rotate the object around the local Z-axis.

void roll (Real angleunits)
void pitch (const Radian &angle)
 Rotate the object around the local X-axis.

void pitch (Real angleunits)
void yaw (const Radian &angle)
 Rotate the object around the local Y-axis.

void yaw (Real angleunits)
void rotate (const Vector3 &axis, const Radian &angle)
 Rotate the object around an arbitrary axis.

void rotate (const Vector3 &axis, Real angleunits)
void rotate (const Quaternion &q)
 Rotate the object around an aritrary axis using a Quarternion.

void setProjectionType (ProjectionType pt)
 Sets the type of projection to use (orthographic or perspective).

ProjectionType getProjectionType (void) const
 Retrieves info on the type of projection used (orthographic or perspective).

void setPolygonMode (PolygonMode sd)
 Sets the level of rendering detail required from this camera.

PolygonMode getPolygonMode (void) const
 Retrieves the level of detail that the camera will render.

void setDirection (Real x, Real y, Real z)
 Sets the camera's direction vector.

void setDirection (const Vector3 &vec)
 Sets the camera's direction vector.

Vector3 getDirection (void) const
void lookAt (const Vector3 &targetPoint)
 Points the camera at a location in worldspace.

void lookAt (Real x, Real y, Real z)
 Points the camera at a location in worldspace.

void setFixedYawAxis (bool useFixed, const Vector3 &fixedAxis=Vector3::UNIT_Y)
 Tells the camera whether to yaw around it's own local Y axis or a fixed axis of choice.

void setFOVy (const Radian &fovy)
 Sets the Y-dimension Field Of View (FOV) of the camera.

void setFOVy (Real fovy)
const RadiangetFOVy (void) const
 Retrieves the cameras Y-dimension Field Of View (FOV).

void setNearClipDistance (Real nearDist)
 Sets the position of the near clipping plane.

Real getNearClipDistance (void) const
 Sets the position of the near clipping plane.

void setFarClipDistance (Real farDist)
 Sets the distance to the far clipping plane.

Real getFarClipDistance (void) const
 Retrieves the distance from the camera to the far clipping plane.

void setAspectRatio (Real ratio)
 Sets the aspect ratio for the camera viewport.

Real getAspectRatio (void) const
 Retreives the current aspect ratio.

const PlanegetFrustumPlane (FrustumPlane plane)
 Retrieves a specified plane of the frustum.

bool isVisible (const AxisAlignedBox &bound, FrustumPlane *culledBy=0)
 Tests whether the given container is visible in the Frustum.

bool isVisible (const Sphere &bound, FrustumPlane *culledBy=0)
 Tests whether the given container is visible in the Frustum.

bool isVisible (const Vector3 &vert, FrustumPlane *culledBy=0)
 Tests whether the given vertex is visible in the Frustum.

virtual void setPosition (const Vector3 &vec)
 Sets the position of this object.

virtual void setPosition (Real x, Real y, Real z)
 Sets the position of this object.

virtual const Vector3getPosition (void)
 Gets the current position of this object.

virtual void _updateFromDynamics (void)
 Updates the position of this game object from the simulation.

virtual bool isCollisionEnabled (void)
 Returns whether or not this object is considered for collision.

virtual bool isDynamicsEnabled (void)
 Returns whether or not this object is physically simulated.

virtual void setDynamicsDisableThreshold (Real linearSq, Real angularSq, Real overTime)
 Sets the linear and angular velocity thresholds, below which the object will have it's dynamics automatically disabled for performance.

virtual void setCollisionEnabled (bool enabled)
virtual void setDynamicsEnabled (bool enabled, bool reEnableOnInteraction=false)
 Sets whether or not this object is physically simulated at this time.

virtual void setBounceParameters (Real restitutionValue, Real velocityThreshold)
 Sets the 'bounciness' of this object.

virtual Real getBounceRestitutionValue (void)
 Gets the cefficient of restitution (bounciness) for this object.

virtual Real getBounceVelocityThreshold (void)
 Gets the bounce velocity threshold for this object.

virtual void setSoftness (Real softness)
 Sets the softness of this object, which determines how much it is allowed to penetrate other objects.

virtual Real getSoftness (void)
 Gets the softness factor of this object.

virtual void setFriction (Real friction)
 Sets the Coulomb frictional coefficient for this object.

virtual Real getFriction (void)
 Gets the Coulomb frictional coefficient for this object.

virtual void addForce (const Vector3 &direction, const Vector3 &atPosition=Vector3::ZERO)
 Adds a linear force to this object, in object space, at the position indicated.

virtual void addForce (Real dir_x, Real dir_y, Real dir_z, Real pos_x=0, Real pos_y=0, Real pos_z=0)
 Adds a linear force to this object, in object space, at the position indicated.

virtual void addForceWorldSpace (const Vector3 &direction, const Vector3 &atPosition=Vector3::ZERO)
 Adds a linear force to this object, in world space, at the position indicated.

virtual void addForceWorldSpace (Real dir_x, Real dir_y, Real dir_z, Real pos_x, Real pos_y, Real pos_z)
 Adds a linear force to this object, in world space, at the position indicated.

virtual void addTorque (const Vector3 &direction)
 Adds rotational force to this object, in object space.

virtual void addTorque (Real x, Real y, Real z)
 Adds rotational force to this object, in object space.

virtual void addTorqueWorldSpace (const Vector3 &direction)
 Adds rotational force to this object, in world space.

virtual void addTorqueWorldSpace (Real x, Real y, Real z)
 Adds rotational force to this object, in world space.

virtual bool testCollide (ApplicationObject *otherObj)
 Tests to see if there is a detailed collision between this object and the object passed in.

virtual bool testCollide (SceneQuery::WorldFragment *wf)
 Tests to see if there is a detailed collision between this object and the world fragment passed in.

virtual void _notifyCollided (ApplicationObject *otherObj, const CollisionInfo &info)
 This method is called automatically if testCollide indicates a real collision.

SceneNodegetSceneNode (void)
 Gets the SceneNode which is being used to represent this object's position in the OGRE world.

EntitygetEntity (void)
 Gets the Entity which is being used to represent this object in the OGRE world.

dBody * getOdeBody (void)
 Gets the ODE body used to represent this object's mass and current velocity.

void setMassSphere (Real density, Real radius)
 Set the mass parameters of this object to represent a sphere.

void setMassBox (Real density, const Vector3 &dimensions, const Quaternion &orientation=Quaternion::IDENTITY)
 Set the mass parameters of this object to represent a box.

void setMassCappedCylinder (Real density, Real length, Real width, const Quaternion &orientation=Quaternion::IDENTITY)
 Set the mass parameters of this object to represent a capped cylinder.

void setMassExpert (Real mass, const Vector3 center, const Matrix3 inertia)
 Sets the mass parameters manually, use only if you know how!

const dMass * getOdeMass (void)
 Gets the ODE mass parameters for this object.

void setLinearVelocity (const Vector3 &vel)
 Sets the current linear velocity of this object.

void setLinearVelocity (Real x, Real y, Real z)
 Sets the current linear velocity of this object.

const Vector3getLinearVelocity (void)
 Gets the current linear velocity of this object.

const Vector3getAngularVelocity (void)
 Gets the current angular velocity of this object.

void setAngularVelocity (const Vector3 &vel)
 Sets the current angular velocity of this object.

void setAngularVelocity (Real x, Real y, Real z)
 Sets the current angular velocity of this object.

virtual void translate (Real x, Real y, Real z)
 Moves the object along it's local axes.

virtual void translateWorldSpace (const Vector3 &d)
 Moves the object along the world axes.

virtual void translateWorldSpace (Real x, Real y, Real z)
 Moves the object along the world axes.

virtual long getTypeID (void) const
 Return a number identifying the type of user defined object.

virtual const StringgetTypeName (void) const
 Return a string identifying the type of user defined object.


Protected Types

typedef std::list< dGeom * > CollisionProxyList
 Collision proxies, must be set up if collision enabled.


Protected Member Functions

void setUp (const String &name)
 Set up.

void nearDistChanged (void)
 Triggers recacl of collison bounds.

virtual void updateCollisionProxies (void)
 Internal method for updating the state of the collision proxies.

virtual bool testCollidePlaneBounds (SceneQuery::WorldFragment *wf)
 Internal method for testing the plane bounded region WorldFragment type.

virtual void setEntityQueryFlags (void)
 Internal method for updating the query mask.


Protected Attributes

CameramCamera
 Contained camera.

SceneNodemSceneNode
EntitymEntity
dBody * mOdeBody
 Dynamics properties, must be set up by subclasses if dynamics enabled.

dMass mMass
 Mass parameters.

CollisionProxyList mCollisionProxies
bool mDynamicsEnabled
bool mReenableIfInteractedWith
bool mCollisionEnabled
Real mBounceCoeffRestitution
Real mBounceVelocityThreshold
Real mSoftness
Real mFriction
Real mLinearVelDisableThreshold
Real mAngularVelDisableThreshold
Real mDisableTime
Real mDisableTimeEnd

Detailed Description

A camera which can interact with the world.

Definition at line 35 of file OgreRefAppCollideCamera.h.


Member Typedef Documentation

typedef std::list<dGeom*> OgreRefApp::ApplicationObject::CollisionProxyList [protected, inherited]
 

Collision proxies, must be set up if collision enabled.

Definition at line 56 of file OgreRefAppApplicationObject.h.


Constructor & Destructor Documentation

OgreRefApp::CollideCamera::CollideCamera const String name  ) 
 


Member Function Documentation

virtual void OgreRefApp::ApplicationObject::_notifyCollided ApplicationObject otherObj,
const CollisionInfo info
[virtual, inherited]
 

This method is called automatically if testCollide indicates a real collision.

Reimplemented in OgreRefApp::Box.

void OgreRefApp::CollideCamera::_notifyCollided SceneQuery::WorldFragment wf,
const CollisionInfo &  info
[virtual]
 

This method is called automatically if testCollide indicates a real collision.

Reimplemented from OgreRefApp::ApplicationObject.

virtual void OgreRefApp::ApplicationObject::_updateFromDynamics void   )  [virtual, inherited]
 

Updates the position of this game object from the simulation.

virtual void OgreRefApp::ApplicationObject::addForce Real  dir_x,
Real  dir_y,
Real  dir_z,
Real  pos_x = 0,
Real  pos_y = 0,
Real  pos_z = 0
[virtual, inherited]
 

Adds a linear force to this object, in object space, at the position indicated.

Remarks:
All forces are applied, then reset after World::applyDynamics is called.
Parameters:
dir_x,dir_y,dir_z The force direction in object coordinates.
pos_x,pos_y,pos_z The position at which the force is to be applied, in object coordinates.

virtual void OgreRefApp::ApplicationObject::addForce const Vector3 direction,
const Vector3 atPosition = Vector3::ZERO
[virtual, inherited]
 

Adds a linear force to this object, in object space, at the position indicated.

Remarks:
All forces are applied, then reset after World::applyDynamics is called.
Parameters:
direction The force direction in object coordinates.
atPosition The position at which the force is to be applied, in object coordinates.

virtual void OgreRefApp::ApplicationObject::addForceWorldSpace Real  dir_x,
Real  dir_y,
Real  dir_z,
Real  pos_x,
Real  pos_y,
Real  pos_z
[virtual, inherited]
 

Adds a linear force to this object, in world space, at the position indicated.

Remarks:
All forces are applied, then reset after World::applyDynamics is called.
Parameters:
dir_x,dir_y,dir_z The force direction in world coordinates.
pos_x,pos_y,pos_z The position at which the force is to be applied, in world coordinates.

virtual void OgreRefApp::ApplicationObject::addForceWorldSpace const Vector3 direction,
const Vector3 atPosition = Vector3::ZERO
[virtual, inherited]
 

Adds a linear force to this object, in world space, at the position indicated.

Remarks:
All forces are applied, then reset after World::applyDynamics is called.
Parameters:
direction The force direction in world coordinates.
atPosition The position at which the force is to be applied, in world coordinates.

virtual void OgreRefApp::ApplicationObject::addTorque Real  x,
Real  y,
Real  z
[virtual, inherited]
 

Adds rotational force to this object, in object space.

Remarks:
All forces are applied, then reset after World::applyDynamics is called.
Parameters:
x,y,z The direction of the torque to apply, in object space.

virtual void OgreRefApp::ApplicationObject::addTorque const Vector3 direction  )  [virtual, inherited]
 

Adds rotational force to this object, in object space.

Remarks:
All forces are applied, then reset after World::applyDynamics is called.
Parameters:
direction The direction of the torque to apply, in object space.

virtual void OgreRefApp::ApplicationObject::addTorqueWorldSpace Real  x,
Real  y,
Real  z
[virtual, inherited]
 

Adds rotational force to this object, in world space.

Remarks:
All forces are applied, then reset after World::applyDynamics is called.
Parameters:
x,y,z The direction of the torque to apply, in world space.

virtual void OgreRefApp::ApplicationObject::addTorqueWorldSpace const Vector3 direction  )  [virtual, inherited]
 

Adds rotational force to this object, in world space.

Remarks:
All forces are applied, then reset after World::applyDynamics is called.
Parameters:
direction The direction of the torque to apply, in world space.

const Vector3& OgreRefApp::ApplicationObject::getAngularVelocity void   )  [inherited]
 

Gets the current angular velocity of this object.

Remarks:
Only applicable if dynamics are enabled for this object.
Returns:
Vector3 representing the angular velocity in units per second around each axis.

Real OgreRefApp::CollideCamera::getAspectRatio void   )  const
 

Retreives the current aspect ratio.

virtual Real OgreRefApp::ApplicationObject::getBounceRestitutionValue void   )  [virtual, inherited]
 

Gets the cefficient of restitution (bounciness) for this object.

virtual Real OgreRefApp::ApplicationObject::getBounceVelocityThreshold void   )  [virtual, inherited]
 

Gets the bounce velocity threshold for this object.

Vector3 OgreRefApp::CollideCamera::getDirection void   )  const
 

Entity* OgreRefApp::ApplicationObject::getEntity void   )  [inherited]
 

Gets the Entity which is being used to represent this object in the OGRE world.

Real OgreRefApp::CollideCamera::getFarClipDistance void   )  const
 

Retrieves the distance from the camera to the far clipping plane.

const Radian& OgreRefApp::CollideCamera::getFOVy void   )  const
 

Retrieves the cameras Y-dimension Field Of View (FOV).

virtual Real OgreRefApp::ApplicationObject::getFriction void   )  [virtual, inherited]
 

Gets the Coulomb frictional coefficient for this object.

const Plane& OgreRefApp::CollideCamera::getFrustumPlane FrustumPlane  plane  ) 
 

Retrieves a specified plane of the frustum.

Remarks:
Gets a reference to one of the planes which make up the camera frustum, e.g. for clipping purposes.

const Vector3& OgreRefApp::ApplicationObject::getLinearVelocity void   )  [inherited]
 

Gets the current linear velocity of this object.

Remarks:
Only applicable if dynamics are enabled for this object.
Returns:
Vector3 representing the velocity in units per second.

Real OgreRefApp::CollideCamera::getNearClipDistance void   )  const
 

Sets the position of the near clipping plane.

dBody* OgreRefApp::ApplicationObject::getOdeBody void   )  [inherited]
 

Gets the ODE body used to represent this object's mass and current velocity.

const dMass* OgreRefApp::ApplicationObject::getOdeMass void   )  [inherited]
 

Gets the ODE mass parameters for this object.

const Quaternion& OgreRefApp::CollideCamera::getOrientation void   )  [virtual]
 

Gets the current orientation of this object.

Reimplemented from OgreRefApp::ApplicationObject.

PolygonMode OgreRefApp::CollideCamera::getPolygonMode void   )  const
 

Retrieves the level of detail that the camera will render.

virtual const Vector3& OgreRefApp::ApplicationObject::getPosition void   )  [virtual, inherited]
 

Gets the current position of this object.

ProjectionType OgreRefApp::CollideCamera::getProjectionType void   )  const
 

Retrieves info on the type of projection used (orthographic or perspective).

Camera* OgreRefApp::CollideCamera::getRealCamera void   ) 
 

Gets the internal Camera object.

Definition at line 52 of file OgreRefAppCollideCamera.h.

SceneNode* OgreRefApp::ApplicationObject::getSceneNode void   )  [inherited]
 

Gets the SceneNode which is being used to represent this object's position in the OGRE world.

virtual Real OgreRefApp::ApplicationObject::getSoftness void   )  [virtual, inherited]
 

Gets the softness factor of this object.

virtual long Ogre::UserDefinedObject::getTypeID void   )  const [virtual, inherited]
 

Return a number identifying the type of user defined object.

Remarks:
Can be used to differentiate between different types of object which you attach to OGRE MovableObject instances. Recommend you override this in your classes if you use more than one type of object.
Alternatively, you can override the getTypeName method and use that instead; that version is a litle more friendly and easier to scope, but obviously slightly less efficient. You choose which you prefer.

virtual const String& Ogre::UserDefinedObject::getTypeName void   )  const [virtual, inherited]
 

Return a string identifying the type of user defined object.

Remarks:
Can be used to differentiate between different types of object which you attach to OGRE MovableObject instances. Recommend you override this in your classes if you use more than one type of object.
Alternatively, you can override the getTypeID method and use that instead; that version is a litle more efficient, but obviously slightly less easy to read. You choose which you prefer.

virtual bool OgreRefApp::ApplicationObject::isCollisionEnabled void   )  [virtual, inherited]
 

Returns whether or not this object is considered for collision.

virtual bool OgreRefApp::ApplicationObject::isDynamicsEnabled void   )  [virtual, inherited]
 

Returns whether or not this object is physically simulated.

Remarks:
Objects which are not physically simulated only move when their SceneNode is manually altered.

bool OgreRefApp::CollideCamera::isVisible const Vector3 vert,
FrustumPlane *  culledBy = 0
 

Tests whether the given vertex is visible in the Frustum.

Parameters:
vert Vertex to be checked
culledBy Optional pointer to an int which will be filled by the plane number which culled the box if the result was false;
Returns:
If the box was visible, true is returned.
Otherwise, false is returned.

bool OgreRefApp::CollideCamera::isVisible const Sphere bound,
FrustumPlane *  culledBy = 0
 

Tests whether the given container is visible in the Frustum.

Parameters:
bound Bounding sphere to be checked
culledBy Optional pointer to an int which will be filled by the plane number which culled the box if the result was false;
Returns:
If the sphere was visible, true is returned.
Otherwise, false is returned.

bool OgreRefApp::CollideCamera::isVisible const AxisAlignedBox bound,
FrustumPlane *  culledBy = 0
 

Tests whether the given container is visible in the Frustum.

Parameters:
bound Bounding box to be checked
culledBy Optional pointer to an int which will be filled by the plane number which culled the box if the result was false;
Returns:
If the box was visible, true is returned.
Otherwise, false is returned.

void OgreRefApp::CollideCamera::lookAt Real  x,
Real  y,
Real  z
 

Points the camera at a location in worldspace.

Remarks:
This is a helper method to automatically generate the direction vector for the camera, based on it's current position and the supplied look-at point.
Parameters:
x 
y 
z Co-ordinates of the point to look at.

void OgreRefApp::CollideCamera::lookAt const Vector3 targetPoint  ) 
 

Points the camera at a location in worldspace.

Remarks:
This is a helper method to automatically generate the direction vector for the camera, based on it's current position and the supplied look-at point.
Parameters:
targetPoint A vector specifying the look at point.

void OgreRefApp::CollideCamera::nearDistChanged void   )  [protected]
 

Triggers recacl of collison bounds.

void OgreRefApp::CollideCamera::pitch Real  angleunits  ) 
 

Reimplemented from OgreRefApp::ApplicationObject.

Definition at line 89 of file OgreRefAppCollideCamera.h.

void OgreRefApp::CollideCamera::pitch const Radian angle  )  [virtual]
 

Rotate the object around the local X-axis.

Reimplemented from OgreRefApp::ApplicationObject.

void OgreRefApp::CollideCamera::roll Real  angleunits  ) 
 

Reimplemented from OgreRefApp::ApplicationObject.

Definition at line 80 of file OgreRefAppCollideCamera.h.

void OgreRefApp::CollideCamera::roll const Radian angle  )  [virtual]
 

Rotate the object around the local Z-axis.

Reimplemented from OgreRefApp::ApplicationObject.

void OgreRefApp::CollideCamera::rotate const Quaternion q  )  [virtual]
 

Rotate the object around an aritrary axis using a Quarternion.

Reimplemented from OgreRefApp::ApplicationObject.

void OgreRefApp::CollideCamera::rotate const Vector3 axis,
Real  angleunits
 

Reimplemented from OgreRefApp::ApplicationObject.

Definition at line 107 of file OgreRefAppCollideCamera.h.

void OgreRefApp::CollideCamera::rotate const Vector3 axis,
const Radian angle
[virtual]
 

Rotate the object around an arbitrary axis.

Reimplemented from OgreRefApp::ApplicationObject.

void OgreRefApp::ApplicationObject::setAngularVelocity Real  x,
Real  y,
Real  z
[inherited]
 

Sets the current angular velocity of this object.

Remarks:
Only applicable if dynamics are enabled for this object. This method is useful for starting an object off rather than applying forces to get it there.

void OgreRefApp::ApplicationObject::setAngularVelocity const Vector3 vel  )  [inherited]
 

Sets the current angular velocity of this object.

Remarks:
Only applicable if dynamics are enabled for this object. This method is useful for starting an object off rather than applying forces to get it there.

void OgreRefApp::CollideCamera::setAspectRatio Real  ratio  ) 
 

Sets the aspect ratio for the camera viewport.

Remarks:
The ratio between the x and y dimensions of the rectangular area visible through the camera is known as aspect ratio: aspect = width / height .
The default for most fullscreen windows is 1.3333 - this is also assumed by Ogre unless you use this method to state otherwise.

virtual void OgreRefApp::ApplicationObject::setBounceParameters Real  restitutionValue,
Real  velocityThreshold
[virtual, inherited]
 

Sets the 'bounciness' of this object.

Remarks:
Only applies if this object has both collision and dynamics enabled. When 2 movable objects collide, the greatest bounce parameters from both objects apply, so even a non-bouncy object can bounce if it hits a bouncy surface.
Parameters:
restitutionValue Coeeficient of restitution (0 for no bounce, 1 for perfect bounciness)
velocityThreshold Velocity below which no bounce will occur; this is a dampening value to ensure small velocities do not cause bounce.

virtual void OgreRefApp::ApplicationObject::setCollisionEnabled bool  enabled  )  [virtual, inherited]
 

void OgreRefApp::CollideCamera::setDirection const Vector3 vec  ) 
 

Sets the camera's direction vector.

void OgreRefApp::CollideCamera::setDirection Real  x,
Real  y,
Real  z
 

Sets the camera's direction vector.

Remarks:
Note that the 'up' vector for the camera will automatically be recalculated based on the current 'up' vector (i.e. the roll will remain the same).

virtual void OgreRefApp::ApplicationObject::setDynamicsDisableThreshold Real  linearSq,
Real  angularSq,
Real  overTime
[virtual, inherited]
 

Sets the linear and angular velocity thresholds, below which the object will have it's dynamics automatically disabled for performance.

Remarks:
These thresholds are used to speed up the simulation and to make it more stable, by turning off dynamics for objects that appear to be at rest. Otherwise, objects which are supposedly stationary can jitter when involved in large stacks, and can consume unnecessary CPU time. Note that if another object interacts with the disabled object, it will automatically reenable itself.
If you never want to disable dynamics automatically for this object, just set all the values to 0.
Parameters:
linearSq The squared linear velocity magnitude threshold
angularSq The squared angular velocity magnitude threshold
overTime The number of seconds over which the values must continue to be under this threshold for the dynamics to be disabled. This is to catch cases where the object almost stops moving because of a boundary condition, but would speed up again later (e.g. box teetering on an edge).

virtual void OgreRefApp::ApplicationObject::setDynamicsEnabled bool  enabled,
bool  reEnableOnInteraction = false
[virtual, inherited]
 

Sets whether or not this object is physically simulated at this time.

Remarks:
Objects which are not physically simulated only move when their SceneNode is manually altered. Objects which are physically simulated must set up an ODE body as part of their setUp method.
You can also use this to temporarily turn off simulation on an object, such that it is not simulated until some other object which IS simulated comes in contact with it, or is attached to it with a joint.
Parameters:
enabled Specifies whether dynamics is enabled
reEnableOnInteraction If set to true, this object will reenable if some other dynamically simulated object interacts with it

virtual void OgreRefApp::ApplicationObject::setEntityQueryFlags void   )  [protected, virtual, inherited]
 

Internal method for updating the query mask.

void OgreRefApp::CollideCamera::setFarClipDistance Real  farDist  ) 
 

Sets the distance to the far clipping plane.

Remarks:
The view frustrum is a pyramid created from the camera position and the edges of the viewport. This frustrum does not extend to infinity - it is cropped near to the camera and there is a far plane beyond which nothing is displayed. This method sets the distance for the far plane. Different applications need different values: e.g. a flight sim needs a much further far clipping plane than a first-person shooter. An important point here is that the larger the gap between near and far clipping planes, the lower the accuracy of the Z-buffer used to depth-cue pixels. This is because the Z-range is limited to the size of the Z buffer (16 or 32-bit) and the max values must be spread over the gap between near and far clip planes. The bigger the range, the more the Z values will be approximated which can cause artifacts when lots of objects are close together in the Z-plane. So make sure you clip as close to the camera as you can - don't set a huge value for the sake of it.
Parameters:
far The distance to the far clipping plane from the camera in world coordinates.

void OgreRefApp::CollideCamera::setFixedYawAxis bool  useFixed,
const Vector3 fixedAxis = Vector3::UNIT_Y
 

Tells the camera whether to yaw around it's own local Y axis or a fixed axis of choice.

Remarks:
This method allows you to change the yaw behaviour of the camera - by default, the camera yaws around it's own local Y axis. This is often what you want - for example a flying camera
  • but sometimes this produces unwanted effects. For example, if you're making a first-person shooter, you really don't want the yaw axis to reflect the local camera Y, because this would mean a different yaw axis if the player is looking upwards rather than when they are looking straight ahead. You can change this behaviour by setting the yaw to a fixed axis (say, the world Y).
Parameters:
useFixed If true, the axis passed in the second parameter will always be the yaw axis no matter what the camera orientation. If false, the camera returns to it's default behaviour.
fixedAxis The axis to use if the first parameter is true.

void OgreRefApp::CollideCamera::setFOVy Real  fovy  ) 
 

Definition at line 210 of file OgreRefAppCollideCamera.h.

void OgreRefApp::CollideCamera::setFOVy const Radian fovy  ) 
 

Sets the Y-dimension Field Of View (FOV) of the camera.

Remarks:
Field Of View (FOV) is the angle made between the camera's position, and the left & right edges of the 'screen' onto which the scene is projected. High values (90+) result in a wide-angle, fish-eye kind of view, low values (30-) in a stretched, telescopic kind of view. Typical values are between 45 and 60.
This value represents the HORIZONTAL field-of-view. The vertical field of view is calculated from this depending on the dimensions of the viewport (they will only be the same if the viewport is square).
Note:
Setting the FOV overrides the value supplied for Camera::setNearClipPlane.

virtual void OgreRefApp::ApplicationObject::setFriction Real  friction  )  [virtual, inherited]
 

Sets the Coulomb frictional coefficient for this object.

Remarks:
This coefficient affects how much an object will slip when it comes into contact with another object.
Parameters:
friction The Coulomb friction coefficient, valid from 0 to Math::POS_INFINITY. 0 means no friction, Math::POS_INFINITY means infinite friction ie no slippage. Note that friction between these 2 bounds is more CPU intensive so use with caution.

void OgreRefApp::ApplicationObject::setLinearVelocity Real  x,
Real  y,
Real  z
[inherited]
 

Sets the current linear velocity of this object.

Remarks:
Only applicable if dynamics are enabled for this object. This method is useful for starting an object off at a particular speed rather than applying forces to get it there.

void OgreRefApp::ApplicationObject::setLinearVelocity const Vector3 vel  )  [inherited]
 

Sets the current linear velocity of this object.

Remarks:
Only applicable if dynamics are enabled for this object. This method is useful for starting an object off at a particular speed rather than applying forces to get it there.

void OgreRefApp::ApplicationObject::setMassBox Real  density,
const Vector3 dimensions,
const Quaternion orientation = Quaternion::IDENTITY
[inherited]
 

Set the mass parameters of this object to represent a box.

Remarks:
This method sets the mass and inertia properties of this object such that it is like a box.
Parameters:
density Density of the box in Kg/m^3
dimensions Width, height and depth of the box.
orientation Optional orientation of the box.

void OgreRefApp::ApplicationObject::setMassCappedCylinder Real  density,
Real  length,
Real  width,
const Quaternion orientation = Quaternion::IDENTITY
[inherited]
 

Set the mass parameters of this object to represent a capped cylinder.

Remarks:
This method sets the mass and inertia properties of this object such that it is like a capped cylinder, by default lying along the Z-axis.
Parameters:
density Density of the cylinder in Kg/m^3
length Length of the cylinder
width Width of the cylinder
orientation Optional orientation if you wish the cylinder to lay along a different axis from Z.

void OgreRefApp::ApplicationObject::setMassExpert Real  mass,
const Vector3  center,
const Matrix3  inertia
[inherited]
 

Sets the mass parameters manually, use only if you know how!

Parameters:
mass Mass in Kg
center The center of gravity
inertia The inertia matrix describing distribution of the mass around the body.

void OgreRefApp::ApplicationObject::setMassSphere Real  density,
Real  radius
[inherited]
 

Set the mass parameters of this object to represent a sphere.

Remarks:
This method sets the mass and inertia properties of this object such that it is like a sphere, ie center of gravity at the origin and an even distribution of mass in all directions.
Parameters:
density Density of the sphere in Kg/m^3
radius of the sphere mass

void OgreRefApp::CollideCamera::setNearClipDistance Real  nearDist  ) 
 

Sets the position of the near clipping plane.

Remarks:
The position of the near clipping plane is the distance from the cameras position to the screen on which the world is projected. The near plane distance, combined with the field-of-view and the aspect ratio, determines the size of the viewport through which the world is viewed (in world co-ordinates). Note that this world viewport is different to a screen viewport, which has it's dimensions expressed in pixels. The cameras viewport should have the same aspect ratio as the screen viewport it renders into to avoid distortion.
Parameters:
near The distance to the near clipping plane from the camera in world coordinates.

void OgreRefApp::CollideCamera::setOrientation const Quaternion orientation  )  [virtual]
 

Sets the orientation of this object.

Reimplemented from OgreRefApp::ApplicationObject.

void OgreRefApp::CollideCamera::setPolygonMode PolygonMode  sd  ) 
 

Sets the level of rendering detail required from this camera.

Remarks:
Each camera is set to render at full detail by default, that is with full texturing, lighting etc. This method lets you change that behaviour, allowing you to make the camera just render a wireframe view, for example.

virtual void OgreRefApp::ApplicationObject::setPosition Real  x,
Real  y,
Real  z
[virtual, inherited]
 

Sets the position of this object.

virtual void OgreRefApp::ApplicationObject::setPosition const Vector3 vec  )  [virtual, inherited]
 

Sets the position of this object.

void OgreRefApp::CollideCamera::setProjectionType ProjectionType  pt  ) 
 

Sets the type of projection to use (orthographic or perspective).

Default is perspective.

virtual void OgreRefApp::ApplicationObject::setSoftness Real  softness  )  [virtual, inherited]
 

Sets the softness of this object, which determines how much it is allowed to penetrate other objects.

Remarks:
This parameter only has meaning if collision and dynamics are enabled for this object.
Parameters:
softness Softness factor (0 is completely hard). Softness will be combined from both objects involved in a collision to determine how much they will penetrate.

void OgreRefApp::CollideCamera::setUp const String name  )  [protected, virtual]
 

Set up.

Implements OgreRefApp::ApplicationObject.

virtual bool OgreRefApp::ApplicationObject::testCollide SceneQuery::WorldFragment wf  )  [virtual, inherited]
 

Tests to see if there is a detailed collision between this object and the world fragment passed in.

Remarks:
If there is a collision, the object will be notified and if dynamics are enabled on this object, physics will be applied automatically.
Returns:
true if collision occurred

virtual bool OgreRefApp::ApplicationObject::testCollide ApplicationObject otherObj  )  [virtual, inherited]
 

Tests to see if there is a detailed collision between this object and the object passed in.

Remarks:
If there is a collision, both objects will be notified and if dynamics are enabled on these objects, physics will be applied automatically.
Returns:
true if collision occurred

virtual bool OgreRefApp::ApplicationObject::testCollidePlaneBounds SceneQuery::WorldFragment wf  )  [protected, virtual, inherited]
 

Internal method for testing the plane bounded region WorldFragment type.

virtual void OgreRefApp::ApplicationObject::translate Real  x,
Real  y,
Real  z
[virtual, inherited]
 

Moves the object along it's local axes.

This method moves the object by the supplied vector along the local axes of the obect.
Parameters:
x,y z Real x, y and z values representing the translation.

void OgreRefApp::CollideCamera::translate const Vector3 d  )  [virtual]
 

Moves the object along it's local axes.

This method moves the object by the supplied vector along the local axes of the obect.
Parameters:
d Vector with x,y,z values representing the translation.

Reimplemented from OgreRefApp::ApplicationObject.

virtual void OgreRefApp::ApplicationObject::translateWorldSpace Real  x,
Real  y,
Real  z
[virtual, inherited]
 

Moves the object along the world axes.

This method moves the object by the supplied vector along the local axes of the obect.
Parameters:
x,y z Real x, y and z values representing the translation.

virtual void OgreRefApp::ApplicationObject::translateWorldSpace const Vector3 d  )  [virtual, inherited]
 

Moves the object along the world axes.

This method moves the object by the supplied vector along the world axes.
Parameters:
d Vector with x,y,z values representing the translation.

virtual void OgreRefApp::ApplicationObject::updateCollisionProxies void   )  [protected, virtual, inherited]
 

Internal method for updating the state of the collision proxies.

void OgreRefApp::CollideCamera::yaw Real  angleunits  ) 
 

Reimplemented from OgreRefApp::ApplicationObject.

Definition at line 98 of file OgreRefAppCollideCamera.h.

void OgreRefApp::CollideCamera::yaw const Radian angle  )  [virtual]
 

Rotate the object around the local Y-axis.

Reimplemented from OgreRefApp::ApplicationObject.


Member Data Documentation

Real OgreRefApp::ApplicationObject::mAngularVelDisableThreshold [protected, inherited]
 

Definition at line 69 of file OgreRefAppApplicationObject.h.

Real OgreRefApp::ApplicationObject::mBounceCoeffRestitution [protected, inherited]
 

Definition at line 64 of file OgreRefAppApplicationObject.h.

Real OgreRefApp::ApplicationObject::mBounceVelocityThreshold [protected, inherited]
 

Definition at line 65 of file OgreRefAppApplicationObject.h.

Camera* OgreRefApp::CollideCamera::mCamera [protected]
 

Contained camera.

Definition at line 43 of file OgreRefAppCollideCamera.h.

bool OgreRefApp::ApplicationObject::mCollisionEnabled [protected, inherited]
 

Definition at line 62 of file OgreRefAppApplicationObject.h.

CollisionProxyList OgreRefApp::ApplicationObject::mCollisionProxies [protected, inherited]
 

Definition at line 57 of file OgreRefAppApplicationObject.h.

Real OgreRefApp::ApplicationObject::mDisableTime [protected, inherited]
 

Definition at line 70 of file OgreRefAppApplicationObject.h.

Real OgreRefApp::ApplicationObject::mDisableTimeEnd [protected, inherited]
 

Definition at line 71 of file OgreRefAppApplicationObject.h.

bool OgreRefApp::ApplicationObject::mDynamicsEnabled [protected, inherited]
 

Definition at line 60 of file OgreRefAppApplicationObject.h.

Entity* OgreRefApp::ApplicationObject::mEntity [protected, inherited]
 

Definition at line 47 of file OgreRefAppApplicationObject.h.

Real OgreRefApp::ApplicationObject::mFriction [protected, inherited]
 

Definition at line 67 of file OgreRefAppApplicationObject.h.

Real OgreRefApp::ApplicationObject::mLinearVelDisableThreshold [protected, inherited]
 

Definition at line 68 of file OgreRefAppApplicationObject.h.

dMass OgreRefApp::ApplicationObject::mMass [protected, inherited]
 

Mass parameters.

Definition at line 52 of file OgreRefAppApplicationObject.h.

dBody* OgreRefApp::ApplicationObject::mOdeBody [protected, inherited]
 

Dynamics properties, must be set up by subclasses if dynamics enabled.

Definition at line 50 of file OgreRefAppApplicationObject.h.

bool OgreRefApp::ApplicationObject::mReenableIfInteractedWith [protected, inherited]
 

Definition at line 61 of file OgreRefAppApplicationObject.h.

SceneNode* OgreRefApp::ApplicationObject::mSceneNode [protected, inherited]
 

Definition at line 46 of file OgreRefAppApplicationObject.h.

Real OgreRefApp::ApplicationObject::mSoftness [protected, inherited]
 

Definition at line 66 of file OgreRefAppApplicationObject.h.


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

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:54:56 2006