| |
- _CubeBackground(object)
-
- Background(_CubeBackground, _SphereBackground, Background)
- _SphereBackground(object)
-
- Background(_CubeBackground, _SphereBackground, Background)
- Background(Children, Background, Node)
-
- Background(_CubeBackground, _SphereBackground, Background)
class Background(_CubeBackground, _SphereBackground, Background) |
|
VRML97-style background node
The Background node is a rather involved node,
there are to major sub-categories of functionality:
CubeBackground -- panoramic image-cube background
SphereBackground -- gradient sphere background
OpenGLContext separates at these two types of
functionality into super-classes of the Background
node which may be used individually.
OpenGLContext also allows for transparent images
in the CubeBackground attributes, which allows the
gradient sphere behind the images.
Note:
To be closer to VRML97, the Background node
actually uses different fields for the right,
top, bottom, etceteras fields than those used
by the cubebackground Node. Each storage name
is prefixed with a ' '. This should have
the effect of not linearising these values
to VRML97. |
|
- Method resolution order:
- Background
- _CubeBackground
- _SphereBackground
- Background
- Children
- Background
- Bindable
- Node
- object
Methods defined here:
- Render(self, mode, clear=1)
- Render the Background
mode -- the RenderingPass object representing
the current rendering pass
clear -- whether or not to do a background
clear before rendering
This implementation calls the CubeBackground
Render method iff one of the image attributes
has a non-0 component count (has been loaded).
Note:
the Background node only renders if the
mode's passCount == 0
XXX
Should optimize whether to render the sphere
background depending on whether we have all
of the image's loaded and all are non-Alpha
(i.e. you can't see the sphere)
Data descriptors defined here:
- back
- exposedField SFNode SFNode <class 'OpenGLContex
- bottom
- exposedField SFNode SFNode <class 'OpenGLContex
- front
- exposedField SFNode SFNode <class 'OpenGLContex
- left
- exposedField SFNode SFNode <class 'OpenGLContex
- right
- exposedField SFNode SFNode <class 'OpenGLContex
- top
- exposedField SFNode SFNode <class 'OpenGLContex
Methods inherited from _CubeBackground:
- compile(self, mode)
- Compile a VBO with our various triangles to render
Data descriptors inherited from _CubeBackground:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- backUrl
- exposedField MFString backUrl []
- bottomUrl
- exposedField MFString bottomUrl []
- bound
- exposedField SFBool bound 0
- frontUrl
- exposedField MFString frontUrl []
- leftUrl
- exposedField MFString leftUrl []
- rightUrl
- exposedField MFString rightUrl []
- topUrl
- exposedField MFString topUrl []
Data and other attributes inherited from _CubeBackground:
- RENDER_DATA = [(0, 'front', (0, 0, 1, 0), [((-1, -1, -1), (0, 0)), ((1, -1, -1), (1, 0)), ((1, 1, -1), (1, 1)), ((-1, 1, -1), (0, 1))]), (6, 'right', (-1, 0, 0, 0), [((1, -1, -1), (0, 0)), ((1, -1, 1), (1, 0)), ((1, 1, 1), (1, 1)), ((1, 1, -1), (0, 1))]), (12, 'back', (0, 0, -1, 0), [((1, -1, 1), (0, 0)), ((-1, -1, 1), (1, 0)), ((-1, 1, 1), (1, 1)), ((1, 1, 1), (0, 1))]), (18, 'left', (1, 0, 0, 0), [((-1, -1, 1), (0, 0)), ((-1, -1, -1), (1, 0)), ((-1, 1, -1), (1, 1)), ((-1, 1, 1), (0, 1))]), (24, 'bottom', (0, 1, 0, 0), [((-1, -1, 1), (0, 0)), ((1, -1, 1), (1, 0)), ((1, -1, -1), (1, 1)), ((-1, -1, -1), (0, 1))]), (30, 'top', (0, -1, 0, 0), [((-1, 1, -1), (0, 0)), ((1, 1, -1), (1, 0)), ((1, 1, 1), (1, 1)), ((-1, 1, 1), (0, 1))])]
- VBO = None
Methods inherited from _SphereBackground:
- buildSphere(self, colorSet)
- Build a coordinate-set for the color/angle mapping
- colorSet(self)
- Compound the sky and ground angle:color arrays into a single angle:color array-set
- pushOut(self, colorSet, start, stop)
- Push the colorSet values out to a distance they can be seen
Basically, if there is no value between pi/4 and 3pi/4, insert
values at those points with the proper linear interpolation
for colour.
Data descriptors inherited from _SphereBackground:
- groundAngle
- exposedField MFFloat groundAngle []
- groundColor
- exposedField MFColor groundColor []
- skyAngle
- exposedField MFFloat skyAngle []
- skyColor
- exposedField MFColor skyColor [[0.0, 0.0, 0.0]]
Data descriptors inherited from Background:
- isBound
- SFBool Event class
- set_bind
- SFBool Event class
Data and other attributes inherited from Background:
- PROTO = 'Background'
Data and other attributes inherited from Children:
- sensitive = 0
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
- externalURL
- exposedField MFString externalURL []
- rootSceneGraph
- exposedField RootScenegraphNode SFNode NULL
| |