\hypertarget{group__EPhysics__Camera}{\section{E\+Physics Camera}
\label{group__EPhysics__Camera}\index{E\+Physics Camera@{E\+Physics Camera}}
}


A camera defines the region of the physics world that will be rendered on the canvas.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \+\_\+\+E\+Physics\+\_\+\+Camera \hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera}
\begin{DoxyCompactList}\small\item\em Camera handle, used to change the position of the frame to be rendered. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}{ephysics\+\_\+camera\+\_\+position\+\_\+set} (\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera} $\ast$camera, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} x, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} y)
\begin{DoxyCompactList}\small\item\em Set camera's position. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__EPhysics__Camera_ga5e549e85d0d98a878dc636b6463645d6}{ephysics\+\_\+camera\+\_\+position\+\_\+get} (const \hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera} $\ast$camera, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} $\ast$x, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} $\ast$y)
\begin{DoxyCompactList}\small\item\em Get camera's position. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__EPhysics__Camera_gabb7602830e3a9daa67d7bbe1a71a776e}{ephysics\+\_\+camera\+\_\+body\+\_\+track} (\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera} $\ast$camera, \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{E\+Physics\+\_\+\+Body} $\ast$body, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} horizontal, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} vertical)
\begin{DoxyCompactList}\small\item\em Set camera to track a body. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__EPhysics__Camera_ga3f8d5e51ae54ac3c2a5bdc0a6fb162c6}{ephysics\+\_\+camera\+\_\+tracked\+\_\+body\+\_\+get} (\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera} $\ast$camera, \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{E\+Physics\+\_\+\+Body} $\ast$$\ast$body, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} $\ast$horizontal, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} $\ast$vertical)
\begin{DoxyCompactList}\small\item\em Get body tracked by camera. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__EPhysics__Camera_gabe63cac3d18202ddb8596f50adbc3206}{ephysics\+\_\+camera\+\_\+perspective\+\_\+set} (\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera} $\ast$camera, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} px, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} py, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} z0, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} foc)
\begin{DoxyCompactList}\small\item\em Set perspective to be applied on the scene. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__EPhysics__Camera_ga971b0520cc7ee43fdbd5b1b074c4025e}{ephysics\+\_\+camera\+\_\+perspective\+\_\+get} (const \hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera} $\ast$camera, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} $\ast$px, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} $\ast$py, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} $\ast$z0, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} $\ast$foc)
\begin{DoxyCompactList}\small\item\em Get perspective applied on the scene. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__EPhysics__Camera_ga3dce6e71508cba24250679f67bbb8e11}{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set} (\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera} $\ast$camera, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} enabled)
\begin{DoxyCompactList}\small\item\em Set if perspective should be applied. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__EPhysics__Camera_gabe75c8755354b2d4e20ff1bcdb66302b}{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get} (const \hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{E\+Physics\+\_\+\+Camera} $\ast$camera)
\begin{DoxyCompactList}\small\item\em Return if perspective is enabled or not. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A camera defines the region of the physics world that will be rendered on the canvas. 

It sets the point of view.

Every world has a camera, that can be gotten with \hyperlink{group__EPhysics__World_ga97fe0c2a98a7998f29f7390cea868ff0}{ephysics\+\_\+world\+\_\+camera\+\_\+get()}. Its position can be set with \hyperlink{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}{ephysics\+\_\+camera\+\_\+position\+\_\+set()} or can be set to track a body, with \hyperlink{group__EPhysics__Camera_gabb7602830e3a9daa67d7bbe1a71a776e}{ephysics\+\_\+camera\+\_\+body\+\_\+track()}; 

\subsection{Typedef Documentation}
\hypertarget{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{\index{E\+Physics Camera@{E\+Physics Camera}!E\+Physics\+\_\+\+Camera@{E\+Physics\+\_\+\+Camera}}
\index{E\+Physics\+\_\+\+Camera@{E\+Physics\+\_\+\+Camera}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{E\+Physics\+\_\+\+Camera}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \+\_\+\+E\+Physics\+\_\+\+Camera {\bf E\+Physics\+\_\+\+Camera}}}\label{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}


Camera handle, used to change the position of the frame to be rendered. 

Every world have a camera that can be gotten with \hyperlink{group__EPhysics__World_ga97fe0c2a98a7998f29f7390cea868ff0}{ephysics\+\_\+world\+\_\+camera\+\_\+get()}. 

\subsection{Function Documentation}
\hypertarget{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}{\index{E\+Physics Camera@{E\+Physics Camera}!ephysics\+\_\+camera\+\_\+position\+\_\+set@{ephysics\+\_\+camera\+\_\+position\+\_\+set}}
\index{ephysics\+\_\+camera\+\_\+position\+\_\+set@{ephysics\+\_\+camera\+\_\+position\+\_\+set}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{ephysics\+\_\+camera\+\_\+position\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ephysics\+\_\+camera\+\_\+position\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf E\+Physics\+\_\+\+Camera} $\ast$}]{camera, }
\item[{{\bf Evas\+\_\+\+Coord}}]{x, }
\item[{{\bf Evas\+\_\+\+Coord}}]{y}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}


Set camera's position. 

Camera's position referes to the position of the top-\/left point of the camera.

By default a camera is created to map the first quadrant of physics world from the point (0, 0) to (render area width / world rate, render area height / world rate).

When render area is set with \hyperlink{group__EPhysics__World_gaabf8abaf9c41b0c1e5daa4acf3df0356}{ephysics\+\_\+world\+\_\+render\+\_\+geometry\+\_\+set()}, the camera geometry is updated to match it. So, for most cases, camera won't need to be handled by the user.

But it can be modified passing another top-\/left point position, so another region of the physics world will be rendered on the render area. So if you have a scene larger than the render area, camera handling can be very useful.

This function will make camera stop tracking a body set with \hyperlink{group__EPhysics__Camera_gabb7602830e3a9daa67d7bbe1a71a776e}{ephysics\+\_\+camera\+\_\+body\+\_\+track()}.

\begin{DoxyNote}{Note}
This change will be noticed on the next physics tick, so evas objects will be updated taking the camera's new position in account.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em camera} & The camera to be positioned. \\
\hline
{\em x} & The new position on x axis, in pixels. \\
\hline
{\em y} & The new position on y axis, in pixels.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__EPhysics__Camera_ga5e549e85d0d98a878dc636b6463645d6}{ephysics\+\_\+camera\+\_\+position\+\_\+get()}. 

\hyperlink{group__EPhysics__World_ga97fe0c2a98a7998f29f7390cea868ff0}{ephysics\+\_\+world\+\_\+camera\+\_\+get()}. 

\hyperlink{group__EPhysics__World_ga4191077d4da05cfe550e9690fc311213}{ephysics\+\_\+world\+\_\+rate\+\_\+get()}. 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{test_camera_8c-example}{test\+\_\+camera.\+c}, and \hyperlink{test_camera_track_8c-example}{test\+\_\+camera\+\_\+track.\+c}.\end{Desc}
\hypertarget{group__EPhysics__Camera_ga5e549e85d0d98a878dc636b6463645d6}{\index{E\+Physics Camera@{E\+Physics Camera}!ephysics\+\_\+camera\+\_\+position\+\_\+get@{ephysics\+\_\+camera\+\_\+position\+\_\+get}}
\index{ephysics\+\_\+camera\+\_\+position\+\_\+get@{ephysics\+\_\+camera\+\_\+position\+\_\+get}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{ephysics\+\_\+camera\+\_\+position\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ephysics\+\_\+camera\+\_\+position\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf E\+Physics\+\_\+\+Camera} $\ast$}]{camera, }
\item[{{\bf Evas\+\_\+\+Coord} $\ast$}]{x, }
\item[{{\bf Evas\+\_\+\+Coord} $\ast$}]{y}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Camera_ga5e549e85d0d98a878dc636b6463645d6}


Get camera's position. 


\begin{DoxyParams}{Parameters}
{\em camera} & The world's camera. \\
\hline
{\em x} & Position on x axis, in pixels. \\
\hline
{\em y} & Position on y axis, in pixels.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}{ephysics\+\_\+camera\+\_\+position\+\_\+set()} for more details. 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{test_camera_8c-example}{test\+\_\+camera.\+c}, and \hyperlink{test_camera_track_8c-example}{test\+\_\+camera\+\_\+track.\+c}.\end{Desc}
\hypertarget{group__EPhysics__Camera_gabb7602830e3a9daa67d7bbe1a71a776e}{\index{E\+Physics Camera@{E\+Physics Camera}!ephysics\+\_\+camera\+\_\+body\+\_\+track@{ephysics\+\_\+camera\+\_\+body\+\_\+track}}
\index{ephysics\+\_\+camera\+\_\+body\+\_\+track@{ephysics\+\_\+camera\+\_\+body\+\_\+track}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{ephysics\+\_\+camera\+\_\+body\+\_\+track}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ephysics\+\_\+camera\+\_\+body\+\_\+track (
\begin{DoxyParamCaption}
\item[{{\bf E\+Physics\+\_\+\+Camera} $\ast$}]{camera, }
\item[{{\bf E\+Physics\+\_\+\+Body} $\ast$}]{body, }
\item[{{\bf Eina\+\_\+\+Bool}}]{horizontal, }
\item[{{\bf Eina\+\_\+\+Bool}}]{vertical}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Camera_gabb7602830e3a9daa67d7bbe1a71a776e}


Set camera to track a body. 

When a body is tracked, the camera will move automatically, following this body. It will keeps the body centralized on rendered area. If it will be centralized horizontally and / or vertically depends if parameters {\ttfamily horizontal} and {\ttfamily vertical} are set to {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E}.

Default updates (\hyperlink{group__EPhysics__Body_ga7209e650176e0612efb2a2cc2af0ec27}{ephysics\+\_\+body\+\_\+evas\+\_\+object\+\_\+update()}) will take care of updating evas objects associated to the bodies correctly. But if you need to do it yourself, you'll need to take camera's position in consideration, using \hyperlink{group__EPhysics__Camera_ga5e549e85d0d98a878dc636b6463645d6}{ephysics\+\_\+camera\+\_\+position\+\_\+get()}.

\begin{DoxyNote}{Note}
This change will be noticed on the next physics tick, so evas objects will be updated taking the camera's new position in account.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em camera} & The world's camera. \\
\hline
{\em body} & The body tracked by the {\ttfamily camera}, or {\ttfamily N\+U\+L\+L} if camera isn't tracking any body. \\
\hline
{\em horizontal} & {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if {\ttfamily body} is tracked on x axis, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise; \\
\hline
{\em vertical} & {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if {\ttfamily body} is tracked on y axis, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise;\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__EPhysics__Camera_ga3f8d5e51ae54ac3c2a5bdc0a6fb162c6}{ephysics\+\_\+camera\+\_\+tracked\+\_\+body\+\_\+get()}. 

\hyperlink{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}{ephysics\+\_\+camera\+\_\+position\+\_\+set()}. 

\hyperlink{group__EPhysics__World_ga97fe0c2a98a7998f29f7390cea868ff0}{ephysics\+\_\+world\+\_\+camera\+\_\+get()}. 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{test_camera_track_8c-example}{test\+\_\+camera\+\_\+track.\+c}.\end{Desc}
\hypertarget{group__EPhysics__Camera_ga3f8d5e51ae54ac3c2a5bdc0a6fb162c6}{\index{E\+Physics Camera@{E\+Physics Camera}!ephysics\+\_\+camera\+\_\+tracked\+\_\+body\+\_\+get@{ephysics\+\_\+camera\+\_\+tracked\+\_\+body\+\_\+get}}
\index{ephysics\+\_\+camera\+\_\+tracked\+\_\+body\+\_\+get@{ephysics\+\_\+camera\+\_\+tracked\+\_\+body\+\_\+get}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{ephysics\+\_\+camera\+\_\+tracked\+\_\+body\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ephysics\+\_\+camera\+\_\+tracked\+\_\+body\+\_\+get (
\begin{DoxyParamCaption}
\item[{{\bf E\+Physics\+\_\+\+Camera} $\ast$}]{camera, }
\item[{{\bf E\+Physics\+\_\+\+Body} $\ast$$\ast$}]{body, }
\item[{{\bf Eina\+\_\+\+Bool} $\ast$}]{horizontal, }
\item[{{\bf Eina\+\_\+\+Bool} $\ast$}]{vertical}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Camera_ga3f8d5e51ae54ac3c2a5bdc0a6fb162c6}


Get body tracked by camera. 


\begin{DoxyParams}{Parameters}
{\em camera} & The world's camera. \\
\hline
{\em body} & The body tracked by the {\ttfamily camera}, or {\ttfamily N\+U\+L\+L} if camera isn't tracking any body. \\
\hline
{\em horizontal} & {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if {\ttfamily body} is tracked on x axis, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise; \\
\hline
{\em vertical} & {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if {\ttfamily body} is tracked on y axis, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise;\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__EPhysics__Camera_gabb7602830e3a9daa67d7bbe1a71a776e}{ephysics\+\_\+camera\+\_\+body\+\_\+track()} for more details. 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{test_camera_track_8c-example}{test\+\_\+camera\+\_\+track.\+c}.\end{Desc}
\hypertarget{group__EPhysics__Camera_gabe63cac3d18202ddb8596f50adbc3206}{\index{E\+Physics Camera@{E\+Physics Camera}!ephysics\+\_\+camera\+\_\+perspective\+\_\+set@{ephysics\+\_\+camera\+\_\+perspective\+\_\+set}}
\index{ephysics\+\_\+camera\+\_\+perspective\+\_\+set@{ephysics\+\_\+camera\+\_\+perspective\+\_\+set}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{ephysics\+\_\+camera\+\_\+perspective\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ephysics\+\_\+camera\+\_\+perspective\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf E\+Physics\+\_\+\+Camera} $\ast$}]{camera, }
\item[{{\bf Evas\+\_\+\+Coord}}]{px, }
\item[{{\bf Evas\+\_\+\+Coord}}]{py, }
\item[{{\bf Evas\+\_\+\+Coord}}]{z0, }
\item[{{\bf Evas\+\_\+\+Coord}}]{foc}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Camera_gabe63cac3d18202ddb8596f50adbc3206}


Set perspective to be applied on the scene. 

This applies a given perspective (3\+D) to the world rendering. It will be used when the scene is rendered, after each simulation step, by \hyperlink{group__EPhysics__Body_ga7209e650176e0612efb2a2cc2af0ec27}{ephysics\+\_\+body\+\_\+evas\+\_\+object\+\_\+update()}.

The {\ttfamily px} and {\ttfamily py} points specify the \char`\"{}infinite distance\char`\"{} point in the 3\+D conversion (where all lines converge to like when artists draw 3\+D by hand). The {\ttfamily z0} value specifies the z value at which there is a 1\+:1 mapping between spatial coordinates and screen coordinates. Any points on this z value will not have their X and Y values modified in the transform. Those further away (Z value higher) will shrink into the distance, and those less than this value will expand and become bigger. The foc value determines the \char`\"{}focal length\char`\"{} of the camera. This is in reality the distance between the camera lens plane itself (at or closer than this rendering results are undefined) and the {\ttfamily z0} z value. This allows for some \char`\"{}depth\char`\"{} control and {\ttfamily foc} must be greater than 0.

Considering the world geometry, by default, perspective is set to px = x + w / 2, py = y + h / 2, z0 = z + d / 2 and foc = 10 $\ast$ (z + d). This means the conversion point is centered on render area, and {\ttfamily z0} is on the center of render area z axis. It is set when \hyperlink{group__EPhysics__World_gaabf8abaf9c41b0c1e5daa4acf3df0356}{ephysics\+\_\+world\+\_\+render\+\_\+geometry\+\_\+set()} is called.

\begin{DoxyNote}{Note}
The unit used for all parameters is Evas coordinates.

To be used, perspective need to be enabled with \hyperlink{group__EPhysics__Camera_ga3dce6e71508cba24250679f67bbb8e11}{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set()}.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em camera} & The world's camera. \\
\hline
{\em px} & The perspective distance X coordinate \\
\hline
{\em py} & The perspective distance Y coordinate \\
\hline
{\em z0} & The \char`\"{}0\char`\"{} z plane value \\
\hline
{\em foc} & The focal distance\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__EPhysics__Camera_ga971b0520cc7ee43fdbd5b1b074c4025e}{ephysics\+\_\+camera\+\_\+perspective\+\_\+get()}. 

\hyperlink{group__EPhysics__Camera_ga3dce6e71508cba24250679f67bbb8e11}{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set()}. 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Camera_ga971b0520cc7ee43fdbd5b1b074c4025e}{\index{E\+Physics Camera@{E\+Physics Camera}!ephysics\+\_\+camera\+\_\+perspective\+\_\+get@{ephysics\+\_\+camera\+\_\+perspective\+\_\+get}}
\index{ephysics\+\_\+camera\+\_\+perspective\+\_\+get@{ephysics\+\_\+camera\+\_\+perspective\+\_\+get}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{ephysics\+\_\+camera\+\_\+perspective\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ephysics\+\_\+camera\+\_\+perspective\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf E\+Physics\+\_\+\+Camera} $\ast$}]{camera, }
\item[{{\bf Evas\+\_\+\+Coord} $\ast$}]{px, }
\item[{{\bf Evas\+\_\+\+Coord} $\ast$}]{py, }
\item[{{\bf Evas\+\_\+\+Coord} $\ast$}]{z0, }
\item[{{\bf Evas\+\_\+\+Coord} $\ast$}]{foc}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Camera_ga971b0520cc7ee43fdbd5b1b074c4025e}


Get perspective applied on the scene. 


\begin{DoxyParams}{Parameters}
{\em camera} & The world's camera. \\
\hline
{\em px} & The perspective distance X coordinate \\
\hline
{\em py} & The perspective distance Y coordinate \\
\hline
{\em z0} & The \char`\"{}0\char`\"{} z plane value \\
\hline
{\em foc} & The focal distance\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__EPhysics__Camera_gabe63cac3d18202ddb8596f50adbc3206}{ephysics\+\_\+camera\+\_\+perspective\+\_\+set()} for more details. 

\hyperlink{group__EPhysics__Camera_gabe75c8755354b2d4e20ff1bcdb66302b}{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get()}. 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Camera_ga3dce6e71508cba24250679f67bbb8e11}{\index{E\+Physics Camera@{E\+Physics Camera}!ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set@{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set}}
\index{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set@{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf E\+Physics\+\_\+\+Camera} $\ast$}]{camera, }
\item[{{\bf Eina\+\_\+\+Bool}}]{enabled}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Camera_ga3dce6e71508cba24250679f67bbb8e11}


Set if perspective should be applied. 

The applied perspective can be set with \hyperlink{group__EPhysics__Camera_gabe63cac3d18202ddb8596f50adbc3206}{ephysics\+\_\+camera\+\_\+perspective\+\_\+set()}.


\begin{DoxyParams}{Parameters}
{\em camera} & The world's camera. \\
\hline
{\em enabled} & {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if perspective should be used, or {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} if it shouldn't.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__EPhysics__Camera_gabe63cac3d18202ddb8596f50adbc3206}{ephysics\+\_\+camera\+\_\+perspective\+\_\+set()} for more details. 

\hyperlink{group__EPhysics__Camera_gabe75c8755354b2d4e20ff1bcdb66302b}{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get()}. 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Camera_gabe75c8755354b2d4e20ff1bcdb66302b}{\index{E\+Physics Camera@{E\+Physics Camera}!ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get@{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get}}
\index{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get@{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get}!E\+Physics Camera@{E\+Physics Camera}}
\subsubsection[{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf E\+Physics\+\_\+\+Camera} $\ast$}]{camera}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Camera_gabe75c8755354b2d4e20ff1bcdb66302b}


Return if perspective is enabled or not. 


\begin{DoxyParams}{Parameters}
{\em camera} & The world's camera. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if perspective is enabled, or {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} if it isn't, or on error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__EPhysics__Camera_gabe63cac3d18202ddb8596f50adbc3206}{ephysics\+\_\+camera\+\_\+perspective\+\_\+set()} for more details. 

\hyperlink{group__EPhysics__Camera_ga3dce6e71508cba24250679f67bbb8e11}{ephysics\+\_\+camera\+\_\+perspective\+\_\+enabled\+\_\+set()}. 
\end{DoxySeeAlso}
