Package VisionEgg :: Module Core :: Class Projection
[frames | no frames]

Class Projection

         object --+    
                  |    
ClassWithParameters --+
                      |
                     Projection

Known Subclasses:
OrthographicProjection, OrthographicProjectionNoZClip, PerspectiveProjection, SimplePerspectiveProjection

Converts stimulus coordinates to viewport coordinates.

This is an abstract base class which should be subclassed for
actual use.

This class is largely convenience for using OpenGL's
PROJECTION_MATRIX.


Parameters
==========
matrix -- matrix specifying projection (Sequence4x4 of Real)
          Default: [[1 0 0 0]
                    [0 1 0 0]
                    [0 0 1 0]
                    [0 0 0 1]]

Method Summary
  __init__(self, **kw)
Create self.parameters and set values.
  clip_2_norm_device(self, clip_coords_vertex)
Transform clip coordinates to normalized device coordinates...
  eye_2_clip(self, eye_coords_vertex)
Transform eye coordinates to clip coordinates...
  eye_2_norm_device(self, eye_coords_vertex)
Transform eye coordinates to normalized device coordinates...
  get_matrix(self)
  look_at(self, eye, center, up)
  push_and_set_gl_projection(self)
Set the OpenGL projection matrix, pushing current projection matrix to stack.
  rotate(self, angle_degrees, x, y, z)
Compose a rotation and set the OpenGL projection matrix.
  scale(self, x, y, z)
Compose a rotation and set the OpenGL projection matrix.
  set_gl_projection(self)
Set the OpenGL projection matrix.
  stateless_rotate(self, angle_degrees, x, y, z)
Compose a rotation without changing OpenGL state.
  stateless_scale(self, x, y, z)
Compose a rotation without changing OpenGL state.
  stateless_translate(self, x, y, z)
Compose a translation without changing OpenGL state.
  translate(self, x, y, z)
Compose a translation and set the OpenGL projection matrix.
    Inherited from ClassWithParameters
  get_specified_type(self, parameter_name)
  is_constant_parameter(self, parameter_name)
  set(self, **kw)
Set a parameter with type-checked value This is the slow but safe way to set parameters.
  verify_parameters(self)
Perform type check on all parameters...
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...

Class Variable Summary
tuple __slots__ = ('parameters', 'constant_parameters')
member_descriptor constant_parameters = <member 'constant_parameters' of '...
member_descriptor parameters = <member 'parameters' of 'Projection' object...
ParameterDefinition parameters_and_defaults = {'matrix': (array([[1, 0, 0, 0...
    Inherited from ClassWithParameters
ParameterDefinition constant_parameters_and_defaults = {}

Method Details

__init__(self, **kw)
(Constructor)

Create self.parameters and set values.
Overrides:
VisionEgg.ClassWithParameters.__init__ (inherited documentation)

clip_2_norm_device(self, clip_coords_vertex)

Transform clip coordinates to normalized device coordinates

eye_2_clip(self, eye_coords_vertex)

Transform eye coordinates to clip coordinates

eye_2_norm_device(self, eye_coords_vertex)

Transform eye coordinates to normalized device coordinates

push_and_set_gl_projection(self)

Set the OpenGL projection matrix, pushing current projection matrix to stack.

rotate(self, angle_degrees, x, y, z)

Compose a rotation and set the OpenGL projection matrix.

scale(self, x, y, z)

Compose a rotation and set the OpenGL projection matrix.

set_gl_projection(self)

Set the OpenGL projection matrix.

stateless_rotate(self, angle_degrees, x, y, z)

Compose a rotation without changing OpenGL state.

stateless_scale(self, x, y, z)

Compose a rotation without changing OpenGL state.

stateless_translate(self, x, y, z)

Compose a translation without changing OpenGL state.

translate(self, x, y, z)

Compose a translation and set the OpenGL projection matrix.

Class Variable Details

__slots__

Type:
tuple
Value:
('parameters', 'constant_parameters')                                  

constant_parameters

Type:
member_descriptor
Value:
<member 'constant_parameters' of 'Projection' objects>                 

parameters

Type:
member_descriptor
Value:
<member 'parameters' of 'Projection' objects>                          

parameters_and_defaults

Type:
ParameterDefinition
Value:
{'matrix': (array([[1, 0, 0, 0],
       [0, 1, 0, 0],
       [0, 0, 1, 0],
       [0, 0, 0, 1]]), <VisionEgg.ParameterTypes.Sequence4x4 object at\
 0x40c1b34c>, 'matrix specifying projection')}                         

Generated by Epydoc 2.0 on Fri Sep 19 18:29:39 2003 http://epydoc.sf.net