\hypertarget{class_ogre_1_1_ray}{}\doxysection{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$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_ray_ae06168a69567ec6ede584cfa8ced9979}{Ray}} ()
\item 
\mbox{\hyperlink{class_ogre_1_1_ray_a7da08421bf78a27884c5a381cda60dc2}{Ray}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&origin, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&direction)
\item 
const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \& \mbox{\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 \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \& \mbox{\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 
\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \mbox{\hyperlink{class_ogre_1_1_ray_a81a7ec16f410cedf5c279152230bf67b}{get\+Point}} (\mbox{\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 
\mbox{\hyperlink{group___math_ga3f791f5ff19bd8395f0008085e68bf10}{Ray\+Test\+Result}} \mbox{\hyperlink{class_ogre_1_1_ray_af4a15c54cf07c7f0980918390c7f0c7d}{intersects}} (const \mbox{\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 
\mbox{\hyperlink{group___math_ga3f791f5ff19bd8395f0008085e68bf10}{Ray\+Test\+Result}} \mbox{\hyperlink{class_ogre_1_1_ray_afa5b7d11cf16bf35f212f6762a3d40e0}{intersects}} (const \mbox{\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 
\mbox{\hyperlink{group___math_ga3f791f5ff19bd8395f0008085e68bf10}{Ray\+Test\+Result}} \mbox{\hyperlink{class_ogre_1_1_ray_a45ddd7bccb4269f11a9bfebe5bc767c3}{intersects}} (const \mbox{\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 
\mbox{\hyperlink{group___math_ga3f791f5ff19bd8395f0008085e68bf10}{Ray\+Test\+Result}} \mbox{\hyperlink{class_ogre_1_1_ray_a27c18eed9d9d65197b12c2a2a8053c9c}{intersects}} (const \mbox{\hyperlink{class_ogre_1_1_sphere}{Sphere}} \&s, bool discard\+Inside=true) const
\begin{DoxyCompactList}\small\item\em Tests whether this ray intersects the given sphere. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \mbox{\hyperlink{class_ogre_1_1_ray_afcc111edd38353d3c8aedb0e318127d8}{operator$\ast$}} (\mbox{\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 \mbox{\hyperlink{class_ogre_1_1_ray_ac3082e7ed2efd58bb202043101d4abb2}{set\+Direction}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&dir)
\begin{DoxyCompactList}\small\item\em Sets the direction of the ray. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_ray_a730a34d1255a51df2bb072c823acec67}{set\+Origin}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&origin)
\begin{DoxyCompactList}\small\item\em Sets the origin of the ray. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

a line with an origin and direction. 

\doxysubsection{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}}
\doxysubsubsection{\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}}
\doxysubsubsection{\texorpdfstring{Ray()}{Ray()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Ogre\+::\+Ray\+::\+Ray (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{origin,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{direction }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_ray_a730a34d1255a51df2bb072c823acec67}\label{class_ogre_1_1_ray_a730a34d1255a51df2bb072c823acec67}} 
\index{Ogre::Ray@{Ogre::Ray}!setOrigin@{setOrigin}}
\index{setOrigin@{setOrigin}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{setOrigin()}{setOrigin()}}
{\footnotesize\ttfamily void Ogre\+::\+Ray\+::set\+Origin (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{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}!getOrigin@{getOrigin}}
\index{getOrigin@{getOrigin}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{getOrigin()}{getOrigin()}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{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}!setDirection@{setDirection}}
\index{setDirection@{setDirection}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{setDirection()}{setDirection()}}
{\footnotesize\ttfamily void Ogre\+::\+Ray\+::set\+Direction (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{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}!getDirection@{getDirection}}
\index{getDirection@{getDirection}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{getDirection()}{getDirection()}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{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}!getPoint@{getPoint}}
\index{getPoint@{getPoint}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{getPoint()}{getPoint()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} Ogre\+::\+Ray\+::get\+Point (\begin{DoxyParamCaption}\item[{\mbox{\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}}
\doxysubsubsection{\texorpdfstring{operator$\ast$()}{operator*()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} Ogre\+::\+Ray\+::operator$\ast$ (\begin{DoxyParamCaption}\item[{\mbox{\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_afa5b7d11cf16bf35f212f6762a3d40e0}\label{class_ogre_1_1_ray_afa5b7d11cf16bf35f212f6762a3d40e0}} 
\index{Ogre::Ray@{Ogre::Ray}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group___math_ga3f791f5ff19bd8395f0008085e68bf10}{Ray\+Test\+Result}} Ogre\+::\+Ray\+::intersects (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_plane}{Plane}} \&}]{p }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Tests whether this ray intersects the given plane. 



References Ogre\+::\+Math\+::\+Abs(), Ogre\+::\+Plane\+::d, Ogre\+::\+Vector$<$ dims, T $>$\+::dot\+Product(), and Ogre\+::\+Plane\+::normal.



Referenced by Ogre\+::\+Math\+::intersects().

\mbox{\Hypertarget{class_ogre_1_1_ray_a45ddd7bccb4269f11a9bfebe5bc767c3}\label{class_ogre_1_1_ray_a45ddd7bccb4269f11a9bfebe5bc767c3}} 
\index{Ogre::Ray@{Ogre::Ray}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group___math_ga3f791f5ff19bd8395f0008085e68bf10}{Ray\+Test\+Result}} Ogre\+::\+Ray\+::intersects (\begin{DoxyParamCaption}\item[{const \mbox{\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. 



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_a27c18eed9d9d65197b12c2a2a8053c9c}\label{class_ogre_1_1_ray_a27c18eed9d9d65197b12c2a2a8053c9c}} 
\index{Ogre::Ray@{Ogre::Ray}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group___math_ga3f791f5ff19bd8395f0008085e68bf10}{Ray\+Test\+Result}} Ogre\+::\+Ray\+::intersects (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_sphere}{Sphere}} \&}]{s,  }\item[{bool}]{discard\+Inside = {\ttfamily true} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Tests whether this ray intersects the given sphere. 



References Ogre\+::\+Vector$<$ dims, T $>$\+::dot\+Product(), Ogre\+::\+Sphere\+::get\+Center(), Ogre\+::\+Sphere\+::get\+Radius(), Ogre\+::\+Math\+::\+Sqrt(), and Ogre\+::\+Vector$<$ dims, T $>$\+::squared\+Length().

\mbox{\Hypertarget{class_ogre_1_1_ray_af4a15c54cf07c7f0980918390c7f0c7d}\label{class_ogre_1_1_ray_af4a15c54cf07c7f0980918390c7f0c7d}} 
\index{Ogre::Ray@{Ogre::Ray}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre::Ray@{Ogre::Ray}}
\doxysubsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group___math_ga3f791f5ff19bd8395f0008085e68bf10}{Ray\+Test\+Result}} Ogre\+::\+Ray\+::intersects (\begin{DoxyParamCaption}\item[{const \mbox{\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. 



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



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