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
VisimRenderGL.GLMaterialSimpleTex Class Reference
Inheritance diagram for VisimRenderGL.GLMaterialSimpleTex:

List of all members.

## Public Member Functions
| GLMaterialSimpleTex (string name, Texture tex)
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.
void | ResourceDisposing (IResource resource)
| Callback for resource disposing - just before releasing itself from memory resource will call all it's consumers to notify them it will be no longer valid.
bool | ResourceReplaced (IResource original, IResource newresource)
| Resource was replaced by another resource. Consumers can decide to keep new resource instead or hold to original value. If consumers wants to hold new resource instead, it should change it's pointers and return true, references in resources will be automatically updated. If false, consumer is not interested in new resource - depending on the nature of replace it may then get ResourceDisposing callback.

## Constructor & Destructor Documentation

VisimRenderGL.GLMaterialSimpleTex.GLMaterialSimpleTex | ( | string | name,
|  | Texture | tex
| ) |  |

## Member Function Documentation

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

Creates copy of self with new name.

Parameters:

  newname | name for the copy

Returns:
  new material

Implements VisimBox.Renderer.RenderMaterial.

override ColorByte VisimRenderGL.GLMaterialSimpleTex.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.GLMaterialSimpleTex.GetTextureElement | ( | MaterialElement | element | ) | `[virtual]`

Returns texture on specified element (or null)

Parameters:

  element | Element type

Returns:
  Texture object

Implements VisimBox.Renderer.RenderMaterial.

override bool VisimRenderGL.GLMaterialSimpleTex.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.GLMaterialSimpleTex.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.

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

Activate material (called from Activate)

Parameters:

  args | Rendering arguments

Implements VisimBox.Renderer.RenderMaterial.

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

Deserializes object from XML.

Parameters:

  reader | XML reader

Implements VisimBox.Renderer.RenderMaterial.

void VisimRenderGL.GLMaterialSimpleTex.ResourceDisposing | ( | IResource | resource | ) |

Callback for resource disposing - just before releasing itself from memory resource will call all it's consumers to notify them it will be no longer valid.

Parameters:

  resource | Resource which is being disposed

Implements VisimBox.Resources.IResourceConsumer.

bool VisimRenderGL.GLMaterialSimpleTex.ResourceReplaced | ( | IResource | original,
|  | IResource | newresource
| ) |  |

Resource was replaced by another resource. Consumers can decide to keep new resource instead or hold to original value. If consumers wants to hold new resource instead, it should change it's pointers and return true, references in resources will be automatically updated. If false, consumer is not interested in new resource - depending on the nature of replace it may then get ResourceDisposing callback.

Parameters:

  original | Original resource registered with consumer
  newresource | New resource

Returns:
  Consumer must return true if it want's to change reference to newresource, otherwise false.

Implements VisimBox.Resources.IResourceConsumer.

override void VisimRenderGL.GLMaterialSimpleTex.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.GLMaterialSimpleTex.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.

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

Serializes object to XML.

Parameters:

  writer | XML writer to save values

Implements VisimBox.Renderer.RenderMaterial.

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

- GLMaterial.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events