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

Class VRMLObject



Known Subclasses:
ShapeObject, Material

Graphics object for VRML

This is an abstract base class. Use one of the subclasses to generate graphics.

Instance Methods [hide private]
  __copy__(self)
  __getitem__(self, attr)
Returns the value of the attribute, or None if the attribute is undefined
  __init__(self, attr)
  __setitem__(self, attr, value)
  writeToFile(self, file)

Class Variables [hide private]
  attribute_names = ['comment']

Method Details [hide private]

__copy__(self)

 

__getitem__(self, attr)
(Indexing operator)

 
Parameters:
  • attr (str) - the name of a graphics attribute
Returns:
the value of the attribute, or None if the attribute is undefined

__init__(self, attr)
(Constructor)

 
Parameters:
  • attr - graphics attributes specified by keywords
  • material (Material) - color and surface properties
  • comment (str) - a comment that is written to the script file
  • reuse (bool) - a flag defaulting to False. If set to True, the object may share its VRML definition with other objects. This reduces the size of the VRML file, but can yield surprising side effects in some cases.

__setitem__(self, attr, value)
(Index assignment operator)

 
Parameters:
  • attr (str) - the name of a graphics attribute
  • value - a new value for the attribute

writeToFile(self, file)

 

Class Variable Details [hide private]

attribute_names

Value:
['comment']