\hypertarget{class_s_c_i_run_1_1_gui_1_1_sci_ball}{\section{Sci\-Ball Class Reference}
\label{class_s_c_i_run_1_1_gui_1_1_sci_ball}\index{Sci\-Ball@{Sci\-Ball}}
}


{\ttfamily \#include $<$Sci\-Ball.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_s_c_i_run_1_1_gui_1_1_sci_ball_a5952f3539ff340ae69a068427372eee4}{Sci\-Ball} (const spire\-::\-V3 \&center, float radius, const spire\-::\-M44 \&screen\-To\-T\-C\-S=spire\-::\-M44())
\item 
virtual \hyperlink{class_s_c_i_run_1_1_gui_1_1_sci_ball_a5c300004f411382b17425d38186794d8}{$\sim$\-Sci\-Ball} ()
\item 
void \hyperlink{class_s_c_i_run_1_1_gui_1_1_sci_ball_af59b50f14d51f25dde3f4e34df2c5901}{begin\-Drag} (const spire\-::\-V2 \&mouse\-Screen\-Coords)
\item 
void \hyperlink{class_s_c_i_run_1_1_gui_1_1_sci_ball_abbb9eb00dca64aed72501a47dae4e6b6}{drag} (const spire\-::\-V2 \&mouse\-Screen\-Coords)
\item 
spire\-::\-M44 \hyperlink{class_s_c_i_run_1_1_gui_1_1_sci_ball_ab532625c22319e1c454cfd2f29bd7bf3}{get\-Transformation} () const 
\end{DoxyCompactItemize}


\subsection{Detailed Description}
A reimplementation of Ken Shoemake's arcball camera. \hyperlink{namespace_s_c_i_run}{S\-C\-I\-Run} 4's camera system is based off of Ken's code. The Code appears in Graphics Gems 4, I\-I\-I.\-1.

Unless specified otherwise, all calculations and variables stored in this class are relative to the target coordinate system (T\-C\-S) for which there is a transformation from screen space to T\-C\-S given by the screen\-To\-T\-C\-S constructor parameter.

If the screen\-To\-T\-C\-S parameter in the constructor is left as the identity matrix then all values are given in screen coordinates. Screen coordinates are (x  \mbox{[}-\/1,1\mbox{]}) and (y  \mbox{[}-\/1,1\mbox{]}) where (0,0) is the center of the screen. \begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000487}{Todo}]Extend this class to include Mouse screen coords -\/$>$ object space calculations. That way we can rotate around a particular object. May also want to visually represent the sphere when we perform this calculation. 

Provide method of setting the default orientation of the object. \end{DoxyRefDesc}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_s_c_i_run_1_1_gui_1_1_sci_ball_a5952f3539ff340ae69a068427372eee4}{\index{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}!Sci\-Ball@{Sci\-Ball}}
\index{Sci\-Ball@{Sci\-Ball}!SCIRun::Gui::SciBall@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}}
\subsubsection[{Sci\-Ball}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Sci\-Ball} (
\begin{DoxyParamCaption}
\item[{const spire\-::\-V3 \&}]{center, }
\item[{float}]{radius, }
\item[{const spire\-::\-M44 \&}]{screen\-To\-T\-C\-S = {\ttfamily spire\-:\-:M44()}}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_gui_1_1_sci_ball_a5952f3539ff340ae69a068427372eee4}

\begin{DoxyParams}{Parameters}
{\em center} & Center of the arcball in T\-C\-S (screen coordinates if screen\-To\-T\-C\-S = identity). Generally this will always be (0,0,0). But you may move the center in and out of the screen plane to various effect. \\
\hline
{\em radius} & Radius in T\-C\-S. For screen coordinates, a good default is 0.\-75. \\
\hline
{\em screen\-To\-T\-C\-S} & Transformation from screen coordinates to T\-C\-S. 'center' and 'radius' are given in T\-C\-S. \\
\hline
\end{DoxyParams}
\hypertarget{class_s_c_i_run_1_1_gui_1_1_sci_ball_a5c300004f411382b17425d38186794d8}{\index{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}!$\sim$\-Sci\-Ball@{$\sim$\-Sci\-Ball}}
\index{$\sim$\-Sci\-Ball@{$\sim$\-Sci\-Ball}!SCIRun::Gui::SciBall@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}}
\subsubsection[{$\sim$\-Sci\-Ball}]{\setlength{\rightskip}{0pt plus 5cm}$\sim${\bf Sci\-Ball} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_s_c_i_run_1_1_gui_1_1_sci_ball_a5c300004f411382b17425d38186794d8}


\subsection{Member Function Documentation}
\hypertarget{class_s_c_i_run_1_1_gui_1_1_sci_ball_af59b50f14d51f25dde3f4e34df2c5901}{\index{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}!begin\-Drag@{begin\-Drag}}
\index{begin\-Drag@{begin\-Drag}!SCIRun::Gui::SciBall@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}}
\subsubsection[{begin\-Drag}]{\setlength{\rightskip}{0pt plus 5cm}void begin\-Drag (
\begin{DoxyParamCaption}
\item[{const spire\-::\-V2 \&}]{mouse\-Screen\-Coords}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_gui_1_1_sci_ball_af59b50f14d51f25dde3f4e34df2c5901}
Initiate an arc ball drag given the mouse click in screen coordinates. 
\begin{DoxyParams}{Parameters}
{\em mouse\-Screen\-Coords} & Mouse screen coordinates. \\
\hline
\end{DoxyParams}
\hypertarget{class_s_c_i_run_1_1_gui_1_1_sci_ball_abbb9eb00dca64aed72501a47dae4e6b6}{\index{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}!drag@{drag}}
\index{drag@{drag}!SCIRun::Gui::SciBall@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}}
\subsubsection[{drag}]{\setlength{\rightskip}{0pt plus 5cm}void drag (
\begin{DoxyParamCaption}
\item[{const spire\-::\-V2 \&}]{mouse\-Screen\-Coords}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_gui_1_1_sci_ball_abbb9eb00dca64aed72501a47dae4e6b6}
Informs the arcball when the mouse has been dragged. 
\begin{DoxyParams}{Parameters}
{\em mouse\-Screen\-Coords} & Mouse screen coordinates. \\
\hline
\end{DoxyParams}
\begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000486}{Todo}]Perform constraints here. \end{DoxyRefDesc}
\hypertarget{class_s_c_i_run_1_1_gui_1_1_sci_ball_ab532625c22319e1c454cfd2f29bd7bf3}{\index{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}!get\-Transformation@{get\-Transformation}}
\index{get\-Transformation@{get\-Transformation}!SCIRun::Gui::SciBall@{S\-C\-I\-Run\-::\-Gui\-::\-Sci\-Ball}}
\subsubsection[{get\-Transformation}]{\setlength{\rightskip}{0pt plus 5cm}spire\-::\-M44 get\-Transformation (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}\label{class_s_c_i_run_1_1_gui_1_1_sci_ball_ab532625c22319e1c454cfd2f29bd7bf3}
Retrieves the current transformation in T\-C\-S. Obtains full transformation of object in question. If the arc ball is being used to control camera rotation, then this will contain all concatenated camera transformations. The current state of the camera is stored in the quaternions m\-Q\-Down and m\-Q\-Now. m\-Mat\-Now is calculated from m\-Q\-Now. 

The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Interface/\-Modules/\-Render/\-Spire\-S\-C\-I\-Run/\hyperlink{_sci_ball_8h}{Sci\-Ball.\-h}\item 
Interface/\-Modules/\-Render/\-Spire\-S\-C\-I\-Run/\hyperlink{_sci_ball_8cc}{Sci\-Ball.\-cc}\end{DoxyCompactItemize}
