\hypertarget{class_ogre_1_1_sphere}{}\doxysection{Ogre\+::Sphere Class Reference}
\label{class_ogre_1_1_sphere}\index{Ogre::Sphere@{Ogre::Sphere}}


A sphere primitive, mostly used for bounds checking.  




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

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_sphere_a93cb05f8025668db930ef81a34dca47b}{Sphere}} ()
\begin{DoxyCompactList}\small\item\em Standard constructor -\/ creates a unit sphere around the origin. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_sphere_abd0dc8dd45b400a07d71115652d2dc20}{Sphere}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&center, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} radius)
\begin{DoxyCompactList}\small\item\em Constructor allowing arbitrary spheres. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \& \mbox{\hyperlink{class_ogre_1_1_sphere_a1b7261dda9e5c48e48dd4fb2badd14a4}{get\+Center}} (void) const
\begin{DoxyCompactList}\small\item\em Returns the center point of the sphere. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_sphere_a6306310d834dc7844c73dd24ec7a318d}{get\+Radius}} (void) const
\begin{DoxyCompactList}\small\item\em Returns the radius of the sphere. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_sphere_a77798ca00493f6b1f9da7f3eff782642}{intersects}} (const \mbox{\hyperlink{class_ogre_1_1_axis_aligned_box}{Axis\+Aligned\+Box}} \&box) const
\begin{DoxyCompactList}\small\item\em Returns whether or not this sphere intersects a box. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_sphere_a774730a3d40a4375144128b13afc39ef}{intersects}} (const \mbox{\hyperlink{class_ogre_1_1_plane}{Plane}} \&plane) const
\begin{DoxyCompactList}\small\item\em Returns whether or not this sphere intersects a plane. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_sphere_a01e832a0542bde80df107ab6b26b56f9}{intersects}} (const \mbox{\hyperlink{class_ogre_1_1_sphere}{Sphere}} \&s) const
\begin{DoxyCompactList}\small\item\em Returns whether or not this sphere intersects another sphere. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_sphere_a4a30ba4b71475bf2da82c91dcc13e97a}{intersects}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&v) const
\begin{DoxyCompactList}\small\item\em Returns whether or not this sphere intersects a point. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_sphere_a9e9104e8e57c2fa2d30920989c725d1a}{merge}} (const \mbox{\hyperlink{class_ogre_1_1_sphere}{Sphere}} \&oth)
\begin{DoxyCompactList}\small\item\em Merges another \mbox{\hyperlink{class_ogre_1_1_sphere}{Sphere}} into the current sphere. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_sphere_af2cd29ca81e68cdeb65b91a2667d6fbc}{set\+Center}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&center)
\begin{DoxyCompactList}\small\item\em Sets the center point of the sphere. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_sphere_aafe80cad31edd668b09981a6f836c8b1}{set\+Radius}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} radius)
\begin{DoxyCompactList}\small\item\em Sets the radius of the sphere. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A sphere primitive, mostly used for bounds checking. 

\begin{DoxyRemark}{Remarks}
A sphere in math texts is normally represented by the function x$^\wedge$2 + y$^\wedge$2 + z$^\wedge$2 = r$^\wedge$2 (for sphere\textquotesingle{}s centered on the origin). \mbox{\hyperlink{namespace_ogre}{Ogre}} stores spheres simply as a center point and a radius. 
\end{DoxyRemark}


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



Standard constructor -\/ creates a unit sphere around the origin. 

\mbox{\Hypertarget{class_ogre_1_1_sphere_abd0dc8dd45b400a07d71115652d2dc20}\label{class_ogre_1_1_sphere_abd0dc8dd45b400a07d71115652d2dc20}} 
\index{Ogre::Sphere@{Ogre::Sphere}!Sphere@{Sphere}}
\index{Sphere@{Sphere}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{Sphere()}{Sphere()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Ogre\+::\+Sphere\+::\+Sphere (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{center,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{radius }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Constructor allowing arbitrary spheres. 


\begin{DoxyParams}{Parameters}
{\em center} & The center point of the sphere. \\
\hline
{\em radius} & The radius of the sphere. \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_sphere_a6306310d834dc7844c73dd24ec7a318d}\label{class_ogre_1_1_sphere_a6306310d834dc7844c73dd24ec7a318d}} 
\index{Ogre::Sphere@{Ogre::Sphere}!getRadius@{getRadius}}
\index{getRadius@{getRadius}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{getRadius()}{getRadius()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Sphere\+::get\+Radius (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the radius of the sphere. 



Referenced by Ogre\+::\+Plane\+Bounded\+Volume\+::intersects(), Ogre\+::\+Ray\+::intersects(), and merge().

\mbox{\Hypertarget{class_ogre_1_1_sphere_aafe80cad31edd668b09981a6f836c8b1}\label{class_ogre_1_1_sphere_aafe80cad31edd668b09981a6f836c8b1}} 
\index{Ogre::Sphere@{Ogre::Sphere}!setRadius@{setRadius}}
\index{setRadius@{setRadius}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{setRadius()}{setRadius()}}
{\footnotesize\ttfamily void Ogre\+::\+Sphere\+::set\+Radius (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{radius }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets the radius of the sphere. 

\mbox{\Hypertarget{class_ogre_1_1_sphere_a1b7261dda9e5c48e48dd4fb2badd14a4}\label{class_ogre_1_1_sphere_a1b7261dda9e5c48e48dd4fb2badd14a4}} 
\index{Ogre::Sphere@{Ogre::Sphere}!getCenter@{getCenter}}
\index{getCenter@{getCenter}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{getCenter()}{getCenter()}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}}\& Ogre\+::\+Sphere\+::get\+Center (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the center point of the sphere. 



Referenced by Ogre\+::\+Plane\+Bounded\+Volume\+::intersects(), Ogre\+::\+Ray\+::intersects(), and merge().

\mbox{\Hypertarget{class_ogre_1_1_sphere_af2cd29ca81e68cdeb65b91a2667d6fbc}\label{class_ogre_1_1_sphere_af2cd29ca81e68cdeb65b91a2667d6fbc}} 
\index{Ogre::Sphere@{Ogre::Sphere}!setCenter@{setCenter}}
\index{setCenter@{setCenter}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{setCenter()}{setCenter()}}
{\footnotesize\ttfamily void Ogre\+::\+Sphere\+::set\+Center (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{center }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets the center point of the sphere. 

\mbox{\Hypertarget{class_ogre_1_1_sphere_a01e832a0542bde80df107ab6b26b56f9}\label{class_ogre_1_1_sphere_a01e832a0542bde80df107ab6b26b56f9}} 
\index{Ogre::Sphere@{Ogre::Sphere}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily bool Ogre\+::\+Sphere\+::intersects (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_sphere}{Sphere}} \&}]{s }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns whether or not this sphere intersects another sphere. 



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



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

\mbox{\Hypertarget{class_ogre_1_1_sphere_a77798ca00493f6b1f9da7f3eff782642}\label{class_ogre_1_1_sphere_a77798ca00493f6b1f9da7f3eff782642}} 
\index{Ogre::Sphere@{Ogre::Sphere}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily bool Ogre\+::\+Sphere\+::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]}}



Returns whether or not this sphere intersects a box. 



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

\mbox{\Hypertarget{class_ogre_1_1_sphere_a774730a3d40a4375144128b13afc39ef}\label{class_ogre_1_1_sphere_a774730a3d40a4375144128b13afc39ef}} 
\index{Ogre::Sphere@{Ogre::Sphere}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily bool Ogre\+::\+Sphere\+::intersects (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_plane}{Plane}} \&}]{plane }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns whether or not this sphere intersects a plane. 



References Ogre\+::\+Math\+::\+Abs(), and Ogre\+::\+Plane\+::get\+Distance().

\mbox{\Hypertarget{class_ogre_1_1_sphere_a4a30ba4b71475bf2da82c91dcc13e97a}\label{class_ogre_1_1_sphere_a4a30ba4b71475bf2da82c91dcc13e97a}} 
\index{Ogre::Sphere@{Ogre::Sphere}!intersects@{intersects}}
\index{intersects@{intersects}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{intersects()}{intersects()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily bool Ogre\+::\+Sphere\+::intersects (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{v }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns whether or not this sphere intersects a point. 



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

\mbox{\Hypertarget{class_ogre_1_1_sphere_a9e9104e8e57c2fa2d30920989c725d1a}\label{class_ogre_1_1_sphere_a9e9104e8e57c2fa2d30920989c725d1a}} 
\index{Ogre::Sphere@{Ogre::Sphere}!merge@{merge}}
\index{merge@{merge}!Ogre::Sphere@{Ogre::Sphere}}
\doxysubsubsection{\texorpdfstring{merge()}{merge()}}
{\footnotesize\ttfamily void Ogre\+::\+Sphere\+::merge (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_sphere}{Sphere}} \&}]{oth }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Merges another \mbox{\hyperlink{class_ogre_1_1_sphere}{Sphere}} into the current sphere. 



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



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