Package Scientific :: Package Visualization :: Module VRML2 :: Class Material
[hide private]
[frames] | no frames]

Class Material



VRMLObject --+
             |
            Material

Material specification for graphics objects

A material defines the color and surface properties of an object.

Instance Methods [hide private]
  __init__(self, **attr)
  use(self, file)
  writeToFile(self, file)

Inherited from VRMLObject: __copy__, __getitem__, __setitem__


Class Variables [hide private]
  attribute_conversion = {'specular_color': 'specularColor', 'diffuse_color':...
  attribute_names = ['comment', 'ambient_color', 'diffuse_color', 'specu...

Method Details [hide private]

__init__(self, **attr)
(Constructor)

 
Parameters:
  • attr - material attributes as keyword arguments
  • diffuse_color (Color) - the color of a diffusely reflecting surface
  • emissive_color (Color) - the color of emitted light
  • ambient_color (Color) -
  • specular_color (Color) -
  • shininess (float) -
  • transparency (float) -
Overrides: VRMLObject.__init__

use(self, file)

 

writeToFile(self, file)

 
Overrides: VRMLObject.writeToFile

Class Variable Details [hide private]

attribute_conversion

Value:
{'ambient_color': 'ambientColor',
 'diffuse_color': 'diffuseColor',
 'emissive_color': 'emissiveColor',
 'shininess': 'shininess',
 'specular_color': 'specularColor',
 'transparency': 'transparency'}                                       
      

attribute_names

Value:
['comment',
 'ambient_color',
 'diffuse_color',
 'specular_color',
 'emissive_color',
 'shininess',
 'transparency']