<filename>projects/assignment-1/Doxygen documentation/latex/class_matrix4.tex
\hypertarget{class_matrix4}{}\section{Matrix4 Class Reference}
\label{class_matrix4}\index{Matrix4@{Matrix4}}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_matrix4_a21e70a74447b9b05cf9a06400bc9c661}\label{class_matrix4_a21e70a74447b9b05cf9a06400bc9c661}} 
\mbox{\hyperlink{class_matrix4_a21e70a74447b9b05cf9a06400bc9c661}{Matrix4}} ()
\begin{DoxyCompactList}\small\item\em Constructor for identity matrix. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_ab6bebf1e26ad75e79d4d57942de9a0c2}\label{class_matrix4_ab6bebf1e26ad75e79d4d57942de9a0c2}} 
\mbox{\hyperlink{class_matrix4_ab6bebf1e26ad75e79d4d57942de9a0c2}{Matrix4}} (const \mbox{\hyperlink{class_matrix4}{Matrix4}} \&mat)
\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_a617298ade1d407310876e78183e47c87}\label{class_matrix4_a617298ade1d407310876e78183e47c87}} 
\mbox{\hyperlink{class_matrix4_a617298ade1d407310876e78183e47c87}{Matrix4}} (float mat\mbox{[}16\mbox{]})
\begin{DoxyCompactList}\small\item\em Constructor that takes an array and builds a new matrix. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_ae0087573c29359c66423bee7b815ce42}\label{class_matrix4_ae0087573c29359c66423bee7b815ce42}} 
\mbox{\hyperlink{class_matrix4_ae0087573c29359c66423bee7b815ce42}{$\sim$\+Matrix4}} ()
\begin{DoxyCompactList}\small\item\em Deconstructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_a6ff99e9b78c07a013f82e1cd38d45eef}\label{class_matrix4_a6ff99e9b78c07a013f82e1cd38d45eef}} 
float \mbox{\hyperlink{class_matrix4_a6ff99e9b78c07a013f82e1cd38d45eef}{operator\mbox{[}$\,$\mbox{]}}} (const int index) const
\begin{DoxyCompactList}\small\item\em Getter. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_a9da82ca6629a842362a5c646e1c812fb}\label{class_matrix4_a9da82ca6629a842362a5c646e1c812fb}} 
float \& \mbox{\hyperlink{class_matrix4_a9da82ca6629a842362a5c646e1c812fb}{operator\mbox{[}$\,$\mbox{]}}} (const int index)
\begin{DoxyCompactList}\small\item\em Setter. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_ace5fb62ba207d9b1ac7ab7a366957f60}\label{class_matrix4_ace5fb62ba207d9b1ac7ab7a366957f60}} 
\mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_ace5fb62ba207d9b1ac7ab7a366957f60}{operator$\ast$}} (const \mbox{\hyperlink{class_matrix4}{Matrix4}} \&rhs) const
\begin{DoxyCompactList}\small\item\em Product of two matrices. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_afec465e9fdefc5d69062efbbe5f5446a}\label{class_matrix4_afec465e9fdefc5d69062efbbe5f5446a}} 
\mbox{\hyperlink{class_vector4_d}{Vector4D}} \mbox{\hyperlink{class_matrix4_afec465e9fdefc5d69062efbbe5f5446a}{operator$\ast$}} (const \mbox{\hyperlink{class_vector4_d}{Vector4D}} \&rhs) const
\begin{DoxyCompactList}\small\item\em Product of a matrix and a vector. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_a61b8f5a2f89ae56c43b91e750ae6e580}{operator+}} (const \mbox{\hyperlink{class_matrix4}{Matrix4}} \&rhs) const
\begin{DoxyCompactList}\small\item\em Needed to perform rotation around a vector. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_ad348ae172508538bc282895b964296f1}\label{class_matrix4_ad348ae172508538bc282895b964296f1}} 
\mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_ad348ae172508538bc282895b964296f1}{operator$\ast$}} (const float scalar) const
\begin{DoxyCompactList}\small\item\em Needed to perform rotation around a vector. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_a4daa9a348759a3331fbad171c0712974}\label{class_matrix4_a4daa9a348759a3331fbad171c0712974}} 
void \mbox{\hyperlink{class_matrix4_a4daa9a348759a3331fbad171c0712974}{print}} ()
\begin{DoxyCompactList}\small\item\em Print function used for testing the output from a matrix. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_matrix4_ad0f776311d4fa444adcb5563650bc210}\label{class_matrix4_ad0f776311d4fa444adcb5563650bc210}} 
static \mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_ad0f776311d4fa444adcb5563650bc210}{rotX}} (float angle)
\begin{DoxyCompactList}\small\item\em Rotation matrix around x-\/axis. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_a0063a003daa39cce2c9fb2693b600093}\label{class_matrix4_a0063a003daa39cce2c9fb2693b600093}} 
static \mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_a0063a003daa39cce2c9fb2693b600093}{rotY}} (float angle)
\begin{DoxyCompactList}\small\item\em Rotation matrix around y-\/axis. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_aaf387ef01b3ca7897f01a35fffa6c35f}\label{class_matrix4_aaf387ef01b3ca7897f01a35fffa6c35f}} 
static \mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_aaf387ef01b3ca7897f01a35fffa6c35f}{rotZ}} (float angle)
\begin{DoxyCompactList}\small\item\em Rotation matrix around z-\/axis. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_a970a4f16ef00a0893c3f25531522efd3}\label{class_matrix4_a970a4f16ef00a0893c3f25531522efd3}} 
static \mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_a970a4f16ef00a0893c3f25531522efd3}{rot\+Vec}} (\mbox{\hyperlink{class_vector4_d}{Vector4D}} \&vec, const float angle)
\begin{DoxyCompactList}\small\item\em Rotate around a vector a certain, given angle. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_matrix4_ab970165b164d6bebbafae4004b80f7b3}\label{class_matrix4_ab970165b164d6bebbafae4004b80f7b3}} 
static \mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_ab970165b164d6bebbafae4004b80f7b3}{transpose}} (const \mbox{\hyperlink{class_matrix4}{Matrix4}} \&mat)
\begin{DoxyCompactList}\small\item\em Transposes the given matrix and return the transpose as a new matrix. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{class_matrix4}{Matrix4}} \mbox{\hyperlink{class_matrix4_ac023c2fde9c362babf91761f97d5b814}{inverse}} (const \mbox{\hyperlink{class_matrix4}{Matrix4}} \&mat)
\begin{DoxyCompactList}\small\item\em Calculate the invere of a matrix, if the determinant is zerothe function returns the same matrix otherwise the inverse is returned as a new matrix. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_matrix4_a9e3075f101822993aae842e61c0eb529}\label{class_matrix4_a9e3075f101822993aae842e61c0eb529}} 
float {\bfseries matrix} \mbox{[}16\mbox{]}
\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_matrix4_ac023c2fde9c362babf91761f97d5b814}\label{class_matrix4_ac023c2fde9c362babf91761f97d5b814}} 
\index{Matrix4@{Matrix4}!inverse@{inverse}}
\index{inverse@{inverse}!Matrix4@{Matrix4}}
\subsubsection{\texorpdfstring{inverse()}{inverse()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_matrix4}{Matrix4}} Matrix4\+::inverse (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_matrix4}{Matrix4}} \&}]{mat }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Calculate the invere of a matrix, if the determinant is zerothe function returns the same matrix otherwise the inverse is returned as a new matrix. 

Calculate the determinant

If the determinant is zero the matrix is not inversible therefor the function returns the same matrix again

Calculate once to save 15 calculations below

Divide each element with the determinant \mbox{\Hypertarget{class_matrix4_a61b8f5a2f89ae56c43b91e750ae6e580}\label{class_matrix4_a61b8f5a2f89ae56c43b91e750ae6e580}} 
\index{Matrix4@{Matrix4}!operator+@{operator+}}
\index{operator+@{operator+}!Matrix4@{Matrix4}}
\subsubsection{\texorpdfstring{operator+()}{operator+()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_matrix4}{Matrix4}} Matrix4\+::operator+ (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_matrix4}{Matrix4}} \&}]{rhs }\end{DoxyParamCaption}) const}



Needed to perform rotation around a vector. 

adds all the corresponding elements in both matricies to eachother 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
C\+:/\+Users/kirlun-\/7-\/local/source/repos/4\+D\+Vectors/4\+D\+Vectors/Matrix4.\+h\end{DoxyCompactItemize}
