\hypertarget{class_ogre_1_1_ray}{}\section{Ogre\+:\+:Ray Class Reference}
\label{class_ogre_1_1_ray}\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}}


Representation of a ray in space, i.\+e.  




{\ttfamily \#include $<$Ogre\+Ray.\+h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_ray_ae06168a69567ec6ede584cfa8ced9979}{Ray} ()
\item 
\hyperlink{class_ogre_1_1_ray_a7da08421bf78a27884c5a381cda60dc2}{Ray} (const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&origin, const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&direction)
\item 
const \hyperlink{class_ogre_1_1_vector3}{Vector3} \& \hyperlink{class_ogre_1_1_ray_a169a3be0bc679a7519343abcb4df7e3f}{get\+Direction} (void) const
\begin{DoxyCompactList}\small\item\em Gets the direction of the ray. \end{DoxyCompactList}\item 
const \hyperlink{class_ogre_1_1_vector3}{Vector3} \& \hyperlink{class_ogre_1_1_ray_a44feae0f616a3b3a456f94a9ea273859}{get\+Origin} (void) const
\begin{DoxyCompactList}\small\item\em Gets the origin of the ray. \end{DoxyCompactList}\item 
\hyperlink{class_ogre_1_1_vector3}{Vector3} \hyperlink{class_ogre_1_1_ray_a81a7ec16f410cedf5c279152230bf67b}{get\+Point} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} t) const
\begin{DoxyCompactList}\small\item\em Gets the position of a point t units along the ray. \end{DoxyCompactList}\item 
std\+::pair$<$ bool, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $>$ \hyperlink{class_ogre_1_1_ray_a86730586582f0c93d42ab79e6ba23409}{intersects} (const \hyperlink{class_ogre_1_1_plane}{Plane} \&p) const
\begin{DoxyCompactList}\small\item\em Tests whether this ray intersects the given plane. \end{DoxyCompactList}\item 
std\+::pair$<$ bool, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $>$ \hyperlink{class_ogre_1_1_ray_a7fecd8f1817390e0e60da01d286aaee1}{intersects} (const \hyperlink{class_ogre_1_1_plane_bounded_volume}{Plane\+Bounded\+Volume} \&p) const
\begin{DoxyCompactList}\small\item\em Tests whether this ray intersects the given plane bounded volume. \end{DoxyCompactList}\item 
std\+::pair$<$ bool, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $>$ \hyperlink{class_ogre_1_1_ray_a8995e60cc1941da8ea48cfed2baf65e6}{intersects} (const \hyperlink{class_ogre_1_1_sphere}{Sphere} \&s) const
\begin{DoxyCompactList}\small\item\em Tests whether this ray intersects the given sphere. \end{DoxyCompactList}\item 
std\+::pair$<$ bool, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $>$ \hyperlink{class_ogre_1_1_ray_a9a1148c8194b78a3b6d6b0c0aea5181f}{intersects} (const \hyperlink{class_ogre_1_1_axis_aligned_box}{Axis\+Aligned\+Box} \&box) const
\begin{DoxyCompactList}\small\item\em Tests whether this ray intersects the given box. \end{DoxyCompactList}\item 
\hyperlink{class_ogre_1_1_vector3}{Vector3} \hyperlink{class_ogre_1_1_ray_afcc111edd38353d3c8aedb0e318127d8}{operator$\ast$} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} t) const
\begin{DoxyCompactList}\small\item\em Gets the position of a point t units along the ray. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_ray_ac3082e7ed2efd58bb202043101d4abb2}{set\+Direction} (const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&dir)
\begin{DoxyCompactList}\small\item\em Sets the direction of the ray. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_ray_a730a34d1255a51df2bb072c823acec67}{set\+Origin} (const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&origin)
\begin{DoxyCompactList}\small\item\em Sets the origin of the ray. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Representation of a ray in space, i.\+e. 

a line with an origin and direction. 

\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_ray_ae06168a69567ec6ede584cfa8ced9979}\label{class_ogre_1_1_ray_ae06168a69567ec6ede584cfa8ced9979}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!Ray@{Ray}}
\index{Ray@{Ray}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{Ray()}{Ray()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Ogre\+::\+Ray\+::\+Ray (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_ray_a7da08421bf78a27884c5a381cda60dc2}\label{class_ogre_1_1_ray_a7da08421bf78a27884c5a381cda60dc2}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!Ray@{Ray}}
\index{Ray@{Ray}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{Ray()}{Ray()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Ogre\+::\+Ray\+::\+Ray (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{origin,  }\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{direction }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_ray_a730a34d1255a51df2bb072c823acec67}\label{class_ogre_1_1_ray_a730a34d1255a51df2bb072c823acec67}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!set\+Origin@{set\+Origin}}
\index{set\+Origin@{set\+Origin}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{set\+Origin()}{setOrigin()}}
{\footnotesize\ttfamily void Ogre\+::\+Ray\+::set\+Origin (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{origin }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets the origin of the ray. 

\mbox{\Hypertarget{class_ogre_1_1_ray_a44feae0f616a3b3a456f94a9ea273859}\label{class_ogre_1_1_ray_a44feae0f616a3b3a456f94a9ea273859}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!get\+Origin@{get\+Origin}}
\index{get\+Origin@{get\+Origin}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{get\+Origin()}{getOrigin()}}
{\footnotesize\ttfamily const \hyperlink{class_ogre_1_1_vector3}{Vector3}\& Ogre\+::\+Ray\+::get\+Origin (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the origin of the ray. 

\mbox{\Hypertarget{class_ogre_1_1_ray_ac3082e7ed2efd58bb202043101d4abb2}\label{class_ogre_1_1_ray_ac3082e7ed2efd58bb202043101d4abb2}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!set\+Direction@{set\+Direction}}
\index{set\+Direction@{set\+Direction}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{set\+Direction()}{setDirection()}}
{\footnotesize\ttfamily void Ogre\+::\+Ray\+::set\+Direction (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{dir }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets the direction of the ray. 

\mbox{\Hypertarget{class_ogre_1_1_ray_a169a3be0bc679a7519343abcb4df7e3f}\label{class_ogre_1_1_ray_a169a3be0bc679a7519343abcb4df7e3f}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!get\+Direction@{get\+Direction}}
\index{get\+Direction@{get\+Direction}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{get\+Direction()}{getDirection()}}
{\footnotesize\ttfamily const \hyperlink{class_ogre_1_1_vector3}{Vector3}\& Ogre\+::\+Ray\+::get\+Direction (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the direction of the ray. 

\mbox{\Hypertarget{class_ogre_1_1_ray_a81a7ec16f410cedf5c279152230bf67b}\label{class_ogre_1_1_ray_a81a7ec16f410cedf5c279152230bf67b}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!get\+Point@{get\+Point}}
\index{get\+Point@{get\+Point}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{get\+Point()}{getPoint()}}
{\footnotesize\ttfamily \hyperlink{class_ogre_1_1_vector3}{Vector3} Ogre\+::\+Ray\+::get\+Point (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{t }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



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

\mbox{\Hypertarget{class_ogre_1_1_ray_afcc111edd38353d3c8aedb0e318127d8}\label{class_ogre_1_1_ray_afcc111edd38353d3c8aedb0e318127d8}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!operator$\ast$@{operator$\ast$}}
\index{operator$\ast$@{operator$\ast$}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{operator$\ast$()}{operator*()}}
{\footnotesize\ttfamily \hyperlink{class_ogre_1_1_vector3}{Vector3} Ogre\+::\+Ray\+::operator$\ast$ (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{t }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



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

\mbox{\Hypertarget{class_ogre_1_1_ray_a86730586582f0c93d42ab79e6ba23409}\label{class_ogre_1_1_ray_a86730586582f0c93d42ab79e6ba23409}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily std\+::pair$<$bool, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}$>$ Ogre\+::\+Ray\+::intersects (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_plane}{Plane} \&}]{p }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Tests whether this ray intersects the given plane. 

\begin{DoxyReturn}{Returns}
A pair structure where the first element indicates whether an intersection occurs, and if true, the second element will indicate the distance along the ray at which it intersects. This can be converted to a point in space by calling \hyperlink{class_ogre_1_1_ray_a81a7ec16f410cedf5c279152230bf67b}{get\+Point()}. 
\end{DoxyReturn}


References Ogre\+::\+Math\+::intersects().

\mbox{\Hypertarget{class_ogre_1_1_ray_a7fecd8f1817390e0e60da01d286aaee1}\label{class_ogre_1_1_ray_a7fecd8f1817390e0e60da01d286aaee1}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily std\+::pair$<$bool, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}$>$ Ogre\+::\+Ray\+::intersects (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_plane_bounded_volume}{Plane\+Bounded\+Volume} \&}]{p }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Tests whether this ray intersects the given plane bounded volume. 

\begin{DoxyReturn}{Returns}
A pair structure where the first element indicates whether an intersection occurs, and if true, the second element will indicate the distance along the ray at which it intersects. This can be converted to a point in space by calling \hyperlink{class_ogre_1_1_ray_a81a7ec16f410cedf5c279152230bf67b}{get\+Point()}. 
\end{DoxyReturn}


References Ogre\+::\+Math\+::intersects(), Ogre\+::\+Plane\+Bounded\+Volume\+::outside, Ogre\+::\+Plane\+Bounded\+Volume\+::planes, and Ogre\+::\+Plane\+::\+P\+O\+S\+I\+T\+I\+V\+E\+\_\+\+S\+I\+DE.

\mbox{\Hypertarget{class_ogre_1_1_ray_a8995e60cc1941da8ea48cfed2baf65e6}\label{class_ogre_1_1_ray_a8995e60cc1941da8ea48cfed2baf65e6}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily std\+::pair$<$bool, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}$>$ Ogre\+::\+Ray\+::intersects (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_sphere}{Sphere} \&}]{s }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Tests whether this ray intersects the given sphere. 

\begin{DoxyReturn}{Returns}
A pair structure where the first element indicates whether an intersection occurs, and if true, the second element will indicate the distance along the ray at which it intersects. This can be converted to a point in space by calling \hyperlink{class_ogre_1_1_ray_a81a7ec16f410cedf5c279152230bf67b}{get\+Point()}. 
\end{DoxyReturn}


References Ogre\+::\+Math\+::intersects().

\mbox{\Hypertarget{class_ogre_1_1_ray_a9a1148c8194b78a3b6d6b0c0aea5181f}\label{class_ogre_1_1_ray_a9a1148c8194b78a3b6d6b0c0aea5181f}} 
\index{Ogre\+::\+Ray@{Ogre\+::\+Ray}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre\+::\+Ray@{Ogre\+::\+Ray}}
\subsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily std\+::pair$<$bool, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}$>$ Ogre\+::\+Ray\+::intersects (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_axis_aligned_box}{Axis\+Aligned\+Box} \&}]{box }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Tests whether this ray intersects the given box. 

\begin{DoxyReturn}{Returns}
A pair structure where the first element indicates whether an intersection occurs, and if true, the second element will indicate the distance along the ray at which it intersects. This can be converted to a point in space by calling \hyperlink{class_ogre_1_1_ray_a81a7ec16f410cedf5c279152230bf67b}{get\+Point()}. 
\end{DoxyReturn}


References Ogre\+::\+Math\+::intersects().



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_ray_8h}{Ogre\+Ray.\+h}\end{DoxyCompactItemize}
