VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
VisimRenderGL.GLMaterialColored Class Reference
Inheritance diagram for VisimRenderGL.GLMaterialColored:

List of all members.

## Public Member Functions
| GLMaterialColored (string name, ref StandardColorValues values)
override IRenderMaterial | CreateCopy (string newname)
| Creates copy of self with new name.
override void | OnActivate (RendererEventArgs args)
| Activate material (called from Activate)
override bool | HasColorElement (MaterialElement element)
| Returns true if material contains specified color element.
override bool | HasTextureElement (MaterialElement element)
| Returns true if material contains specified texture element.
override ColorByte | GetColorElement (MaterialElement element)
| Returns value of specified color element (or white if it doesn't contain this)
override Texture | GetTextureElement (MaterialElement element)
| Returns texture on specified element (or null)
override void | SetColorElement (MaterialElement element, ColorByte color)
| Sets value of specified color element (if supported by material)
override void | SetTextureElement (MaterialElement element, Texture tex)
| Sets value of specified texture element (if supported by material)
override void | ReadXml (System.Xml.XmlReader reader)
| Deserializes object from XML.
override void | WriteXml (System.Xml.XmlWriter writer)
| Serializes object to XML.
## Protected Member Functions
void | CalcValues ()
ColorByte | ReadColor (System.Xml.XmlReader reader)
## Protected Attributes
StandardColorValues | ColorValues
float[] | ambient
float[] | diffuse
float[] | specular
float[] | emissive

## Constructor & Destructor Documentation

VisimRenderGL.GLMaterialColored.GLMaterialColored | ( | string | name,
|  | ref StandardColorValues | values
| ) |  |

## Member Function Documentation

void VisimRenderGL.GLMaterialColored.CalcValues | ( |  | ) | `[protected]`

override IRenderMaterial VisimRenderGL.GLMaterialColored.CreateCopy | ( | string | newname | ) | `[virtual]`

Creates copy of self with new name.

Parameters:

  newname | name for the copy

Returns:
  new material

Implements VisimBox.Renderer.RenderMaterial.

Reimplemented in VisimRenderGL.GLMaterialColoredTex.

override ColorByte VisimRenderGL.GLMaterialColored.GetColorElement | ( | MaterialElement | element | ) | `[virtual]`

Returns value of specified color element (or white if it doesn't contain this)

Parameters:

  element | Element type

Returns:
  Color value

Implements VisimBox.Renderer.RenderMaterial.

override Texture VisimRenderGL.GLMaterialColored.GetTextureElement | ( | MaterialElement | element | ) | `[virtual]`

Returns texture on specified element (or null)

Parameters:

  element | Element type

Returns:
  Texture object

Implements VisimBox.Renderer.RenderMaterial.

Reimplemented in VisimRenderGL.GLMaterialColoredTex.

override bool VisimRenderGL.GLMaterialColored.HasColorElement | ( | MaterialElement | element | ) | `[virtual]`

Returns true if material contains specified color element.

Parameters:

  element | element type

Returns:
  True if material has this type of element

Implements VisimBox.Renderer.RenderMaterial.

override bool VisimRenderGL.GLMaterialColored.HasTextureElement | ( | MaterialElement | element | ) | `[virtual]`

Returns true if material contains specified texture element.

Parameters:

  element | element type

Returns:
  True if material has this type of element

Implements VisimBox.Renderer.RenderMaterial.

Reimplemented in VisimRenderGL.GLMaterialColoredTex.

override void VisimRenderGL.GLMaterialColored.OnActivate | ( | RendererEventArgs | args | ) | `[virtual]`

Activate material (called from Activate)

Parameters:

  args | Rendering arguments

Implements VisimBox.Renderer.RenderMaterial.

Reimplemented in VisimRenderGL.GLMaterialColoredTex.

ColorByte VisimRenderGL.GLMaterialColored.ReadColor | ( | System.Xml.XmlReader | reader | ) | `[protected]`

override void VisimRenderGL.GLMaterialColored.ReadXml | ( | System.Xml.XmlReader | reader | ) | `[virtual]`

Deserializes object from XML.

Parameters:

  reader | XML reader

Implements VisimBox.Renderer.RenderMaterial.

Reimplemented in VisimRenderGL.GLMaterialColoredTex.

override void VisimRenderGL.GLMaterialColored.SetColorElement | ( | MaterialElement | element,
|  | ColorByte | color
| ) |  | `[virtual]`

Sets value of specified color element (if supported by material)

Parameters:

  element | Element type
  color | Color value

Implements VisimBox.Renderer.RenderMaterial.

override void VisimRenderGL.GLMaterialColored.SetTextureElement | ( | MaterialElement | element,
|  | Texture | tex
| ) |  | `[virtual]`

Sets value of specified texture element (if supported by material)

Parameters:

  element | Element type
  tex | Texture value

Implements VisimBox.Renderer.RenderMaterial.

Reimplemented in VisimRenderGL.GLMaterialColoredTex.

override void VisimRenderGL.GLMaterialColored.WriteXml | ( | System.Xml.XmlWriter | writer | ) | `[virtual]`

Serializes object to XML.

Parameters:

  writer | XML writer to save values

Implements VisimBox.Renderer.RenderMaterial.

Reimplemented in VisimRenderGL.GLMaterialColoredTex.

## Member Data Documentation

float [] VisimRenderGL.GLMaterialColored.ambient`[protected]`

StandardColorValues VisimRenderGL.GLMaterialColored.ColorValues`[protected]`

float [] VisimRenderGL.GLMaterialColored.diffuse`[protected]`

float [] VisimRenderGL.GLMaterialColored.emissive`[protected]`

float [] VisimRenderGL.GLMaterialColored.specular`[protected]`

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

- GLMaterial.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events