OpenGLContext.scenegraph.appearance
index
/home/mcfletch/pylive/OpenGLContext/scenegraph/appearance.py

Appearance node based on VRML 97 model

 
Modules
       
vrml.vrml97.basenodes
OpenGLContext.scenegraph.polygonsort

 
Classes
       
Appearance(Node)
Appearance

 
class Appearance(Appearance)
    Specifies visual properties for geometry
 
The appearance node specifies a set of appearance properties
to be applied to some number of geometry objects. The Appearance
node should be managed by a surrounding Shape node which binds
the Appearance to the appropriate geometry.  Note that multiple
Shape nodes are likely to use the same Appearance node.
 
There are three attributes of note within the appearance object:
 
    material -- Material node specifying rendering properties
        for the surface that affect the lighting model and
        transparency of the object.  If None, an un-lit material
        (emissive color == 1.0) is used by default.
        
    texture -- (Image)Texture node specifying a 2-D texture
        to apply to the geometry.  If None, no texture is applied.
 
    textureTransform -- Apply a 2-D transform to texture
        coordinates before texturing.
 
Reference:
    http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-IS-VRML97WithAmendment1/part1/nodesRef.html#Appearance
 
 
Method resolution order:
Appearance
Appearance
Node
object

Methods defined here:
render(self, mode=None)
Render Appearance, return (lit, textured, alpha, textureToken)
 
Renders the appearance node, returning 3 status flags
and a token which can be used to disable any enabled
textures.
 
Should only be called during visible rendering runs
renderPost(self, textureToken=None, mode=None)
Cleanup after rendering of this node has completed
sortKey(self, mode, matrix)
Produce the sorting key for this shape's appearance/shaders/etc
 
key is:
    (
        (not transparent), # opaque first, then transparent...
        distance, # front-to-back for opaque, back-to-front for transparent
        'legacy', 
        textures, # (grouping)
        material-params # (grouping)
    )

Data descriptors inherited from Appearance:
material
exposedField SFNode SFNode NULL
texture
exposedField SFNode SFNode NULL
textureTransform
exposedField SFNode SFNode NULL

Data and other attributes inherited from Appearance:
PROTO = 'Appearance'

Methods inherited from Node:
__init__(self, **namedarguments)
Initialise the node with appropriate named args
 
All properties/attributes must be specified with
named arguments, and the property/attribute must
exist within the Node's class/prototype.
 
This will raise AttributeError/ValueError/TypeError
if the values or the property names are inappropriate.
 
Note that all Node objects have the attribute/property
    exposedField SFString DEF ""
defined.  You may therefore specify a DEF name by
passing it as a named argument.
__repr__(self)
Get a code-like representation of the Node
 
Basically every attribute except for sub-nodes values
are returned as a full representation.
__str__(self)
Get a friendly representation of the Node
copy(self, copier=None)
Copy this node for copier
toString(self, **namedargs)
Generate a VRML 97-syntax string representing this Prototype
**namedargs -- key:value
    passed arguments for the linearisation object
see lineariser4.Lineariser

Data descriptors inherited from Node:
DEF
exposedField SFString  DEF
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
externalURL
exposedField MFString externalURL []
rootSceneGraph
exposedField RootScenegraphNode SFNode NULL

 
Data
        __file__ = '/home/mcfletch/pylive/OpenGLContext/scenegraph/appearance.pyc'
__name__ = 'OpenGLContext.scenegraph.appearance'
__package__ = 'OpenGLContext.scenegraph'
glColor3f = <CFunctionType object at 0x2565940>