|
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. | |
| 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 |
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.