![]() |
anatomist
4.7.0
3D neuroimaging data viewer
|
This class has to be rewritten, it's really really a shame....... More...
#include <anatomist/color/Material.h>
Public Types | |
enum | RenderProperty { RenderLighting, RenderSmoothShading, RenderFiltering, RenderZBuffer, RenderFaceCulling, FrontFace, RenderMode, Ghost, SelectableMode = Ghost, UseShader, ShaderColorNormals, NormalIsDirection } |
Rendering properties flags. More... | |
enum | RenderingMode { Normal, Wireframe, Outlined, HiddenWireframe, Fast, ExtOutlined } |
enum | SelectableMode { AlwaysSelectable, GhostSelection, SelectableWhenOpaque, SelectableWhenNotTotallyTransparent } |
enum | LightingModel { NoLighting, PhongLighting, BlinnPhongLighting } |
enum | ShadingModel { FlatShading, GouraudShading, PhongShading } |
Public Member Functions | |
Material () | |
Material (const Material &) | |
virtual | ~Material () |
GLfloat * | Ambient () |
GLfloat * | Diffuse () |
GLfloat * | Specular () |
GLfloat | Shininess () const |
GLfloat * | Emission () |
GLfloat | Ambient (int i) const |
GLfloat | Diffuse (int i) const |
GLfloat | Specular (int i) const |
GLfloat | Emission (int i) const |
void | SetAmbient (float, float, float, float) |
void | SetDiffuse (float, float, float, float) |
void | SetSpecular (float, float, float, float) |
void | SetShininess (float val) |
void | SetEmission (float, float, float, float) |
void | SetAmbientR (float val) |
void | SetAmbientG (float val) |
void | SetAmbientB (float val) |
void | SetAmbientA (float val) |
void | SetDiffuseR (float val) |
void | SetDiffuseG (float val) |
void | SetDiffuseB (float val) |
void | SetDiffuseA (float val) |
void | SetSpecularR (float val) |
void | SetSpecularG (float val) |
void | SetSpecularB (float val) |
void | SetSpecularA (float val) |
void | SetEmissionR (float val) |
void | SetEmissionG (float val) |
void | SetEmissionB (float val) |
void | SetEmissionA (float val) |
GLfloat * | unlitColor () const |
color used without lighting (filar meshes, wireframe) More... | |
GLfloat | unlitColor (int i) const |
void | setUnlitColor (float, float, float, float) |
float | lineWidth () const |
void | setLineWidth (float w) |
void | setGLMaterial () const |
setup OpenGL properties. More... | |
void | popGLState () const |
Pops previous OpenGL state. More... | |
bool | IsBlended () const |
int | renderProperty (RenderProperty) const |
a property set to -1 is neutral (use window or app default) More... | |
void | setRenderProperty (RenderProperty, int) |
Material & | operator= (const Material &) |
bool | operator!= (const Material &) const |
bool | operator== (const Material &mat) const |
void | set (const carto::GenericObject &) |
carto::Object | genericDescription () const |
Protected Attributes | |
GLfloat | _ambient [4] |
GLfloat | _diffuse [4] |
GLfloat | _specular [4] |
GLfloat | _shininess |
GLfloat | _emission [4] |
Friends | |
std::istream & | operator>> (std::istream &, anatomist::Material &) |
std::ostream & | operator<< (std::ostream &, const anatomist::Material &) |
This class has to be rewritten, it's really really a shame.......
Definition at line 47 of file Material.h.
Enumerator | |
---|---|
NoLighting | |
PhongLighting | |
BlinnPhongLighting |
Definition at line 98 of file Material.h.
Enumerator | |
---|---|
Normal | |
Wireframe | |
Outlined | |
HiddenWireframe | |
Fast | |
ExtOutlined |
Definition at line 80 of file Material.h.
Rendering properties flags.
Definition at line 51 of file Material.h.
Enumerator | |
---|---|
AlwaysSelectable | |
GhostSelection | |
SelectableWhenOpaque | |
SelectableWhenNotTotallyTransparent |
Definition at line 90 of file Material.h.
Enumerator | |
---|---|
FlatShading | |
GouraudShading | |
PhongShading |
Definition at line 105 of file Material.h.
anatomist::Material::Material | ( | ) |
anatomist::Material::Material | ( | const Material & | ) |
|
virtual |
|
inline |
Definition at line 117 of file Material.h.
References _ambient.
|
inline |
Definition at line 123 of file Material.h.
References _ambient.
|
inline |
Definition at line 118 of file Material.h.
References _diffuse.
|
inline |
Definition at line 124 of file Material.h.
References _diffuse.
|
inline |
Definition at line 121 of file Material.h.
References _emission.
|
inline |
Definition at line 126 of file Material.h.
References _emission, IsBlended(), lineWidth(), operator!=(), operator<<, operator=(), operator>>, popGLState(), renderProperty(), SetAmbient(), SetAmbientA(), SetAmbientB(), SetAmbientG(), SetAmbientR(), SetDiffuse(), SetDiffuseA(), SetDiffuseB(), SetDiffuseG(), SetDiffuseR(), SetEmission(), SetEmissionA(), SetEmissionB(), SetEmissionG(), SetEmissionR(), setGLMaterial(), setLineWidth(), setRenderProperty(), SetShininess(), SetSpecular(), SetSpecularA(), SetSpecularB(), SetSpecularG(), SetSpecularR(), setUnlitColor(), and unlitColor().
carto::Object anatomist::Material::genericDescription | ( | ) | const |
Referenced by operator==().
bool anatomist::Material::IsBlended | ( | ) | const |
Referenced by Emission().
float anatomist::Material::lineWidth | ( | ) | const |
Referenced by Emission().
bool anatomist::Material::operator!= | ( | const Material & | ) | const |
Referenced by Emission().
Referenced by Emission().
|
inline |
Definition at line 178 of file Material.h.
References genericDescription().
void anatomist::Material::popGLState | ( | ) | const |
Pops previous OpenGL state.
This is an almost private function that should only be called by GLComponent internals
Referenced by Emission().
int anatomist::Material::renderProperty | ( | RenderProperty | ) | const |
a property set to -1 is neutral (use window or app default)
Referenced by Emission().
void anatomist::Material::set | ( | const carto::GenericObject & | ) |
Referenced by anatomist::ASurface< 3 >::setSurface().
void anatomist::Material::SetAmbient | ( | float | , |
float | , | ||
float | , | ||
float | |||
) |
Referenced by Emission().
void anatomist::Material::SetAmbientA | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetAmbientB | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetAmbientG | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetAmbientR | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetDiffuse | ( | float | , |
float | , | ||
float | , | ||
float | |||
) |
Referenced by Emission().
void anatomist::Material::SetDiffuseA | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetDiffuseB | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetDiffuseG | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetDiffuseR | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetEmission | ( | float | , |
float | , | ||
float | , | ||
float | |||
) |
Referenced by Emission().
void anatomist::Material::SetEmissionA | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetEmissionB | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetEmissionG | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetEmissionR | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::setGLMaterial | ( | ) | const |
setup OpenGL properties.
This is an almost private function that should only be called by GLComponent internals. It implies a glPushAttrib() so popGLState() should be called after the object rendering
Referenced by Emission().
void anatomist::Material::setLineWidth | ( | float | w | ) |
Referenced by Emission().
void anatomist::Material::setRenderProperty | ( | RenderProperty | , |
int | |||
) |
Referenced by Emission().
void anatomist::Material::SetShininess | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetSpecular | ( | float | , |
float | , | ||
float | , | ||
float | |||
) |
Referenced by Emission().
void anatomist::Material::SetSpecularA | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetSpecularB | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetSpecularG | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::SetSpecularR | ( | float | val | ) |
Referenced by Emission().
void anatomist::Material::setUnlitColor | ( | float | , |
float | , | ||
float | , | ||
float | |||
) |
Referenced by Emission().
|
inline |
Definition at line 120 of file Material.h.
References _shininess.
|
inline |
Definition at line 119 of file Material.h.
References _specular.
|
inline |
Definition at line 125 of file Material.h.
References _specular.
GLfloat* anatomist::Material::unlitColor | ( | ) | const |
color used without lighting (filar meshes, wireframe)
Referenced by Emission().
GLfloat anatomist::Material::unlitColor | ( | int | i | ) | const |
|
friend |
Referenced by Emission().
|
friend |
Referenced by Emission().
|
protected |
Definition at line 185 of file Material.h.
Referenced by Ambient().
|
protected |
Definition at line 186 of file Material.h.
Referenced by Diffuse().
|
protected |
Definition at line 189 of file Material.h.
Referenced by Emission().
|
protected |
Definition at line 188 of file Material.h.
Referenced by Shininess().
|
protected |
Definition at line 187 of file Material.h.
Referenced by Specular().