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

# Class ProjectionBaseClass

source code

             object --+
                      |
    ClassWithParameters --+
                          |
                         ProjectionBaseClass

    Converts stimulus coordinates to viewport coordinates.

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

    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]]

Instance Methods
__init__(self, **kw) Create self.parameters and set values. | source code
apply_to_gl(self) Set the OpenGL projection matrix. | source code
set_gl_modelview(self) Set the OpenGL modelview matrix. | source code
set_gl_projection(self) Set the OpenGL projection matrix. | source code
push_and_set_gl_projection(self) Set the OpenGL projection matrix, pushing current projection matrix to stack. | source code
translate(self, x, y, z) Compose a translation and set the OpenGL projection matrix. | source code
stateless_translate(self, x, y, z) Compose a translation without changing OpenGL state. | source code
rotate(self, angle_degrees, x, y, z) Compose a rotation and set the OpenGL projection matrix. | source code
stateless_rotate(self, angle_degrees, x, y, z) Compose a rotation without changing OpenGL state. | source code
scale(self, x, y, z) Compose a rotation and set the OpenGL projection matrix. | source code
stateless_scale(self, x, y, z) Compose a rotation without changing OpenGL state. | source code
get_matrix(self) | source code
look_at(self, eye, center, up) | source code
eye_2_clip(self, eye_coords_vertex) Transform eye coordinates to clip coordinates | source code
clip_2_norm_device(self, clip_coords_vertex) Transform clip coordinates to normalized device coordinates | source code
eye_2_norm_device(self, eye_coords_vertex) Transform eye coordinates to normalized device coordinates | source code
apply_to_vertex(self, vertex) Perform multiplication on vertex to get transformed result | source code
apply_to_vertices(self, vertices) Perform multiplication on vertex to get transformed result | source code
Inherited from `ClassWithParameters`: `__getstate__`, `__setstate__`, `get_specified_type`, `is_constant_parameter`, `set`, `verify_parameters` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables
| parameters_and_defaults = `VisionEgg.ParameterDefinition({'matr`...``
Inherited from `ClassWithParameters`: `__safe_for_unpickling__`, `constant_parameters_and_defaults`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, **kw) (Constructor) | source code
    Create self.parameters and set values.
Overrides: ClassWithParameters.__init__ (inherited documentation)

Class Variable Details

  ### parameters_and_defaults Value:
      VisionEgg.ParameterDefinition({'matrix':(Numeric.identity(4), ve_types
      .Sequence4x4(ve_types.Real), 'matrix specifying projection'),})