Developer Documentation
|
#include <OpenFlipper/libs_required/ACG/Scenegraph/MaterialNode.hh>
Public Member Functions | |
Material () | |
Default constructor. | |
virtual | ~Material () |
Deconstructor. | |
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. | |
void | baseColor (const Vec4f &_c) |
set the base color (Sets the baseColor which is the same as the emission(const Vec4f& _c) ) | |
const Vec4f & | baseColor () const |
get the base color ( Same as emission() ) | |
void | emissionColor (const Vec4f &_c) |
set emission ( Same as baseColor( const Vec4f& _c )) ) | |
const Vec4f & | emissionColor () const |
get emission ( Same as baseColor() ) | |
void | ambientColor (const Vec4f &_a) |
set the ambient color. | |
const Vec4f & | ambientColor () const |
get the ambient color. | |
void | diffuseColor (const Vec4f &_d) |
set the diffuse color. | |
const Vec4f & | diffuseColor () const |
get the diffuse color. | |
void | specularColor (const Vec4f &_s) |
set the specular color | |
const Vec4f & | specularColor () const |
get the specular color | |
void | overlayColor (const Vec4f &_s) |
set the overlay color (This can be used to render overlays e.g. additional wireframes in a different color) | |
const Vec4f & | overlayColor () const |
get the overlay color (This can be used to render overlays e.g. additional wireframes in a different color) | |
void | colorMaterial (const bool _cm) |
Set colorMaterial. | |
void | enableColorMaterial () |
Enable Color Material. | |
void | disableColorMaterial () |
Disable Color Material. | |
bool | colorMaterial () |
get colorMaterial state | |
void | shininess (float _s) |
set shininess | |
float | shininess () const |
get shininess | |
void | reflectance (double _m) |
set reflectance ( not used in OpenGL Rendering) | |
double | reflectance () const |
get reflectance ( not used in OpenGL Rendering) | |
void | indexOfRefraction (double _m) |
set index of refraction | |
double | indexOfRefraction () const |
get index of refraction ( not used in OpenGL Rendering) | |
void | setRefractive (bool _r) |
set refractive flag | |
bool | isRefractive () const |
get refractive flag | |
void | pointSize (float _sz) |
set point size (default: 1.0) | |
float | pointSize () const |
get point size | |
void | lineWidth (float _sz) |
set line width (default: 1.0) | |
float | lineWidth () const |
get line width | |
void | roundPoints (bool _b) |
set: round points enabled | |
bool | roundPoints () const |
get: round points enabled | |
void | lineSmooth (bool _b) |
set: smooth lines enabled | |
bool | lineSmooth () const |
get: rsmooth lines enabled | |
void | enableAlphaTest (float _clip) |
enable alpha test (draw pixels if alpha >= _clip) | |
void | disableAlphaTest () |
disable alpha test | |
bool | alphaTest () const |
Return state of Alpha test. | |
void | enableMultisampling () |
Enable Multisampling. | |
void | disableMultisampling () |
enable alpha test (draw pixels if alpha >= _clip) | |
bool | multiSampling () const |
Get state of multisampling. | |
void | multisampling (bool _state) |
Set state of multisampling. | |
float | alphaValue () const |
get current alpha value for alpha_test | |
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) | |
void | disableBlending () |
disable blending | |
bool | backfaceCulling () const |
void | enableBackfaceCulling () |
enable backface culling (not active by default, see applyProperties) | |
void | disableBackfaceCulling () |
disable backface culling (not active by default, see applyProperties) | |
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. | |
Class to store the properties of a material.
Definition at line 79 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.