|
| Material () |
|
virtual | ~Material () |
|
virtual Material * | clone (const char *name) const |
| Make a copy of this material with the given name. More...
|
|
virtual void | copyTo (Material *mat, bool copyTex=false, bool copySpec=false, bool copyProgs=false) const |
| Copy this material's settings to `mat'. More...
|
|
virtual real | getAlpha () const |
| Get the alpha (transparency) value, 1.0 is opaque and 0.0 is invisible, -1.0 if alpha shouldn't be used. More...
|
|
virtual color | getDefaultColor () const |
|
virtual void | setAlpha (real alpha) |
| Set the internal alpha value, resetting the diffuse and specular values expected a subtype to set the alpha components for these. More...
|
|
virtual bool | usesInternalAlpha () const |
| Returns true if the internal alpha value is to be applied to colors, otherwise the alpha components of colors are used as inputed. More...
|
|
virtual void | useInternalAlpha (bool val) |
| Set whether to use the internal alpha value or use those specified in the diffuse and specular color values. More...
|
|
virtual color | getAmbient () const |
|
virtual color | getDiffuse () const |
|
virtual color | getSpecular () const |
|
virtual color | getEmissive () const |
|
virtual real | getShininess () const |
|
virtual real | getPointSizeMin () const |
|
virtual real | getPointSizeMax () const |
|
virtual real | getPointSizeAbs () const |
|
virtual bool | usesPointAttenuation () const |
|
virtual BlendMode | getBlendMode () const |
|
virtual bool | usesVertexColor () const |
|
virtual bool | usesLighting () const |
|
virtual bool | usesFlatShading () const |
|
virtual bool | usesDepthCheck () const |
|
virtual bool | usesDepthWrite () const |
|
virtual bool | usesTexFiltering () const |
|
virtual bool | isClampTexAddress () const |
|
virtual bool | isCullBackfaces () const |
|
virtual bool | usesPointSprites () const |
|
virtual const char * | getTexture () const |
|
virtual const char * | getGPUProgram (ProgramType pt) const |
|
virtual int | getGPUParamInt (ProgramType pt, const std::string &name) |
|
virtual real | getGPUParamReal (ProgramType pt, const std::string &name) |
|
virtual vec3 | getGPUParamVec3 (ProgramType pt, const std::string &name) |
|
virtual color | getGPUParamColor (ProgramType pt, const std::string &name) |
|
virtual bool | isTransparentColor () const |
| Returns true if the intenal alpha value is used, if it's <1.0, if vertex colors are not used, and if no textur is assigned. More...
|
|
virtual void | setAmbient (const color &c) |
|
virtual void | setDiffuse (const color &c) |
| Sets the diffuse color, if usesInternalAlpha() returns true the alpha value will be set the internal value. More...
|
|
virtual void | setSpecular (const color &c) |
| Sets the specular color, if usesInternalAlpha() returns true the alpha value will be set the internal value. More...
|
|
virtual void | setEmissive (const color &c) |
|
virtual void | setShininess (real c) |
| Set the amount of specular hightlighting to apply. More...
|
|
virtual void | setPointSize (real min, real max) |
| Set the minimum and maximum point size for attenuated points. More...
|
|
virtual void | setPointSizeAbs (real size) |
| Set the absolute point size. More...
|
|
virtual void | setPointAttenuation (bool enabled, real constant=0.0f, real linear=1.0f, real quad=0.0f) |
| Sets point attenuation, the given real values are constants the attenuation equation. More...
|
|
virtual void | setBlendMode (BlendMode bm) |
|
virtual void | useVertexColor (bool use) |
|
virtual void | useLighting (bool use) |
|
virtual void | useFlatShading (bool use) |
|
virtual void | useDepthCheck (bool use) |
|
virtual void | useDepthWrite (bool use) |
|
virtual void | useTexFiltering (bool use) |
|
virtual void | clampTexAddress (bool use) |
|
virtual void | cullBackfaces (bool cull) |
|
virtual void | usePointSprites (bool useSprites) |
|
virtual void | setTexture (const char *name) |
|
virtual void | setTexture (const Texture *tex) |
|
virtual void | useSpectrumTexture (bool use) |
|
virtual void | setGPUProgram (const std::string &name, ProgramType pt) |
|
virtual void | setGPUProgram (const GPUProgram *prog) |
|
virtual bool | setGPUParamInt (ProgramType pt, const std::string &name, int val) |
|
virtual bool | setGPUParamReal (ProgramType pt, const std::string &name, real val) |
|
virtual bool | setGPUParamVec3 (ProgramType pt, const std::string &name, vec3 val) |
|
virtual bool | setGPUParamColor (ProgramType pt, const std::string &name, color val) |
|
virtual void | updateSpectrum () |
|
| Spectrum (const std::string &name="") |
|
virtual const char * | getName () const |
|
virtual void | clearSpectrum () |
|
virtual void | copySpectrumFrom (const Spectrum *s) |
|
virtual void | addSpectrumValue (real pos, color value) |
| Add a color value to the spectrum at the given position then resort the spectrum. More...
|
|
virtual real | getSpectrumPos (indexval index) const throw (IndexException) |
| Get the position of the spectrum value at the given index in the list. More...
|
|
virtual color | getSpectrumValue (indexval index) const throw (IndexException) |
| Get the color of the spectrum value at the given index in the list. More...
|
|
virtual indexval | getSpectrumIndex (real pos, color value) const |
| Get the index of the spectrum value with the given position and color, returns numSpectrumValues() if not found. More...
|
|
virtual void | setSpectrumValue (sval index, real pos, color value) throw (IndexException) |
| Set the spectrum value at the given list index. More...
|
|
virtual sval | numSpectrumValues () const |
| Get the number of spectrum values. More...
|
|
virtual void | removeSpectrumValue (indexval index) throw (IndexException) |
| Remove the spectrum value at the given index. More...
|
|
virtual sval | numAlphaCtrls () const |
|
virtual vec3 | getAlphaCtrl (indexval index) const throw (IndexException) |
|
virtual void | addAlphaCtrl (vec3 v) |
|
virtual void | removeAlphaCtrl (indexval index) throw (IndexException) |
|
virtual void | setAlphaCtrl (vec3 v, indexval index) throw (IndexException) |
|
virtual void | setAlphaCurve (const Vec3Matrix *pts) |
|
virtual void | setLinearAlpha (bool b) |
|
virtual bool | isLinearAlpha () const |
|
virtual color | interpolateColor (real pos) const |
|
virtual void | fillColorMatrix (ColorMatrix *col, const RealMatrix *mat, bool useValAsAlpha=false) throw (IndexException) |
|
Materials encapsulate the lighting and color properties applied to renderable objects. This covers diffuse, specular, ambient, and emissive light, point size for point objects, blending mode, and options on using vertex color, scene lighting, alpha blending, and others. It also stores a spectrum of colors defined as color values positioned along the unit interval. Spectrums are used to interpolate a color form a given unit value, this used for data coloration where field values are converted into these unit values.