OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::PlanarReflectionActor Class Reference

#include <OgrePlanarReflectionActor.h>

Public Member Functions

 PlanarReflectionActor ()
 
 PlanarReflectionActor (const Vector3 &center, const Vector2 &halfSize, const Quaternion orientation)
 
const Vector3getCenter () const
 
uint8 getCurrentBoundSlot () const
 This value may have some meaning even if there is no reservation. More...
 
const Vector2getHalfSize () const
 
const Vector3getNormal () const
 
const QuaterniongetOrientation () const
 
const PlanegetPlane () const
 
Real getSquaredDistanceTo (const Vector3 &pos) const
 
bool hasReservation () const
 See PlanarReflections::reserve. More...
 
void setPlane (const Vector3 &center, const Vector2 &halfSize, const Quaternion &orientation)
 Sets the plane's position, size and orientation. More...
 

Public Attributes

uint8 mActivationPriority
 Ogre tries to activate visible planar reflections, sorting those that are closest to the camera, as long as they have equal priority. More...
 

Constructor & Destructor Documentation

◆ PlanarReflectionActor() [1/2]

Ogre::PlanarReflectionActor::PlanarReflectionActor ( )
inline

◆ PlanarReflectionActor() [2/2]

Ogre::PlanarReflectionActor::PlanarReflectionActor ( const Vector3 center,
const Vector2 halfSize,
const Quaternion  orientation 
)
inline

Member Function Documentation

◆ getCenter()

const Vector3& Ogre::PlanarReflectionActor::getCenter ( ) const

◆ getCurrentBoundSlot()

uint8 Ogre::PlanarReflectionActor::getCurrentBoundSlot ( ) const

This value may have some meaning even if there is no reservation.

◆ getHalfSize()

const Vector2& Ogre::PlanarReflectionActor::getHalfSize ( ) const

◆ getNormal()

const Vector3& Ogre::PlanarReflectionActor::getNormal ( ) const

◆ getOrientation()

const Quaternion& Ogre::PlanarReflectionActor::getOrientation ( ) const

◆ getPlane()

const Plane& Ogre::PlanarReflectionActor::getPlane ( ) const

◆ getSquaredDistanceTo()

Real Ogre::PlanarReflectionActor::getSquaredDistanceTo ( const Vector3 pos) const

◆ hasReservation()

bool Ogre::PlanarReflectionActor::hasReservation ( ) const

◆ setPlane()

void Ogre::PlanarReflectionActor::setPlane ( const Vector3 center,
const Vector2 halfSize,
const Quaternion orientation 
)

Sets the plane's position, size and orientation.

Parameters
centerXYZ position, in world coordinates
halfSize2D half size of the rectangle that this plane creates, in local space.
orientationQuaternion containing the normal and roll of the plane. Assumed to be unit-length The plane's normal is orientation.zAxis();

Member Data Documentation

◆ mActivationPriority

uint8 Ogre::PlanarReflectionActor::mActivationPriority

Ogre tries to activate visible planar reflections, sorting those that are closest to the camera, as long as they have equal priority.

However distance to camera may not be convenient in all cases (such as when you have four small mirrors close and one huge mirror a bit further away). For such cases, you can use priority to allow a particular actor "to win" against others. It's also very possible you want to only set priority to 0 for actors that have reserved slots.

There is no particular overhead/performance cost associated with this call.
Remarks
If the actor fails frustum culling, it won't be activated even if priority == 0. This shouldn't matter.
Value is in range [0; 255]. Default value is 127. A priority of 0 means always activate first. A priority of 255 means activate last.

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