Developer Documentation
|
#include <OpenFlipper/libs_required/ACG/Scenegraph/MaterialNode.hh>
Public Member Functions | |
Material () | |
Default constructor. More... | |
virtual | ~Material () |
Deconstructor. More... | |
Material (const Material &)=default | |
Copy constructor. | |
QString | serializeToJson () const |
void | deserializeFromJson (const QString &json) |
void | deserializeFromVariantMap (const QVariantMap &matMap) |
void | color (const Vec4f &_c) |
Set color based on _c. More... | |
void | generateRandomColor () |
Creates a randomized color and sets it. More... | |
void | baseColor (const Vec4f &_c) |
set the base color (Sets the baseColor which is the same as the emission(const Vec4f& _c) ) More... | |
const Vec4f & | baseColor () const |
get the base color ( Same as emission() ) More... | |
void | emissionColor (const Vec4f &_c) |
set emission ( Same as baseColor( const Vec4f& _c )) ) More... | |
const Vec4f & | emissionColor () const |
get emission ( Same as baseColor() ) More... | |
void | ambientColor (const Vec4f &_a) |
set the ambient color. More... | |
const Vec4f & | ambientColor () const |
get the ambient color. More... | |
void | diffuseColor (const Vec4f &_d) |
set the diffuse color. More... | |
const Vec4f & | diffuseColor () const |
get the diffuse color. More... | |
void | specularColor (const Vec4f &_s) |
set the specular color More... | |
const Vec4f & | specularColor () const |
get the specular color More... | |
void | overlayColor (const Vec4f &_s) |
set the overlay color (This can be used to render overlays e.g. additional wireframes in a different color) More... | |
const Vec4f & | overlayColor () const |
get the overlay color (This can be used to render overlays e.g. additional wireframes in a different color) More... | |
void | colorMaterial (const bool _cm) |
Set colorMaterial. More... | |
void | enableColorMaterial () |
Enable Color Material. More... | |
void | disableColorMaterial () |
Disable Color Material. More... | |
bool | colorMaterial () |
get colorMaterial state More... | |
void | shininess (float _s) |
set shininess More... | |
float | shininess () const |
get shininess More... | |
void | reflectance (double _m) |
set reflectance ( not used in OpenGL Rendering) More... | |
double | reflectance () const |
get reflectance ( not used in OpenGL Rendering) More... | |
void | indexOfRefraction (double _m) |
set index of refraction More... | |
double | indexOfRefraction () const |
get index of refraction ( not used in OpenGL Rendering) More... | |
void | setRefractive (bool _r) |
set refractive flag More... | |
bool | isRefractive () const |
get refractive flag More... | |
void | pointSize (float _sz) |
set point size (default: 1.0) More... | |
float | pointSize () const |
get point size More... | |
void | lineWidth (float _sz) |
set line width (default: 1.0) More... | |
float | lineWidth () const |
get line width More... | |
void | roundPoints (bool _b) |
set: round points enabled More... | |
bool | roundPoints () const |
get: round points enabled More... | |
void | lineSmooth (bool _b) |
set: smooth lines enabled More... | |
bool | lineSmooth () const |
get: rsmooth lines enabled More... | |
void | enableAlphaTest (float _clip) |
enable alpha test (draw pixels if alpha >= _clip) More... | |
void | disableAlphaTest () |
disable alpha test More... | |
bool | alphaTest () const |
Return state of Alpha test. More... | |
void | enableMultisampling () |
Enable Multisampling. More... | |
void | disableMultisampling () |
enable alpha test (draw pixels if alpha >= _clip) More... | |
bool | multiSampling () const |
Get state of multisampling. More... | |
void | multisampling (bool _state) |
Set state of multisampling. More... | |
float | alphaValue () const |
get current alpha value for alpha_test More... | |
bool | blending () const |
GLenum | blendingParam1 () const |
GLenum | blendingParam2 () const |
void | enableBlending (GLenum _p1=GL_SRC_ALPHA, GLenum _p2=GL_ONE_MINUS_SRC_ALPHA) |
enable blending with Parameters (_p1, _p2) More... | |
void | disableBlending () |
disable blending More... | |
bool | backfaceCulling () const |
void | enableBackfaceCulling () |
enable backface culling (not active by default, see applyProperties) More... | |
void | disableBackfaceCulling () |
disable backface culling (not active by default, see applyProperties) More... | |
bool | isEmissive () const |
Static Public Member Functions | |
static bool | support_json_serialization () |
Protected Attributes | |
Vec4f | baseColor_ |
Vec4f | ambientColor_ |
Vec4f | diffuseColor_ |
Vec4f | specularColor_ |
Vec4f | overlayColor_ |
float | shininess_ |
double | reflectance_ |
double | indexOfRefraction_ |
bool | isRefractive_ |
float | pointSize_ |
float | lineWidth_ |
bool | roundPoints_ |
bool | linesSmooth_ |
bool | alphaTest_ |
float | alphaClip_ |
bool | blending_ |
GLenum | blendParam1_ |
GLenum | blendParam2_ |
bool | colorMaterial_ |
bool | backfaceCulling_ |
bool | multiSampling_ |
Friends | |
class | MaterialNode |
Materialnode. More... | |
Class to store the properties of a material.
Definition at line 79 of file MaterialNode.hh.
|
inline |
Default constructor.
Definition at line 85 of file MaterialNode.hh.
|
inlinevirtual |
Deconstructor.
Definition at line 109 of file MaterialNode.hh.
|
inline |
Return state of Alpha test.
Definition at line 231 of file MaterialNode.hh.
|
inline |
get current alpha value for alpha_test
Definition at line 254 of file MaterialNode.hh.
|
inline |
get the ambient color.
Definition at line 156 of file MaterialNode.hh.
|
inline |
set the ambient color.
Definition at line 154 of file MaterialNode.hh.
|
inline |
Definition at line 268 of file MaterialNode.hh.
|
inline |
get the base color ( Same as emission() )
Definition at line 146 of file MaterialNode.hh.
|
inline |
set the base color (Sets the baseColor which is the same as the emission(const Vec4f& _c) )
Definition at line 144 of file MaterialNode.hh.
|
inline |
Definition at line 256 of file MaterialNode.hh.
|
inline |
Definition at line 258 of file MaterialNode.hh.
|
inline |
Definition at line 259 of file MaterialNode.hh.
|
inline |
Set color based on _c.
Basecolor (which is the emitted color is set to zero) The other colors are based on the given color _c
_c | Sample color used to compute the other color components (ambient, diffuse, specular) |
Definition at line 126 of file MaterialNode.hh.
|
inline |
get colorMaterial state
Definition at line 180 of file MaterialNode.hh.
|
inline |
Set colorMaterial.
Definition at line 174 of file MaterialNode.hh.
void ACG::SceneGraph::Material::deserializeFromJson | ( | const QString & | json | ) |
Definition at line 158 of file MaterialNode.cc.
void ACG::SceneGraph::Material::deserializeFromVariantMap | ( | const QVariantMap & | matMap | ) |
Definition at line 134 of file MaterialNode.cc.
|
inline |
get the diffuse color.
Definition at line 161 of file MaterialNode.hh.
|
inline |
set the diffuse color.
Definition at line 159 of file MaterialNode.hh.
|
inline |
disable alpha test
Definition at line 228 of file MaterialNode.hh.
|
inline |
disable backface culling (not active by default, see applyProperties)
Definition at line 273 of file MaterialNode.hh.
|
inline |
disable blending
Definition at line 266 of file MaterialNode.hh.
|
inline |
Disable Color Material.
Definition at line 178 of file MaterialNode.hh.
|
inline |
enable alpha test (draw pixels if alpha >= _clip)
Definition at line 239 of file MaterialNode.hh.
|
inline |
get emission ( Same as baseColor() )
Definition at line 151 of file MaterialNode.hh.
|
inline |
set emission ( Same as baseColor( const Vec4f& _c )) )
Definition at line 149 of file MaterialNode.hh.
|
inline |
enable alpha test (draw pixels if alpha >= _clip)
Definition at line 223 of file MaterialNode.hh.
|
inline |
enable backface culling (not active by default, see applyProperties)
Definition at line 271 of file MaterialNode.hh.
|
inline |
enable blending with Parameters (_p1, _p2)
Definition at line 262 of file MaterialNode.hh.
|
inline |
Enable Color Material.
Definition at line 176 of file MaterialNode.hh.
|
inline |
Enable Multisampling.
Definition at line 234 of file MaterialNode.hh.
|
inline |
Creates a randomized color and sets it.
Definition at line 136 of file MaterialNode.hh.
|
inline |
get index of refraction ( not used in OpenGL Rendering)
Definition at line 195 of file MaterialNode.hh.
|
inline |
set index of refraction
Definition at line 193 of file MaterialNode.hh.
|
inline |
Definition at line 275 of file MaterialNode.hh.
|
inline |
get refractive flag
Definition at line 200 of file MaterialNode.hh.
|
inline |
get: rsmooth lines enabled
Definition at line 220 of file MaterialNode.hh.
|
inline |
set: smooth lines enabled
Definition at line 218 of file MaterialNode.hh.
|
inline |
get line width
Definition at line 210 of file MaterialNode.hh.
|
inline |
set line width (default: 1.0)
Definition at line 208 of file MaterialNode.hh.
|
inline |
Get state of multisampling.
Definition at line 244 of file MaterialNode.hh.
|
inline |
Set state of multisampling.
Definition at line 249 of file MaterialNode.hh.
|
inline |
get the overlay color (This can be used to render overlays e.g. additional wireframes in a different color)
Definition at line 171 of file MaterialNode.hh.
|
inline |
set the overlay color (This can be used to render overlays e.g. additional wireframes in a different color)
Definition at line 169 of file MaterialNode.hh.
|
inline |
get point size
Definition at line 205 of file MaterialNode.hh.
|
inline |
set point size (default: 1.0)
Definition at line 203 of file MaterialNode.hh.
|
inline |
get reflectance ( not used in OpenGL Rendering)
Definition at line 190 of file MaterialNode.hh.
|
inline |
set reflectance ( not used in OpenGL Rendering)
Definition at line 188 of file MaterialNode.hh.
|
inline |
get: round points enabled
Definition at line 215 of file MaterialNode.hh.
|
inline |
set: round points enabled
Definition at line 213 of file MaterialNode.hh.
QString ACG::SceneGraph::Material::serializeToJson | ( | ) | const |
Definition at line 104 of file MaterialNode.cc.
|
inline |
set refractive flag
Definition at line 198 of file MaterialNode.hh.
|
inline |
get shininess
Definition at line 185 of file MaterialNode.hh.
|
inline |
set shininess
Definition at line 183 of file MaterialNode.hh.
|
inline |
get the specular color
Definition at line 166 of file MaterialNode.hh.
|
inline |
set the specular color
Definition at line 164 of file MaterialNode.hh.
|
static |
Definition at line 100 of file MaterialNode.cc.
|
friend |
Materialnode.
Definition at line 81 of file MaterialNode.hh.
|
protected |
Definition at line 296 of file MaterialNode.hh.
|
protected |
Definition at line 295 of file MaterialNode.hh.
|
protected |
Definition at line 280 of file MaterialNode.hh.
|
protected |
Definition at line 303 of file MaterialNode.hh.
|
protected |
Definition at line 279 of file MaterialNode.hh.
|
protected |
Definition at line 298 of file MaterialNode.hh.
|
protected |
Definition at line 299 of file MaterialNode.hh.
|
protected |
Definition at line 300 of file MaterialNode.hh.
|
protected |
Definition at line 302 of file MaterialNode.hh.
|
protected |
Definition at line 281 of file MaterialNode.hh.
|
protected |
Definition at line 287 of file MaterialNode.hh.
|
protected |
Definition at line 288 of file MaterialNode.hh.
|
protected |
Definition at line 293 of file MaterialNode.hh.
|
protected |
Definition at line 290 of file MaterialNode.hh.
|
protected |
Definition at line 305 of file MaterialNode.hh.
|
protected |
Definition at line 283 of file MaterialNode.hh.
|
protected |
Definition at line 289 of file MaterialNode.hh.
|
protected |
Definition at line 286 of file MaterialNode.hh.
|
protected |
Definition at line 292 of file MaterialNode.hh.
|
protected |
Definition at line 285 of file MaterialNode.hh.
|
protected |
Definition at line 282 of file MaterialNode.hh.