Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ACG::SceneGraph::ACG::SceneGraph::Material Class Reference

Public Member Functions

 Material ()
 Default constructor.
 
virtual ~Material ()
 Deconstructor.
 
 Material (const Material &_m)
 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
 
const Vec4fbaseColor () const
 get the base color
 
void ambientColor (const Vec4f &_a)
 set the ambient color.
 
const Vec4fambientColor () const
 get the ambient color.
 
void diffuseColor (const Vec4f &_d)
 set the diffuse color.
 
const Vec4fdiffuseColor () const
 get the diffuse color.
 
void specularColor (const Vec4f &_s)
 set the specular color
 
const Vec4fspecularColor () 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 Vec4foverlayColor () 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 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)
 

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

Detailed Description

Class to store the properties of a material.

Definition at line 85 of file MeshNode2T.cc.

Member Function Documentation

void ACG::SceneGraph::ACG::SceneGraph::Material::color ( const Vec4f _c)
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

Parameters
_cSample color used to compute the other color components (ambient, diffuse, specular)

Definition at line 149 of file MeshNode2T.cc.


The documentation for this class was generated from the following files: