44 #include "MathTools/mathtools.h"
95 { this->
Origin = FreshOrigin; }
101 {
return MathTools::Intersects(ToCheck,*
this); }
104 {
return MathTools::Intersects(ToCheck,*
this); }
107 {
return MathTools::Intersects(ToCheck,*
this); }
113 { this->
Origin = InternalRay.getOrigin(); this->
Normal = InternalRay.getDirection(); }
145 if( !OriginNode.
Empty() )
149 if( !NormalNode.
Empty() )
This is a generic sphere class used for spacial queries.
std::ostream & operator<<(std::ostream &stream, const Mezzanine::LinearInterpolator< T > &Lint)
Used to Serialize an Mezzanine::LinearInterpolator to a human readable stream.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
Vector3 GetPointAtDistance(const Real &Distance)
Gets a point on the ray at a distance.
std::pair< Boole, Vector3 > PlaneRayTestResult
This is a type used for the ray intersection tests performed on Planes.
bool Boole
Generally acts a single bit, true or false.
Vector3 GetNormal() const
This returns the normal for this relative to the origin.
void operator=(const Ray &Other)
Assignment operator.
void SetOrigin(const Vector3 &FreshOrigin)
Sets the origin of this ray.
Thrown when the requested identity could not be found.
void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
Node GetFirstChild() const
Get the first child Node of this Node.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
Vector3 Origin
The origin point of the Vector.
bool Empty() const
Is this storing anything at all?
This is used to represent a flat infinite slice of the game world.
This implements the exception hiearchy for Mezzanine.
Vector3 Normal
The direction this ray is pointing.
static String GetSerializableName()
Get the name of the the XML tag this class will leave behind as its instances are serialized...
This file contains the AxisAlignedBox class for representing AABB's of objects in the world...
float Real
A Datatype used to represent a real floating point number.
The interface for serialization.
bool SetValue(const Char8 *rhs)
Set the value of this.
MathTools::GeometryRayTestResult GeometryRayTestResult
This is a type used for the return of a ray intersection test.
This file contains a generic Sphere class for math and spacial query.
void ExtractOgreRay(const Ogre::Ray &InternalRay)
Changes this Ray to match the Ogre Ray.
A light-weight handle for manipulating nodes in DOM tree.
void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
const Vector3 & GetOrigin() const
Gets the origin of this ray.
Vector3 & Normalize()
This will change this point into it's own normal relative to the origin.
Ogre::Vector3 GetOgreVector3() const
Gets a Ogre vector3.
PlaneRayTestResult Intersects(const Plane &ToCheck) const
Checks to see if this ray intersects a plane.
Boole operator!=(const Ray &Other) const
Inequality operator.
Boole operator==(const Ray &Other) const
Equality operator.
void ProtoDeSerialize(const XML::Node &OneNode)
Take the data stored in an XML and overwrite this instance of this object with it.
This is used to represent a point in space, or a vector through space.
Ogre::Ray GetOgreRay() const
Gets an Ogre::Ray that contains this Rays information.
The bulk of the engine components go in this namspace.
const Vector3 & GetNormal() const
Gets the normal of this Ray.
const Char8 * Name() const
ptrdiff_tGet the name of this Node.
Ray()
Default constructor.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
void SetNormal(const Vector3 &FreshNormal)
Sets the normal of this Ray.
std::string String
A datatype used to a series of characters.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
void ProtoSerialize(XML::Node &CurrentRoot) const
Convert this class to an XML::Node ready for serialization.
This represents a line placed in 3D space and is used with spacial queries.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
This is a utility class used to represent the Axis-Aligned Bounding Boxes of objects in various subsy...