Package DejaVu :: Module DataOutput :: Class OutputVRML2
[hide private]
[frames] | no frames]

Class OutputVRML2

source code

OutputNode --+
             |
            OutputVRML2

generates a list of strings describing DejaVu geoms in VRML 2.0 format. Usage: OutputVRML2.getVRML2(geom, complete=0/1, normals=0/1) geom represents the geoms to be converted complete=1 will add vrml2 header and footer normals=1 will add normals

Instance Methods [hide private]
  __init__(self)
  getVRML2(self, root, complete=1, normals=0, colorPerVertex=True, usePROTO=0, sphereQuality=2, cylinderQuality=10)
this method returns a list of strings describing DejaVu Geoms in VRML2 format
  NodeRepr(self, geom, matrix)
This method, to be implemented by sublcass, should generate stl, vrml2 etc descriptions of DejaVu geoms
  doit(self, geom, matrix)
  doitReally(self, geom, matrix)
  doitUsePROTO(self, geom, matrix)
  getFileHeader1(self)
  getCopyright(self)
  getFileHeader2(self)
  getFileTrailer(self)
  getGeomName(self, geom)
  getGeomHeader(self, geom)
  getShape(self)
  getAppearance(self)
  getMaterial(self, geom)
  getGeomDescr(self, geom)
  getTexture(self, geom)
return PixelTexture Node PixelTexture { image 0 0 0 # exposedField SFImage repeatS True # field SFBool repeatT True # field SFBool } the value of the image field specifies image size and pixel values for a texture image width (in pixel) height (in pixel) number of 8-bit bytes for each pixel recognize values are: 0 disable texturing for shape 1 Grayscale 2 Grayscale with alpha 3 RGB 4 RGB with alpha (Info taken from Book " VRML 2.0 source book by Andrea L.
  getCoords(self, geom)
  getFaces(self, geom)
  getColorIndex(self, geom)
  getNormals(self, geom)
  getTexCoords(self, geom)
  getTexCoordsIndex(self, geom)
  getColors(self, geom, colors)
  getTransforms(self, matrix)

Inherited from OutputNode: checkGeom, configureProgressBar, countGeoms, loopGeoms, updateProgressBar

Inherited from OutputNode (private): _loopGeomsRec


Method Details [hide private]

__init__(self)
(Constructor)

source code 
None
Overrides: OutputNode.__init__

getVRML2(self, root, complete=1, normals=0, colorPerVertex=True, usePROTO=0, sphereQuality=2, cylinderQuality=10)

source code 
this method returns a list of strings describing DejaVu Geoms in VRML2 format

NodeRepr(self, geom, matrix)

source code 
This method, to be implemented by sublcass, should generate stl, vrml2 etc descriptions of DejaVu geoms
Overrides: OutputNode.NodeRepr
(inherited documentation)

doit(self, geom, matrix)

source code 
None

doitReally(self, geom, matrix)

source code 
None

doitUsePROTO(self, geom, matrix)

source code 
None

getFileHeader1(self)

source code 
None

getCopyright(self)

source code 
None

getFileHeader2(self)

source code 
None

getFileTrailer(self)

source code 
None

getGeomName(self, geom)

source code 
None

getGeomHeader(self, geom)

source code 
None

getShape(self)

source code 
None

getAppearance(self)

source code 
None

getMaterial(self, geom)

source code 
None

getGeomDescr(self, geom)

source code 
None

getTexture(self, geom)

source code 
return PixelTexture Node
PixelTexture {
     image 0  0 0  # exposedField SFImage
     repeatS True  # field SFBool
     repeatT True  # field SFBool
     }

the value of the image field specifies image size and pixel values
for a texture image
    width (in pixel)
    height (in pixel)
    number of 8-bit bytes for each pixel
       recognize values are:
           0 disable texturing for shape
           1 Grayscale
           2 Grayscale with alpha
           3 RGB
           4 RGB with alpha
(Info taken from Book " VRML 2.0 source book by Andrea L. Ames,
David R. Nadeau and John L. Moreland ")

getCoords(self, geom)

source code 
None

getFaces(self, geom)

source code 
None

getColorIndex(self, geom)

source code 
None

getNormals(self, geom)

source code 
None

getTexCoords(self, geom)

source code 
None

getTexCoordsIndex(self, geom)

source code 
None

getColors(self, geom, colors)

source code 
None

getTransforms(self, matrix)

source code 
None