\hypertarget{group__Evas__Canvas3D__Camera}{}\section{Camera Object}
\label{group__Evas__Canvas3D__Camera}\index{Camera Object@{Camera Object}}


A camera object is used for taking a picture of a scene graph.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
E\+O\+A\+PI void \hyperlink{group__Evas__Canvas3D__Camera_ga4456be2631055aad7f36300aa3f16176}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set} (\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$obj, const \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} $\ast$matrix)
\begin{DoxyCompactList}\small\item\em Set the projection matrix of the given camera. \end{DoxyCompactList}\item 
E\+O\+A\+PI void \hyperlink{group__Evas__Canvas3D__Camera_ga9613d1821c8c4defc98785f01ed9e626}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+get} (const \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$obj, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} $\ast$matrix)
\begin{DoxyCompactList}\small\item\em Get the projection matrix of the given camera. \end{DoxyCompactList}\item 
E\+O\+A\+PI void \hyperlink{group__Evas__Canvas3D__Camera_ga5027c6be4dc48861aa4d44b0e1c8eb76}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+perspective\+\_\+set} (\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$obj, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} fovy, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} aspect, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} dnear, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} dfar)
\begin{DoxyCompactList}\small\item\em Set the projection matrix of the given camera with perspective projection. \end{DoxyCompactList}\item 
E\+O\+A\+PI void \hyperlink{group__Evas__Canvas3D__Camera_ga5c4088ccec656cfde00a912d23818722}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+frustum\+\_\+set} (\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$obj, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} left, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} right, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} bottom, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} top, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} dnear, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} dfar)
\begin{DoxyCompactList}\small\item\em Set the projection matrix of the given camera with frustum projection. \end{DoxyCompactList}\item 
E\+O\+A\+PI void \hyperlink{group__Evas__Canvas3D__Camera_ga70541fcd3dc6cd205f8a9543abf2b5f0}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+ortho\+\_\+set} (\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$obj, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} left, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} right, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} bottom, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} top, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} dnear, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} dfar)
\begin{DoxyCompactList}\small\item\em Set the projection matrix of the given camera with orthogonal projection. \end{DoxyCompactList}\item 
E\+O\+A\+PI \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Evas__Canvas3D__Camera_ga843a72988369c1b8cb4c1c7cf623efd3}{evas\+\_\+canvas3d\+\_\+camera\+\_\+node\+\_\+visible\+\_\+get} (\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$obj, Evas\+\_\+\+Canvas3\+D\+\_\+\+Node $\ast$camera\+\_\+node, Evas\+\_\+\+Canvas3\+D\+\_\+\+Node $\ast$node, Evas\+\_\+\+Canvas3\+D\+\_\+\+Frustum\+\_\+\+Mode key)
\begin{DoxyCompactList}\small\item\em Check is bounding sphere of given node inside frustum of camera node. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A camera object is used for taking a picture of a scene graph. 

A camera object itself is just a set of properties on how the camera should take the picture (like focus length and film size of the real world cameras). To be able to take a shot of the scene, a camera should be located in the scene, so that it has its viewing position and direction. It is done by containing the camera on a node. If one wants to locate several cameras having same properties, instead of creating multiple cameras, just create one camera and multiple nodes containing the camera and locate them at each desired position and direction. Just for convenience, use \hyperlink{group__Evas__Canvas3D__Node_ga34226725e6f77397123da2fd927f8dca}{evas\+\_\+canvas3d\+\_\+node\+\_\+position\+\_\+set()} to move the camera to desired position and use \hyperlink{group__Evas__Canvas3D__Node_ga8ae46000ed15a96a2b1fb6c8001cc890}{evas\+\_\+canvas3d\+\_\+node\+\_\+look\+\_\+at\+\_\+set()} to adjust the viewing direction of the camera. 

\subsection{Function Documentation}
\hypertarget{group__Evas__Canvas3D__Camera_ga4456be2631055aad7f36300aa3f16176}{}\label{group__Evas__Canvas3D__Camera_ga4456be2631055aad7f36300aa3f16176} 
\index{Camera Object@{Camera Object}!evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set}}
\index{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set}!Camera Object@{Camera Object}}
\subsubsection{\texorpdfstring{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set()}{evas\_canvas3d\_camera\_projection\_matrix\_set()}}
{\footnotesize\ttfamily E\+O\+A\+PI void evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$}]{obj,  }\item[{const \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} $\ast$}]{matrix }\end{DoxyParamCaption})}



Set the projection matrix of the given camera. 

Default projection matrix is identity matrix.

See also \hyperlink{group__Evas__Canvas3D__Camera_ga5027c6be4dc48861aa4d44b0e1c8eb76}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+perspective\+\_\+set}, \hyperlink{group__Evas__Canvas3D__Camera_ga70541fcd3dc6cd205f8a9543abf2b5f0}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+ortho\+\_\+set} and \hyperlink{group__Evas__Canvas3D__Camera_ga5c4088ccec656cfde00a912d23818722}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+frustum\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em matrix} & Projection Matrix \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Camera_ga9613d1821c8c4defc98785f01ed9e626}{}\label{group__Evas__Canvas3D__Camera_ga9613d1821c8c4defc98785f01ed9e626} 
\index{Camera Object@{Camera Object}!evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+get@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+get}}
\index{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+get@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+get}!Camera Object@{Camera Object}}
\subsubsection{\texorpdfstring{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+get()}{evas\_canvas3d\_camera\_projection\_matrix\_get()}}
{\footnotesize\ttfamily E\+O\+A\+PI void evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+get (\begin{DoxyParamCaption}\item[{const \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$}]{obj,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} $\ast$}]{matrix }\end{DoxyParamCaption})}



Get the projection matrix of the given camera. 

See also \hyperlink{group__Evas__Canvas3D__Camera_ga4456be2631055aad7f36300aa3f16176}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em matrix} & Projection Matrix \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Camera_ga5027c6be4dc48861aa4d44b0e1c8eb76}{}\label{group__Evas__Canvas3D__Camera_ga5027c6be4dc48861aa4d44b0e1c8eb76} 
\index{Camera Object@{Camera Object}!evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+perspective\+\_\+set@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+perspective\+\_\+set}}
\index{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+perspective\+\_\+set@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+perspective\+\_\+set}!Camera Object@{Camera Object}}
\subsubsection{\texorpdfstring{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+perspective\+\_\+set()}{evas\_canvas3d\_camera\_projection\_perspective\_set()}}
{\footnotesize\ttfamily E\+O\+A\+PI void evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+perspective\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$}]{obj,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{fovy,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{aspect,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{dnear,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{dfar }\end{DoxyParamCaption})}



Set the projection matrix of the given camera with perspective projection. 

See also \hyperlink{group__Evas__Canvas3D__Camera_ga4456be2631055aad7f36300aa3f16176}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em fovy} & Field of view angle in Y direction. \\
\hline
\mbox{\tt in}  & {\em aspect} & Aspect ratio. \\
\hline
\mbox{\tt in}  & {\em dnear} & Distance to near clipping plane. \\
\hline
\mbox{\tt in}  & {\em dfar} & Distance to far clipping plane. \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Camera_ga5c4088ccec656cfde00a912d23818722}{}\label{group__Evas__Canvas3D__Camera_ga5c4088ccec656cfde00a912d23818722} 
\index{Camera Object@{Camera Object}!evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+frustum\+\_\+set@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+frustum\+\_\+set}}
\index{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+frustum\+\_\+set@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+frustum\+\_\+set}!Camera Object@{Camera Object}}
\subsubsection{\texorpdfstring{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+frustum\+\_\+set()}{evas\_canvas3d\_camera\_projection\_frustum\_set()}}
{\footnotesize\ttfamily E\+O\+A\+PI void evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+frustum\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$}]{obj,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{left,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{right,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{bottom,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{top,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{dnear,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{dfar }\end{DoxyParamCaption})}



Set the projection matrix of the given camera with frustum projection. 

See also \hyperlink{group__Evas__Canvas3D__Camera_ga4456be2631055aad7f36300aa3f16176}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em left} & Left X coordinate of the near clipping plane. \\
\hline
\mbox{\tt in}  & {\em right} & Right X coordinate of the near clipping plane.. \\
\hline
\mbox{\tt in}  & {\em bottom} & Bottom Y coordinate of the near clipping plane. \\
\hline
\mbox{\tt in}  & {\em top} & Top Y coordinate of the near clipping plane \\
\hline
\mbox{\tt in}  & {\em dnear} & Distance to near clipping plane. \\
\hline
\mbox{\tt in}  & {\em dfar} & Distance to far clipping plane. \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Camera_ga70541fcd3dc6cd205f8a9543abf2b5f0}{}\label{group__Evas__Canvas3D__Camera_ga70541fcd3dc6cd205f8a9543abf2b5f0} 
\index{Camera Object@{Camera Object}!evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+ortho\+\_\+set@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+ortho\+\_\+set}}
\index{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+ortho\+\_\+set@{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+ortho\+\_\+set}!Camera Object@{Camera Object}}
\subsubsection{\texorpdfstring{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+ortho\+\_\+set()}{evas\_canvas3d\_camera\_projection\_ortho\_set()}}
{\footnotesize\ttfamily E\+O\+A\+PI void evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+ortho\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$}]{obj,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{left,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{right,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{bottom,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{top,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{dnear,  }\item[{\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real}}]{dfar }\end{DoxyParamCaption})}



Set the projection matrix of the given camera with orthogonal projection. 

See also \hyperlink{group__Evas__Canvas3D__Camera_ga4456be2631055aad7f36300aa3f16176}{evas\+\_\+canvas3d\+\_\+camera\+\_\+projection\+\_\+matrix\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em left} & Left X coordinate of the near clipping plane. \\
\hline
\mbox{\tt in}  & {\em right} & Right X coordinate of the near clipping plane.. \\
\hline
\mbox{\tt in}  & {\em bottom} & Bottom Y coordinate of the near clipping plane. \\
\hline
\mbox{\tt in}  & {\em top} & Top Y coordinate of the near clipping plane \\
\hline
\mbox{\tt in}  & {\em dnear} & Distance to near clipping plane. \\
\hline
\mbox{\tt in}  & {\em dfar} & Distance to far clipping plane. \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Camera_ga843a72988369c1b8cb4c1c7cf623efd3}{}\label{group__Evas__Canvas3D__Camera_ga843a72988369c1b8cb4c1c7cf623efd3} 
\index{Camera Object@{Camera Object}!evas\+\_\+canvas3d\+\_\+camera\+\_\+node\+\_\+visible\+\_\+get@{evas\+\_\+canvas3d\+\_\+camera\+\_\+node\+\_\+visible\+\_\+get}}
\index{evas\+\_\+canvas3d\+\_\+camera\+\_\+node\+\_\+visible\+\_\+get@{evas\+\_\+canvas3d\+\_\+camera\+\_\+node\+\_\+visible\+\_\+get}!Camera Object@{Camera Object}}
\subsubsection{\texorpdfstring{evas\+\_\+canvas3d\+\_\+camera\+\_\+node\+\_\+visible\+\_\+get()}{evas\_canvas3d\_camera\_node\_visible\_get()}}
{\footnotesize\ttfamily E\+O\+A\+PI \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} evas\+\_\+canvas3d\+\_\+camera\+\_\+node\+\_\+visible\+\_\+get (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$}]{obj,  }\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Node $\ast$}]{camera\+\_\+node,  }\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Node $\ast$}]{node,  }\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Frustum\+\_\+\+Mode}]{key }\end{DoxyParamCaption})}



Check is bounding sphere of given node inside frustum of camera node. 

If the nodes are {\ttfamily null} or nodes type mismatch error wrong type of nodes will be generated and returned {\ttfamily false}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em camera\+\_\+node} & The given camera node. \\
\hline
\mbox{\tt in}  & {\em node} & The given node. \\
\hline
\mbox{\tt in}  & {\em key} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily true} in frustum, {\ttfamily false} otherwise 
\end{DoxyReturn}
