OpenGLContext.frustum
index
p:\openglcontext\frustum.py

View frustum modeling as series of clipping planes
 
The Frustum object itself is only responsible for
extracting the clipping planes from an OpenGL model-view
matrix.  The bulk of the frustum-culling algorithm is
implemented in the bounding volume objects found in the
OpenGLContext.scenegraph.boundingvolume module.
 
Based on code from:
        http://www.markmorley.com/opengl/frustumculling.html

 
Modules
            
Numeric
copy
copy_reg
vrml.fieldtypes
math
multiarray
vrml.node
pickle
vrml.protofunctions
string
types
 
Classes
            
Node(object)
Frustum
 
class Frustum(Node)
      Holder for frustum specification for intersection tests
 
Note:
        the Frustum can include an arbitrary number of
        clipping planes, though the most common usage
        is to define 6 clipping planes from the OpenGL
        model-view matrices.
 
  
Method resolution order:
Frustum
Node
object

Class methods defined here:
fromViewingMatrix(cls, matrix=None, normalize=1) from type
Extract and calculate frustum clipping planes from OpenGL
 
The default initializer allows you to create
Frustum objects with arbitrary clipping planes,
while this alternate initializer provides
automatic clipping-plane extraction from the
model-view matrix.
 
matrix -- the combined model-view matrix
normalize -- whether to normalize the plane equations
        to allow for sphere bounding-volumes and use of
        distance equations for LOD-style operations.
normalize(cls, frustum) from type
Normalize clipping plane equations

Properties defined here:
normalized
field SFBool normalized 1
normalized getter = fget(self, client) from SFBool
Get the client's value for this property
 
if notify is true send a notification event.
normalized setter = fset(self, client, value, notify=1) from SFBool
Set the client's value for this property
 
if notify is true send a notification event.
normalized deleter = fdel(self, client, notify=1) from SFBool
Delete the client's value for this property
 
if notify is true send a notification event.
planes
exposedField MFVec4f planes []
planes getter = fget(self, client) from MFVec4f
Get the client's value for this property
 
if notify is true send a notification event.
planes setter = fset(self, client, value, notify=1) from MFVec4f
Set the client's value for this property
 
if notify is true send a notification event.
planes deleter = fdel(self, client, notify=1) from MFVec4f
Delete the client's value for this property
 
if notify is true send a notification event.

Data and non-method functions defined here:
__doc__ = 'Holder for frustum specification for intersectio...g planes from the OpenGL\n\t\tmodel-view matrices.\n\t'
__module__ = 'OpenGLContext.frustum'

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

Properties inherited from Node:
DEF
exposedField SFString  DEF 
DEF getter = fget(self, client) from SFString
Get the client's value for this property
 
if notify is true send a notification event.
DEF setter = fset(self, client, value, notify=1) from SFString
Set the client's value for this property
 
if notify is true send a notification event.
DEF deleter = fdel(self, client, notify=1) from SFString
Delete the client's value for this property
 
if notify is true send a notification event.
rootSceneGraph
exposedField WeakSFNode  root NULL
rootSceneGraph getter = fget(self, client) from WeakSFNode
Get the client's value for this property
 
if notify is true send a notification event.
rootSceneGraph setter = fset(self, client, value, notify=1) from WeakSFNode
Set the client's value for this property
 
notify -- if true send a notification event
 
The SFNode tries to update the value's root
attribute to point to the root of the client
*iff* the value doesn't currently point at
a valid root.  (That is, it only updates root
if there is no current root).  This is done
without sending notify events.
rootSceneGraph deleter = fdel(self, client, notify=1) from WeakSFNode
Delete the client's value for this property
 
if notify is true send a notification event.

Data and non-method functions inherited from Node:
PROTO = ''
__dict__ = <dict-proxy object at 0x07156458>
__weakref__ = <member '__weakref__' of 'Node' objects>
externalURL = ()

Methods inherited from object:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__hash__(...)
x.__hash__() <==> hash(x)
__reduce__(...)
helper for pickle
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Data and non-method functions inherited from object:
__class__ = <type 'type'>
__new__ = <built-in method __new__ of type object at 0x1E0BD978>
T.__new__(S, ...) -> a new object with type S, a subtype of T
 
Functions
            
viewingMatrix(projection=None, model=None)
Calculate the total viewing matrix from given data
 
projection -- the projection matrix, if not provided
        than the result of glGetDoublev( GL_PROJECTION_MATRIX)
        will be used.
model -- the model-view matrix, if not provided
        than the result of glGetDoublev( GL_MODELVIEW_MATRIX )
        will be used.
 
Note:
        Unless there is a valid projection and model-view
        matrix, the function will raise a RuntimeError
 
Data
             INFO = 20
context_log = <logging.Logger instance at 0x056F3950>