OGRE 14.3
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::Ray Class Reference

Representation of a ray in space, i.e. More...

#include <OgreRay.h>

Public Member Functions

 Ray ()
 
 Ray (const Vector3 &origin, const Vector3 &direction)
 
const Vector3getDirection (void) const
 Gets the direction of the ray.
 
const Vector3getOrigin (void) const
 Gets the origin of the ray.
 
Vector3 getPoint (Real t) const
 Gets the position of a point t units along the ray.
 
RayTestResult intersects (const AxisAlignedBox &box) const
 Tests whether this ray intersects the given box.
 
RayTestResult intersects (const Plane &p) const
 Tests whether this ray intersects the given plane.
 
RayTestResult intersects (const PlaneBoundedVolume &p) const
 Tests whether this ray intersects the given plane bounded volume.
 
RayTestResult intersects (const Sphere &s, bool discardInside=true) const
 Tests whether this ray intersects the given sphere.
 
Vector3 operator* (Real t) const
 Gets the position of a point t units along the ray.
 
void setDirection (const Vector3 &dir)
 Sets the direction of the ray.
 
void setOrigin (const Vector3 &origin)
 Sets the origin of the ray.
 

Detailed Description

Representation of a ray in space, i.e.

a line with an origin and direction.

Constructor & Destructor Documentation

◆ Ray() [1/2]

Ogre::Ray::Ray ( )
inline

◆ Ray() [2/2]

Ogre::Ray::Ray ( const Vector3 origin,
const Vector3 direction 
)
inline

Member Function Documentation

◆ setOrigin()

void Ogre::Ray::setOrigin ( const Vector3 origin)
inline

Sets the origin of the ray.

◆ getOrigin()

const Vector3 & Ogre::Ray::getOrigin ( void  ) const
inline

Gets the origin of the ray.

◆ setDirection()

void Ogre::Ray::setDirection ( const Vector3 dir)
inline

Sets the direction of the ray.

◆ getDirection()

const Vector3 & Ogre::Ray::getDirection ( void  ) const
inline

Gets the direction of the ray.

◆ getPoint()

Vector3 Ogre::Ray::getPoint ( Real  t) const
inline

Gets the position of a point t units along the ray.

◆ operator*()

Vector3 Ogre::Ray::operator* ( Real  t) const
inline

Gets the position of a point t units along the ray.

◆ intersects() [1/4]

RayTestResult Ogre::Ray::intersects ( const Plane p) const
inline

Tests whether this ray intersects the given plane.

References Ogre::Math::Abs().

◆ intersects() [2/4]

RayTestResult Ogre::Ray::intersects ( const PlaneBoundedVolume p) const
inline

Tests whether this ray intersects the given plane bounded volume.

References Ogre::Math::intersects(), and Ogre::Plane::POSITIVE_SIDE.

◆ intersects() [3/4]

RayTestResult Ogre::Ray::intersects ( const Sphere s,
bool  discardInside = true 
) const
inline

Tests whether this ray intersects the given sphere.

References Ogre::Vector< dims, T >::dotProduct(), and Ogre::Math::Sqrt().

◆ intersects() [4/4]

RayTestResult Ogre::Ray::intersects ( const AxisAlignedBox box) const
inline

Tests whether this ray intersects the given box.

References Ogre::Math::intersects().


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