Author: DavidCzech
Date: 2008-01-14 02:18:31 +0000 (Mon, 14 Jan 2008)
New Revision: 779
Added:
trunk/pysoy/src/meshes/Camera.pxi
Modified:
trunk/pysoy/src/meshes/soy.meshes.pxd
trunk/pysoy/src/meshes/soy.meshes.pyx
Log:
Camera Mesh
Added: trunk/pysoy/src/meshes/Camera.pxi
===================================================================
--- trunk/pysoy/src/meshes/Camera.pxi (rev 0)
+++ trunk/pysoy/src/meshes/Camera.pxi 2008-01-14 02:18:31 UTC (rev 779)
@@ -0,0 +1,36 @@
+cdef class Camera(Mesh) :
+ def __cinit__(self,*arg,**keywords):
+ pass
+ cdef void _render ( self, void* _body):
+ gl.glPushMatrix()
+ gl.glScalef(0.1,0.1,0.1)
+ gl.glDisable(gl.GL_CULL_FACE)
+ gl.glDisable(gl.GL_DEPTH_TEST)
+ gl.glDisable(gl.GL_LIGHTING)
+ gl.glColor3f(0.5,0.5,0.5)
+ gl.glBegin(gl.GL_LINE_STRIP)
+
+ gl.glVertex3f(-1,1.,1.)
+ gl.glVertex3f(1,1.,1.)
+ gl.glVertex3f(1,-1.,1.)
+ gl.glVertex3f(-1,-1.,1.)
+
+ gl.glEnd()
+ gl.glColor3f(0.5,0.5,0.5)
+ gl.glBegin(gl.GL_LINES)
+
+ gl.glVertex3f(-1,1.,1.)
+ gl.glVertex3f(0,0,0)
+ gl.glVertex3f(1,1.,1.)
+ gl.glVertex3f(0,0,0)
+ gl.glVertex3f(-1,-1.,1.)
+ gl.glVertex3f(0,0,0)
+ gl.glVertex3f(1,-1.,1.)
+ gl.glVertex3f(0,0,0)
+ gl.glVertex3f(-1,-1.,1.)
+ gl.glVertex3f(-1,1.,1.)
+ gl.glEnd()
+ gl.glEnable(gl.GL_LIGHTING)
+ gl.glEnable(gl.GL_DEPTH_TEST)
+ gl.glEnable(gl.GL_CULL_FACE)
+ gl.glPopMatrix()
\ No newline at end of file
Modified: trunk/pysoy/src/meshes/soy.meshes.pxd
===================================================================
--- trunk/pysoy/src/meshes/soy.meshes.pxd 2008-01-14 02:14:00 UTC (rev
778)
+++ trunk/pysoy/src/meshes/soy.meshes.pxd 2008-01-14 02:18:31 UTC (rev
779)
@@ -39,8 +39,11 @@
cdef void _renderBox ( self, soy.shapes.Shape )
cdef void _renderRay ( self, soy.shapes.Shape )
-cdef class Axis(Mesh):
+cdef class Axis(Mesh) :
cdef void _render ( self, void* )
+
+cdef class Camera(Mesh) :
+ cdef void _render ( self, void* )
cdef class Billboard(Mesh):
cdef soy.materials.Material _material
Modified: trunk/pysoy/src/meshes/soy.meshes.pyx
===================================================================
--- trunk/pysoy/src/meshes/soy.meshes.pyx 2008-01-14 02:14:00 UTC (rev
778)
+++ trunk/pysoy/src/meshes/soy.meshes.pyx 2008-01-14 02:18:31 UTC (rev
779)
@@ -26,5 +26,6 @@
include "Mesh.pxi"
include "Shape.pxi"
include "Axis.pxi"
+include "Camera.pxi"
include "Billboard.pxi"
_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn