Show
Ignore:
Timestamp:
07/15/08 04:39:26 (5 months ago)
Author:
ArcRiley
Message:

Ticket #929 :

  • rearranged widgets.Projector → bodies.Camera → scenes.Scene API
  • Landscape (and eventually Space, etc) can now set a different zFar
  • eventually support many other neat tricks, too!
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pysoy/src/bodies/Camera.pym

    r1274 r1317  
    3838    cdef int _i 
    3939    self._fovy = 45.0 
     40    self._znear  = 1.0 
     41    self._zfar   = 100.0 
    4042    self.mass = 0 
    4143    self._wire = wireframe 
     
    112114  # 
    113115 
    114   cdef void _project(self) : 
     116  cdef void _project(self, gl.GLdouble _aspect) : 
    115117    cdef gl.GLfloat  _mtx[16] 
    116118    # 
     
    136138    # 
    137139    # Now we apply an inverse matrix to translate to the Scene's origin 
     140    gl.glMatrixMode(gl.GL_MODELVIEW) 
     141    gl.glLoadIdentity() 
    138142    _mtx[0]  = self._rotation[0] 
    139143    _mtx[1]  = self._rotation[1] 
     
    154158    gl.glLoadMatrixf(_mtx) 
    155159    gl.glTranslatef(-self._position[0], -self._position[1], -self._position[2]) 
    156     self._scene._render() 
     160    self._scene._render(self._fovy, _aspect, self._znear, self._zfar) 
    157161    # 
    158162    # Framerate calc