\hypertarget{group__Evas__Canvas3D__Material}{}\section{Material Object}
\label{group__Evas__Canvas3D__Material}\index{Material Object@{Material Object}}


A material object represents properties of surfaces.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set} (Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} enable)
\begin{DoxyCompactList}\small\item\em Set the material attribute enable flag of the given material. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Evas__Canvas3D__Material_ga99510d89427b6c70b3c8db9b6f4accaa}{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+get} (Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib)
\begin{DoxyCompactList}\small\item\em Get the material attribute enable flag of the given material. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas3D__Material_ga25b6e671258eec890ac7c073ec3695b7}{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+set} (\hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} shininess)
\begin{DoxyCompactList}\small\item\em Set the shininess of the given material. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} \hyperlink{group__Evas__Canvas3D__Material_ga12dba4f08680230f2189198259b62512}{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the shininess of the given material. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas3D__Material_gac31113d8470e9793410b1d9c069e9b9a}{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+set} (Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib, Evas\+\_\+\+Canvas3\+D\+\_\+\+Texture $\ast$texture)
\begin{DoxyCompactList}\small\item\em Set the texture of the given material. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I Evas\+\_\+\+Canvas3\+D\+\_\+\+Texture $\ast$ \hyperlink{group__Evas__Canvas3D__Material_ga54533a930ed47d90f3c481101517f148}{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+get} (Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib)
\begin{DoxyCompactList}\small\item\em Get the texture of the given material. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas3D__Material_ga3275204e3932b15881703a9c60af76db}{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+set} (Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} r, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} g, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} b, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} a)
\begin{DoxyCompactList}\small\item\em Set the material attribute color of the given material. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas3D__Material_ga919f8925e12737f8c3334f1c8e9c4b83}{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+get} (Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} $\ast$r, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} $\ast$g, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} $\ast$b, \hyperlink{group__Evas_gafe9cc74872ef141d258c2162fa0ce5ca}{Evas\+\_\+\+Real} $\ast$a)
\begin{DoxyCompactList}\small\item\em Get the material attribute color of the given material. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A material object represents properties of surfaces. 

Evas 3\+D defines the properties with 5 material attributes, ambient, diffuse, specular emission and normal. Each attribute have its color value and texture map. Materials are used to determine the color of mesh surfaces. 

\subsection{Function Documentation}
\hypertarget{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}{}\index{Material Object@{Material Object}!evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set@{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set}}
\index{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set@{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set}!Material Object@{Material Object}}
\subsubsection[{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set(\+Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib, Eina\+\_\+\+Bool enable)}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib}]{attrib, }
\item[{{\bf Eina\+\_\+\+Bool}}]{enable}
\end{DoxyParamCaption}
)}\label{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}


Set the material attribute enable flag of the given material. 

You might want to disable some material reflection contribution. For example, Emission attribute is rarely used. Disabling unused attributes might help the shading less complex so that can get speed up.

By default, diffuse and specular is enabled.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em attrib} & Material attribute I\+D. \\
\hline
\mbox{\tt in}  & {\em enable} & Whether to enable the attribute or not. \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Material_ga99510d89427b6c70b3c8db9b6f4accaa}{}\index{Material Object@{Material Object}!evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+get@{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+get}}
\index{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+get@{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+get}!Material Object@{Material Object}}
\subsubsection[{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+get(\+Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib)}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Eina\+\_\+\+Bool} evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+get (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib}]{attrib}
\end{DoxyParamCaption}
)}\label{group__Evas__Canvas3D__Material_ga99510d89427b6c70b3c8db9b6f4accaa}


Get the material attribute enable flag of the given material. 

See also \hyperlink{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em attrib} & Material attribute I\+D.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Whether to enable the attribute or not. 
\end{DoxyReturn}
\hypertarget{group__Evas__Canvas3D__Material_ga25b6e671258eec890ac7c073ec3695b7}{}\index{Material Object@{Material Object}!evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+set@{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+set}}
\index{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+set@{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+set}!Material Object@{Material Object}}
\subsubsection[{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+set(\+Evas\+\_\+\+Real shininess)}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf Evas\+\_\+\+Real}}]{shininess}
\end{DoxyParamCaption}
)}\label{group__Evas__Canvas3D__Material_ga25b6e671258eec890ac7c073ec3695b7}


Set the shininess of the given material. 

Shininess is only used when specular attribute is enabled. Higher shininess value will make the object more shiny.

Default shininess value is 150.\+0.

See also \hyperlink{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em shininess} & Shininess value. \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Material_ga12dba4f08680230f2189198259b62512}{}\index{Material Object@{Material Object}!evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+get@{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+get}}
\index{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+get@{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+get}!Material Object@{Material Object}}
\subsubsection[{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+get(void)}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Evas\+\_\+\+Real} evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__Evas__Canvas3D__Material_ga12dba4f08680230f2189198259b62512}


Get the shininess of the given material. 

See also \hyperlink{group__Evas__Canvas3D__Material_ga25b6e671258eec890ac7c073ec3695b7}{evas\+\_\+canvas3d\+\_\+material\+\_\+shininess\+\_\+set}.

\begin{DoxyReturn}{Returns}
Shininess value. 
\end{DoxyReturn}
\hypertarget{group__Evas__Canvas3D__Material_gac31113d8470e9793410b1d9c069e9b9a}{}\index{Material Object@{Material Object}!evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+set@{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+set}}
\index{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+set@{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+set}!Material Object@{Material Object}}
\subsubsection[{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+set(\+Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib, Evas\+\_\+\+Canvas3\+D\+\_\+\+Texture $\ast$texture)}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+set (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib}]{attrib, }
\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Texture $\ast$}]{texture}
\end{DoxyParamCaption}
)}\label{group__Evas__Canvas3D__Material_gac31113d8470e9793410b1d9c069e9b9a}


Set the texture of the given material. 

You have to enable the desired attribute first.

See also \hyperlink{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}{evas\+\_\+canvas3d\+\_\+material\+\_\+enable\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em attrib} & Material attribute I\+D. \\
\hline
\mbox{\tt in}  & {\em texture} & The texture set to the attribute. \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Material_ga54533a930ed47d90f3c481101517f148}{}\index{Material Object@{Material Object}!evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+get@{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+get}}
\index{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+get@{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+get}!Material Object@{Material Object}}
\subsubsection[{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+get(\+Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib)}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I Evas\+\_\+\+Canvas3\+D\+\_\+\+Texture$\ast$ evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+get (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib}]{attrib}
\end{DoxyParamCaption}
)}\label{group__Evas__Canvas3D__Material_ga54533a930ed47d90f3c481101517f148}


Get the texture of the given material. 

See also \hyperlink{group__Evas__Canvas3D__Material_gac31113d8470e9793410b1d9c069e9b9a}{evas\+\_\+canvas3d\+\_\+material\+\_\+texture\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em attrib} & Material attribute I\+D.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The texture set to the attribute. 
\end{DoxyReturn}
\hypertarget{group__Evas__Canvas3D__Material_ga3275204e3932b15881703a9c60af76db}{}\index{Material Object@{Material Object}!evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+set@{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+set}}
\index{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+set@{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+set}!Material Object@{Material Object}}
\subsubsection[{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+set(\+Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib, Evas\+\_\+\+Real r, Evas\+\_\+\+Real g, Evas\+\_\+\+Real b, Evas\+\_\+\+Real a)}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+set (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib}]{attrib, }
\item[{{\bf Evas\+\_\+\+Real}}]{r, }
\item[{{\bf Evas\+\_\+\+Real}}]{g, }
\item[{{\bf Evas\+\_\+\+Real}}]{b, }
\item[{{\bf Evas\+\_\+\+Real}}]{a}
\end{DoxyParamCaption}
)}\label{group__Evas__Canvas3D__Material_ga3275204e3932b15881703a9c60af76db}


Set the material attribute color of the given material. 

Material color is used also when texture map is enabled. The colors will be modulated (multiplied). To control the color contribution of a material attribute, use gray color. Setting color value for normal attribute has no effect.

Default color is as follows.

Ambient \+: (0.\+2, 0.\+2, 0.\+2, 1.\+0) Diffuse \+: (0.\+8, 0.\+8, 0.\+8, 1.\+0) Specular \+: (1.\+0, 1.\+0, 1.\+0, 1.\+0) Emission \+: (0.\+0, 0.\+0, 0.\+0, 1.\+0) Normal \+: Not used


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em r} & Red component of the color. \\
\hline
\mbox{\tt in}  & {\em g} & Green component of the color. \\
\hline
\mbox{\tt in}  & {\em b} & Blue component of the color. \\
\hline
\mbox{\tt in}  & {\em a} & Alpha component of the color. \\
\hline
\end{DoxyParams}
\hypertarget{group__Evas__Canvas3D__Material_ga919f8925e12737f8c3334f1c8e9c4b83}{}\index{Material Object@{Material Object}!evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+get@{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+get}}
\index{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+get@{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+get}!Material Object@{Material Object}}
\subsubsection[{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+get(\+Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib attrib, Evas\+\_\+\+Real $\ast$r, Evas\+\_\+\+Real $\ast$g, Evas\+\_\+\+Real $\ast$b, Evas\+\_\+\+Real $\ast$a)}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+get (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas3\+D\+\_\+\+Material\+\_\+\+Attrib}]{attrib, }
\item[{{\bf Evas\+\_\+\+Real} $\ast$}]{r, }
\item[{{\bf Evas\+\_\+\+Real} $\ast$}]{g, }
\item[{{\bf Evas\+\_\+\+Real} $\ast$}]{b, }
\item[{{\bf Evas\+\_\+\+Real} $\ast$}]{a}
\end{DoxyParamCaption}
)}\label{group__Evas__Canvas3D__Material_ga919f8925e12737f8c3334f1c8e9c4b83}


Get the material attribute color of the given material. 

See also \hyperlink{group__Evas__Canvas3D__Material_ga3275204e3932b15881703a9c60af76db}{evas\+\_\+canvas3d\+\_\+material\+\_\+color\+\_\+set}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em r} & Pointer to receive red component of the color. \\
\hline
\mbox{\tt out}  & {\em g} & Pointer to receive green component of the color. \\
\hline
\mbox{\tt out}  & {\em b} & Pointer to receive blue component of the color. \\
\hline
\mbox{\tt out}  & {\em a} & Pointer to receive alpha component of the color. \\
\hline
\end{DoxyParams}
