This is used to indicate a line with one end. More...
#include <ray.h>
Public Member Functions | |
| Ray () | |
| Default constructor. | |
| Ray (Vector3 From_, Vector3 To_) | |
| Thorough constructor. | |
| Ray (Ogre::Ray Ray2) | |
| Compatibily constructor. | |
| Vector3 | GetDirection () const |
| Gets the direction of this ray. | |
| Ray | GetNormal () const |
| This returns a normalized copy of this ray. | |
| Ogre::Ray | GetOgreRay () const |
| Gets an Ogre::Ray that contains this Rays information. | |
| Real | Length () const |
| Measures the distance distance of this ray. | |
| void | Normalize () |
| Turns this Ray into its own normal. | |
| Ray | operator* (const Real &scalar) const |
| This returns a ray lengthened by the given multiple. | |
| void | operator*= (const Real &scalar) |
| This lengthens the Ray by the given multiple. | |
| Ray | operator/ (const Real &scalar) const |
| This returns a ray scaled by the given divisor. | |
| void | operator/= (const Real &scalar) |
| This scales the Ray by the given divisor. | |
Public Attributes | |
| Vector3 | From |
| The origin point of the Vector. | |
| Vector3 | To |
| A point on the line of the ray. | |
This is used to indicate a line with one end.
Currently this is just a collection of two vector3s with a couple of constructors.
| Mezzanine::Ray::Ray | ( | ) |
| Mezzanine::Ray::Ray | ( | Ogre::Ray | Ray2 | ) |
| Vector3 Mezzanine::Ray::GetDirection | ( | ) | const |
| Ray Mezzanine::Ray::GetNormal | ( | ) | const |
This returns a normalized copy of this ray.
This will get a ray that is 1 unit in length with the same From point as this ray, pointing in the same direction as this ray.
| Ogre::Ray Mezzanine::Ray::GetOgreRay | ( | ) | const |
| Real Mezzanine::Ray::Length | ( | ) | const |
| void Mezzanine::Ray::Normalize | ( | ) |
This returns a ray lengthened by the given multiple.
This returns a ray changed in length by the amount in the scalar. Specifically this subracts the From value out of the To value, then multiplies the To value by the scalar, then adds the from value back in.
| scalar | The amount to multiply by. |
| void Mezzanine::Ray::operator*= | ( | const Real & | scalar | ) |
This lengthens the Ray by the given multiple.
This ray ischanged in length by the amount in the scalar. Specifically this subracts the From value out of the To value, then multiplies the To value by the scalar, then adds the from value back in.
| scalar | The amount to multiply by. |
This returns a ray scaled by the given divisor.
This returns an ray divided in length by the amount in the scalar. Specifically this subracts the From value out of the To value, then divides the To value by the scalar, then adds the from value back in.
| scalar | The amount to divide by. |
| void Mezzanine::Ray::operator/= | ( | const Real & | scalar | ) |
This scales the Ray by the given divisor.
This ray is divided in length by the amount in the scalar. Specifically this subracts the From value out of the To value, then divides the To value by the scalar, then adds the from value back in.
| scalar | The amount to divide by. |
1.7.3