Author: ArcRiley
Date: 2008-02-12 07:03:19 -0500 (Tue, 12 Feb 2008)
New Revision: 870

Modified:
   trunk/pysoy/examples/bumpmap_example.py
   trunk/pysoy/examples/collide_blocks.py
   trunk/pysoy/examples/joint_blocks.py
   trunk/pysoy/examples/liquid_example.py
   trunk/pysoy/examples/pyramid.py
   trunk/pysoy/examples/steel_billboard.py
   trunk/pysoy/examples/sun_example.py
   trunk/pysoy/src/_core/Window-w32.pxi
   trunk/pysoy/src/_core/Window-x11.pxi
   trunk/pysoy/src/bodies.lights/Light.pxi
   trunk/pysoy/src/bodies.lights/soy.bodies.lights.pyx
   trunk/pysoy/src/colors/a.pxi
   trunk/pysoy/src/colors/b.pxi
   trunk/pysoy/src/colors/c.pxi
   trunk/pysoy/src/colors/d.pxi
   trunk/pysoy/src/colors/f.pxi
   trunk/pysoy/src/colors/g.pxi
   trunk/pysoy/src/colors/h.pxi
   trunk/pysoy/src/colors/i.pxi
   trunk/pysoy/src/colors/k.pxi
   trunk/pysoy/src/colors/l.pxi
   trunk/pysoy/src/colors/m.pxi
   trunk/pysoy/src/colors/n.pxi
   trunk/pysoy/src/colors/o.pxi
   trunk/pysoy/src/colors/p.pxi
   trunk/pysoy/src/colors/r.pxi
   trunk/pysoy/src/colors/s.pxi
   trunk/pysoy/src/colors/t.pxi
   trunk/pysoy/src/colors/v.pxi
   trunk/pysoy/src/colors/w.pxi
   trunk/pysoy/src/colors/y.pxi
   trunk/pysoy/src/materials/A.pxi
   trunk/pysoy/src/materials/B.pxi
   trunk/pysoy/src/materials/C.pxi
   trunk/pysoy/src/materials/D.pxi
   trunk/pysoy/src/materials/Material.pxi
   trunk/pysoy/src/materials/P.pxi
   trunk/pysoy/src/materials/R.pxi
   trunk/pysoy/src/materials/S.pxi
   trunk/pysoy/src/materials/V.pxi
   trunk/pysoy/src/meshes/Liquid.pxi
   trunk/pysoy/src/scenes/Scene.pxi
   trunk/pysoy/src/textures/Print.pxi
Log:
#908 complete, though some color value got bumped in the process :-/


Modified: trunk/pysoy/examples/bumpmap_example.py
===================================================================
--- trunk/pysoy/examples/bumpmap_example.py     2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/examples/bumpmap_example.py     2008-02-12 12:03:19 UTC (rev 
870)
@@ -73,7 +73,6 @@
 
     scr = soy.Screen()
     win = soy.Window(scr, title='Bumpmap example', 
-                     background=soy.colors.Black(),
                      size = (1024,768))
 
     pro = soy.widgets.Projector(win, camera=cam)

Modified: trunk/pysoy/examples/collide_blocks.py
===================================================================
--- trunk/pysoy/examples/collide_blocks.py      2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/examples/collide_blocks.py      2008-02-12 12:03:19 UTC (rev 
870)
@@ -16,7 +16,7 @@
 fps = soy.textures.Print()
 
 scr = soy.Screen()
-win = soy.Window(scr, 'Collision Blocks', background=soy.colors.Teal())
+win = soy.Window(scr, 'Collision Blocks', background=soy.colors.teal)
 pro = soy.widgets.Projector(win, camera=cam)
 can = soy.widgets.Canvas(win, texture=fps)
 key = soy.controllers.Keyboard(win)

Modified: trunk/pysoy/examples/joint_blocks.py
===================================================================
--- trunk/pysoy/examples/joint_blocks.py        2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/examples/joint_blocks.py        2008-02-12 12:03:19 UTC (rev 
870)
@@ -14,7 +14,7 @@
 jnt = soy.joints.Fixed(sce, bks['Pearl'], bks['VelvetyRed'])
 
 scr = soy.Screen()
-win = soy.Window(scr, 'Collision Blocks', background=soy.colors.Teal())
+win = soy.Window(scr, 'Collision Blocks', background=soy.colors.teal)
 pro = soy.widgets.Projector(win, camera=cam)
 key = soy.controllers.Keyboard(win)
 key['Q'] = soy.actions.Force(bks['Pearl'], -100,    0,    0)

Modified: trunk/pysoy/examples/liquid_example.py
===================================================================
--- trunk/pysoy/examples/liquid_example.py      2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/examples/liquid_example.py      2008-02-12 12:03:19 UTC (rev 
870)
@@ -159,9 +159,9 @@
     water = soy.transports.File('media/water.soy')['gimp']
 
     water_mat = soy.materials.Material(water)
-    water_mat.ambient = soy.colors.Blue()
-    water_mat.diffuse = soy.colors.Blue()
-    water_mat.specular = soy.colors.Black()
+    water_mat.ambient = soy.colors.blue
+    water_mat.diffuse = soy.colors.blue
+    water_mat.specular = soy.colors.black
 
     liquid = soy.meshes.Liquid(liquid_mat=water_mat)
     liquid_b = soy.bodies.Body(sce, mesh=liquid)
@@ -179,8 +179,7 @@
 
 
     scr = soy.Screen()
-    win = soy.Window(scr, 'Liquid example', background=soy.colors.Black(),
-            size=(1024,768))
+    win = soy.Window(scr, 'Liquid example', size=(1024,768))
 
     pro = soy.widgets.Projector(win, camera=cam)
 

Modified: trunk/pysoy/examples/pyramid.py
===================================================================
--- trunk/pysoy/examples/pyramid.py     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/examples/pyramid.py     2008-02-12 12:03:19 UTC (rev 870)
@@ -2,10 +2,10 @@
 from time import sleep
 class Pyramid (soy.meshes.Mesh) :
   def __init__(self, tex=None) :
-    mat0 = soy.materials.Material(ambient=soy.colors.Cyan(),
-                                       diffuse=soy.colors.Cyan())
-    mat1 = soy.materials.Material(ambient=soy.colors.YellowGreen(),
-                                       diffuse=soy.colors.GoldenRod())
+    mat0 = soy.materials.Material(ambient=soy.colors.cyan,
+                                  diffuse=soy.colors.cyan)
+    mat1 = soy.materials.Material(ambient=soy.colors.yellowGreen,
+                                  diffuse=soy.colors.goldenRod)
     mat2 = soy.materials.Material(color=tex)
 
     a = soy.atoms.Vertex(self,position=( 0, 1, 0), texcoord=(0,0,0))

Modified: trunk/pysoy/examples/steel_billboard.py
===================================================================
--- trunk/pysoy/examples/steel_billboard.py     2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/examples/steel_billboard.py     2008-02-12 12:03:19 UTC (rev 
870)
@@ -37,8 +37,7 @@
         return m
 
     scr = soy.Screen()
-    win = soy.Window(scr, 'Billboard example', background=soy.colors.Black(),
-            size=(1024,768))
+    win = soy.Window(scr, 'Billboard example', size=(1024,768))
 
     pro = soy.widgets.Projector(win, camera=cam)
 

Modified: trunk/pysoy/examples/sun_example.py
===================================================================
--- trunk/pysoy/examples/sun_example.py 2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/examples/sun_example.py 2008-02-12 12:03:19 UTC (rev 870)
@@ -49,8 +49,7 @@
 
 
     scr = soy.Screen()
-    win = soy.Window(scr, 'Sun example', background=soy.colors.Black(),
-            size=(1024,768))
+    win = soy.Window(scr, 'Sun example', size=(1024,768))
 
     pro = soy.widgets.Projector(win, camera=cam)
 

Modified: trunk/pysoy/src/_core/Window-w32.pxi
===================================================================
--- trunk/pysoy/src/_core/Window-w32.pxi        2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/src/_core/Window-w32.pxi        2008-02-12 12:03:19 UTC (rev 
870)
@@ -51,7 +51,7 @@
     if background :
       self._background = background
     else :
-      self._background = soy.colors.Black()
+      self._background = soy.colors.black
     if splash:
       self._splash = 1
     else:

Modified: trunk/pysoy/src/_core/Window-x11.pxi
===================================================================
--- trunk/pysoy/src/_core/Window-x11.pxi        2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/src/_core/Window-x11.pxi        2008-02-12 12:03:19 UTC (rev 
870)
@@ -50,7 +50,7 @@
     if background :
       self._background = background
     else :
-      self._background = soy.colors.Black()
+      self._background = soy.colors.black
     if splash :
       self._splash = 1
     self._x  = position[0]

Modified: trunk/pysoy/src/bodies.lights/Light.pxi
===================================================================
--- trunk/pysoy/src/bodies.lights/Light.pxi     2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/src/bodies.lights/Light.pxi     2008-02-12 12:03:19 UTC (rev 
870)
@@ -29,10 +29,9 @@
     else :
       self.scene = scene
 
-    import soy.colors
-    self._ambient = soy.colors.Black()    
-    self._diffuse = soy.colors.White()
-    self._specular = soy.colors.White()
+    self._ambient = soy.colors.gray
+    self._diffuse = soy.colors.white
+    self._specular = soy.colors.white
 
 
   cdef void _on(self, int id) :

Modified: trunk/pysoy/src/bodies.lights/soy.bodies.lights.pyx
===================================================================
--- trunk/pysoy/src/bodies.lights/soy.bodies.lights.pyx 2008-02-12 10:29:29 UTC 
(rev 869)
+++ trunk/pysoy/src/bodies.lights/soy.bodies.lights.pyx 2008-02-12 12:03:19 UTC 
(rev 870)
@@ -23,6 +23,7 @@
               'by '+'$Author$'[9:-2]
 __version__ = 'Trunk (r'+'$Rev$'[6:-2]+')'
 
+import soy.colors
 cimport soy.scenes
 
 include "Light.pxi"

Modified: trunk/pysoy/src/colors/a.pxi
===================================================================
--- trunk/pysoy/src/colors/a.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/a.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.A* classes
+# PySoy colors.a* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,27 +17,9 @@
 #
 # $Id$
 
-cdef class AliceBlue (Color) :
-  def __init__(self) :
-    self.hex = '#f0f8ff'
-
-cdef class AntiqueWhite (Color) :
-  def __init__(self) :
-    self.hex = '#faebd7'
-
-cdef class Aqua (Color) :
-  def __init__(self) :
-    self.hex = '#00ffff'
-
-cdef class Aquamarine (Color) :
-  def __init__(self) :
-    self.hex = '#7fffd4'
-
-cdef class Aventurine (Color) :
-  def __init__(self) :
-    self.hex = '#67e4a0'
-    
-cdef class Azure (Color) :
-  def __init__(self) :
-    self.hex = '#f0ffff'
-
+aliceBlue              = Color ( hex='#f0f8ff' )
+antiqueWhite           = Color ( hex='#faebd7' )
+aqua                   = Color ( hex='#00ffff' )
+aquamarine             = Color ( hex='#7fffd4' )
+aventurine             = Color ( hex='#67e4a0' )
+azure                  = Color ( hex='#f0ffff' )

Modified: trunk/pysoy/src/colors/b.pxi
===================================================================
--- trunk/pysoy/src/colors/b.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/b.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.B* classes
+# PySoy colors.b* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,38 +17,12 @@
 #
 # $Id: B.pxi 703 2008-01-01 22:37:47Z ArcRiley $
 
-cdef class Basalt (Color) :
-  def __init__(self) :
-    self.hex = '#333333'
-
-cdef class Beige (Color) :
-  def __init__(self) :
-    self.hex = '#f5f5dc'
-
-cdef class Bisque (Color) :
-  def __init__(self) :
-    self.hex = '#ffe4c4'
-
-cdef class Black (Color) :
-  def __init__(self) :
-    self.hex = '#000000'
-
-cdef class BlanchedAlmond (Color) :
-  def __init__(self) :
-    self.hex = '#ffebcd'
-
-cdef class Blue (Color) :
-  def __init__(self) :
-    self.hex = '#0000ff'
-
-cdef class BlueViolet (Color) :
-  def __init__(self) :
-    self.hex = '#8a2be2'
-
-cdef class Brown (Color) :
-  def __init__(self) :
-    self.hex = '#a52a2a'
-
-cdef class BurlyWood (Color) :
-  def __init__(self) :
-    self.hex = '#deb887'
+basalt                 = Color ( hex='#333333' )
+beige                  = Color ( hex='#f5f5dc' )
+bisque                 = Color ( hex='#ffe4c4' )
+black                  = Color ( hex='#000000' )
+blanchedAlmond         = Color ( hex='#ffebcd' )
+blue                   = Color ( hex='#0000ff' )
+blueViolet             = Color ( hex='#8a2be2' )
+brown                  = Color ( hex='#a52a2a' )
+burlyWood              = Color ( hex='#deb887' )

Modified: trunk/pysoy/src/colors/c.pxi
===================================================================
--- trunk/pysoy/src/colors/c.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/c.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.C* classes
+# PySoy colors.c* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,50 +17,15 @@
 #
 # $Id$
 
-cdef class CadetBlue (Color) :
-  def __init__(self) :
-    self.hex = '#5f9ea0'
-
-cdef class Chartreuse (Color) :
-  def __init__(self) :
-    self.hex = '#7fff00'
-
-cdef class Chocolate (Color) :
-  def __init__(self) :
-    self.hex = '#d2691e'
-    
-cdef class Chrome (Color) :
-  def __init__(self) :
-    self.hex = '#e8f1d4'
-
-cdef class Clear (Color) :
-  def __init__(self) :
-    self.hex = '#00000000'
-
-cdef class Coral (Color) :
-  def __init__(self) :
-    self.hex = '#ff7f50'
-
-cdef class CornflowerBlue (Color) :
-  def __init__(self) :
-    self.hex = '#6495ed'
-
-cdef class Cornsilk (Color) :
-  def __init__(self) :
-    self.hex = '#fff8dc'
-
-cdef class Crimson (Color) :
-  def __init__(self) :
-    self.hex = '#dc143c'
-
-cdef class Cyan (Color) :
-  def __init__(self) :
-    self.hex = '#00ffff'
-
-cdef class Copper (Color) :
-  def __init__(self) :
-    self.hex = '#B87333'
-
-cdef class CopperSulfate (Color) :
-  def __init__(self) :
-    self.hex = '#187df9'
+cadetBlue              = Color ( hex='#5f9ea0' )
+chartreuse             = Color ( hex='#7fff00' )
+chocolate              = Color ( hex='#d2691e' )
+chrome                 = Color ( hex='#e8f1d4' )
+clear                  = Color ( hex='#00000000' )
+coral                  = Color ( hex='#ff7f50' )
+cornflowerBlue         = Color ( hex='#6495ed' )
+cornsilk               = Color ( hex='#fff8dc' )
+crimson                = Color ( hex='#dc143c' )
+cyan                   = Color ( hex='#00ffff' )
+copper                 = Color ( hex='#B87333' )
+copperSulfate          = Color ( hex='#187df9' )

Modified: trunk/pysoy/src/colors/d.pxi
===================================================================
--- trunk/pysoy/src/colors/d.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/d.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.D* classes
+# PySoy colors.d* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,102 +17,28 @@
 #
 # $Id$
 
-cdef class DarkViolet (Color) :
-  def __init__(self) :
-    self.hex = '#9400D3'
-
-cdef class DeepSkyBlue (Color) :
-  def __init__(self) :
-    self.hex = '#00BFFF'
-
-cdef class DarkMagenta (Color) :
-  def __init__(self) :
-    self.hex = '#8B008B'
-
-cdef class Darkorange (Color) :
-  def __init__(self) :
-    self.hex = '#FF8C00'
-
-cdef class DarkGray (Color) :
-  def __init__(self) :
-    self.hex = '#A9A9A9'
-
-cdef class DarkSeaGreen (Color) :
-  def __init__(self) :
-    self.hex = '#8FBC8F'
-
-cdef class DarkOliveGreen (Color) :
-  def __init__(self) :
-    self.hex = '#556B2F'
-
-cdef class DarkSlateGrey (Color) :
-  def __init__(self) :
-    self.hex = '#2F4F4F'
-
-cdef class DarkSalmon (Color) :
-  def __init__(self) :
-    self.hex = '#E9967A'
-
-cdef class DimGrey (Color) :
-  def __init__(self) :
-    self.hex = '#696969'
-
-cdef class DimGray (Color) :
-  def __init__(self) :
-    self.hex = '#696969'
-
-cdef class DeepPink (Color) :
-  def __init__(self) :
-    self.hex = '#FF1493'
-
-cdef class DarkKhaki (Color) :
-  def __init__(self) :
-    self.hex = '#BDB76B'
-
-cdef class DarkGoldenRod (Color) :
-  def __init__(self) :
-    self.hex = '#B8860B'
-
-cdef class DarkGreen (Color) :
-  def __init__(self) :
-    self.hex = '#006400'
-
-cdef class DarkSlateGray (Color) :
-  def __init__(self) :
-    self.hex = '#2F4F4F'
-
-cdef class DodgerBlue (Color) :
-  def __init__(self) :
-    self.hex = '#1E90FF'
-
-cdef class DarkBlue (Color) :
-  def __init__(self) :
-    self.hex = '#00008B'
-
-cdef class DarkSlateBlue (Color) :
-  def __init__(self) :
-    self.hex = '#483D8B'
-
-cdef class DarkGrey (Color) :
-  def __init__(self) :
-    self.hex = '#A9A9A9'
-
-cdef class DarkRed (Color) :
-  def __init__(self) :
-    self.hex = '#8B0000'
-
-cdef class DarkTurquoise (Color) :
-  def __init__(self) :
-    self.hex = '#00CED1'
-
-cdef class DarkOrchid (Color) :
-  def __init__(self) :
-    self.hex = '#9932CC'
-
-cdef class DarkCyan (Color) :
-  def __init__(self) :
-    self.hex = '#008B8B'
-
-cdef class DarkWood (Color) :
-  def __init__(self) :
-    self.hex = '#855E42'
+darkViolet             = Color ( hex='#9400D3' )
+deepSkyBlue            = Color ( hex='#00BFFF' )
+darkMagenta            = Color ( hex='#8B008B' )
+darkorange             = Color ( hex='#FF8C00' )
+darkGray               = Color ( hex='#A9A9A9' )
+darkSeaGreen           = Color ( hex='#8FBC8F' )
+darkOliveGreen         = Color ( hex='#556B2F' )
+darkSlateGrey          = Color ( hex='#2F4F4F' )
+darkSalmon             = Color ( hex='#E9967A' )
+dimGrey                = Color ( hex='#696969' )
+dimGray                = Color ( hex='#696969' )
+deepPink               = Color ( hex='#FF1493' )
+darkKhaki              = Color ( hex='#BDB76B' )
+darkGoldenRod          = Color ( hex='#B8860B' )
+darkGreen              = Color ( hex='#006400' )
+darkSlateGray          = Color ( hex='#2F4F4F' )
+dodgerBlue             = Color ( hex='#1E90FF' )
+darkBlue               = Color ( hex='#00008B' )
+darkSlateBlue          = Color ( hex='#483D8B' )
+darkGrey               = Color ( hex='#A9A9A9' )
+darkRed                = Color ( hex='#8B0000' )
+darkTurquoise          = Color ( hex='#00CED1' )
+darkOrchid             = Color ( hex='#9932CC' )
+darkCyan               = Color ( hex='#008B8B' )
+darkWood               = Color ( hex='#855E42' )

Modified: trunk/pysoy/src/colors/f.pxi
===================================================================
--- trunk/pysoy/src/colors/f.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/f.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.F* classes
+# PySoy colors.f* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,18 +17,7 @@
 #
 # $Id$
 
-cdef class FireBrick (Color) :
-  def __init__(self) :
-    self.hex = '#B22222'
-
-cdef class Fuchsia (Color) :
-  def __init__(self) :
-    self.hex = '#FF00FF'
-
-cdef class FloralWhite (Color) :
-  def __init__(self) :
-    self.hex = '#FFFAF0'
-
-cdef class ForestGreen (Color) :
-  def __init__(self) :
-    self.hex = '#228B22'
+fireBrick              = Color ( hex='#B22222' )
+fuchsia                = Color ( hex='#FF00FF' )
+floralWhite            = Color ( hex='#FFFAF0' )
+forestGreen            = Color ( hex='#228B22' )

Modified: trunk/pysoy/src/colors/g.pxi
===================================================================
--- trunk/pysoy/src/colors/g.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/g.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.G* classes
+# PySoy colors.g* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,34 +17,11 @@
 #
 # $Id$
 
-cdef class Gray (Color) :
-  def __init__(self) :
-    self.hex = '#808080'
-
-cdef class Gold (Color) :
-  def __init__(self) :
-    self.hex = '#FFD700'
-
-cdef class Gainsboro (Color) :
-  def __init__(self) :
-    self.hex = '#DCDCDC'
-
-cdef class GoldenRod (Color) :
-  def __init__(self) :
-    self.hex = '#DAA520'
-
-cdef class Green (Color) :
-  def __init__(self) :
-    self.hex = '#008000'
-
-cdef class GhostWhite (Color) :
-  def __init__(self) :
-    self.hex = '#F8F8FF'
-
-cdef class Grey (Color) :
-  def __init__(self) :
-    self.hex = '#808080'
-
-cdef class GreenYellow (Color) :
-  def __init__(self) :
-    self.hex = '#ADFF2F'
+gray                   = Color ( hex='#808080' )
+gold                   = Color ( hex='#FFD700' )
+gainsboro              = Color ( hex='#DCDCDC' )
+goldenRod              = Color ( hex='#DAA520' )
+green                  = Color ( hex='#008000' )
+ghostWhite             = Color ( hex='#F8F8FF' )
+grey                   = Color ( hex='#808080' )
+greenYellow            = Color ( hex='#ADFF2F' )

Modified: trunk/pysoy/src/colors/h.pxi
===================================================================
--- trunk/pysoy/src/colors/h.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/h.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.H* classes
+# PySoy colors.h* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,10 +17,5 @@
 #
 # $Id$
 
-cdef class HotPink (Color) :
-  def __init__(self) :
-    self.hex = '#FF69B4'
-
-cdef class HoneyDew (Color) :
-  def __init__(self) :
-    self.hex = '#F0FFF0'
+hotPink                = Color ( hex='#FF69B4' )
+honeyDew               = Color ( hex='#F0FFF0' )

Modified: trunk/pysoy/src/colors/i.pxi
===================================================================
--- trunk/pysoy/src/colors/i.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/i.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.I* classes
+# PySoy colors.i* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,14 +17,6 @@
 #
 # $Id$
 
-cdef class Indigo (Color) :
-  def __init__(self) :
-    self.hex = '#4B0082'
-
-cdef class Ivory (Color) :
-  def __init__(self) :
-    self.hex = '#FFFFF0'
-
-cdef class IndianRed (Color) :
-  def __init__(self) :
-    self.hex = '#CD5C5C'
+indigo                 = Color ( hex='#4B0082' )
+ivory                  = Color ( hex='#FFFFF0' )
+indianRed              = Color ( hex='#CD5C5C' )

Modified: trunk/pysoy/src/colors/k.pxi
===================================================================
--- trunk/pysoy/src/colors/k.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/k.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.K* classes
+# PySoy colors.k* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,6 +17,4 @@
 #
 # $Id$
 
-cdef class Khaki (Color) :
-  def __init__(self) :
-    self.hex = '#F0E68C'
+khaki                  = Color ( hex='#F0E68C' )

Modified: trunk/pysoy/src/colors/l.pxi
===================================================================
--- trunk/pysoy/src/colors/l.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/l.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.L* classes
+# PySoy colors.l* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,90 +17,25 @@
 #
 # $Id$
 
-cdef class LightCoral (Color) :
-  def __init__(self) :
-    self.hex = '#F08080'
-
-cdef class LightYellow (Color) :
-  def __init__(self) :
-    self.hex = '#FFFFE0'
-
-cdef class Lavender (Color) :
-  def __init__(self) :
-    self.hex = '#E6E6FA'
-
-cdef class LightPink (Color) :
-  def __init__(self) :
-    self.hex = '#FFB6C1'
-
-cdef class LightBlue (Color) :
-  def __init__(self) :
-    self.hex = '#ADD8E6'
-
-cdef class LavenderBlush (Color) :
-  def __init__(self) :
-    self.hex = '#FFF0F5'
-
-cdef class LightGray (Color) :
-  def __init__(self) :
-    self.hex = '#D3D3D3'
-
-cdef class LightSlateGray (Color) :
-  def __init__(self) :
-    self.hex = '#778899'
-
-cdef class LightSeaGreen (Color) :
-  def __init__(self) :
-    self.hex = '#20B2AA'
-
-cdef class Lime (Color) :
-  def __init__(self) :
-    self.hex = '#00FF00'
-
-cdef class LightGrey (Color) :
-  def __init__(self) :
-    self.hex = '#D3D3D3'
-
-cdef class LightSlateGrey (Color) :
-  def __init__(self) :
-    self.hex = '#778899'
-
-cdef class LemonChiffon (Color) :
-  def __init__(self) :
-    self.hex = '#FFFACD'
-
-cdef class LightCyan (Color) :
-  def __init__(self) :
-    self.hex = '#E0FFFF'
-
-cdef class LightGreen (Color) :
-  def __init__(self) :
-    self.hex = '#90EE90'
-
-cdef class LimeGreen (Color) :
-  def __init__(self) :
-    self.hex = '#32CD32'
-
-cdef class LightSteelBlue (Color) :
-  def __init__(self) :
-    self.hex = '#B0C4DE'
-
-cdef class LawnGreen (Color) :
-  def __init__(self) :
-    self.hex = '#7CFC00'
-
-cdef class Linen (Color) :
-  def __init__(self) :
-    self.hex = '#FAF0E6'
-
-cdef class LightSkyBlue (Color) :
-  def __init__(self) :
-    self.hex = '#87CEFA'
-
-cdef class LightGoldenRodYellow (Color) :
-  def __init__(self) :
-    self.hex = '#FAFAD2'
-
-cdef class LightSalmon (Color) :
-  def __init__(self) :
-    self.hex = '#FFA07A'
+lightCoral             = Color ( hex='#F08080' )
+lightYellow            = Color ( hex='#FFFFE0' )
+lavender               = Color ( hex='#E6E6FA' )
+lightPink              = Color ( hex='#FFB6C1' )
+lightBlue              = Color ( hex='#ADD8E6' )
+lavenderBlush          = Color ( hex='#FFF0F5' )
+lightGray              = Color ( hex='#D3D3D3' )
+lightSlateGray         = Color ( hex='#778899' )
+lightSeaGreen          = Color ( hex='#20B2AA' )
+lime                   = Color ( hex='#00FF00' )
+lightGrey              = Color ( hex='#D3D3D3' )
+lightSlateGrey         = Color ( hex='#778899' )
+lemonChiffon           = Color ( hex='#FFFACD' )
+lightCyan              = Color ( hex='#E0FFFF' )
+lightGreen             = Color ( hex='#90EE90' )
+limeGreen              = Color ( hex='#32CD32' )
+lightSteelBlue         = Color ( hex='#B0C4DE' )
+lawnGreen              = Color ( hex='#7CFC00' )
+linen                  = Color ( hex='#FAF0E6' )
+lightSkyBlue           = Color ( hex='#87CEFA' )
+lightGoldenRodYellow   = Color ( hex='#FAFAD2' )
+lightSalmon            = Color ( hex='#FFA07A' )

Modified: trunk/pysoy/src/colors/m.pxi
===================================================================
--- trunk/pysoy/src/colors/m.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/m.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.M* classes
+# PySoy colors.m* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,62 +17,18 @@
 #
 # $Id$
 
-cdef class MediumAquaMarine (Color) :
-  def __init__(self) :
-    self.hex = '#66CDAA'
-
-cdef class MidnightBlue (Color) :
-  def __init__(self) :
-    self.hex = '#191970'
-
-cdef class Magenta (Color) :
-  def __init__(self) :
-    self.hex = '#FF00FF'
-
-cdef class MistyRose (Color) :
-  def __init__(self) :
-    self.hex = '#FFE4E1'
-
-cdef class MediumSpringGreen (Color) :
-  def __init__(self) :
-    self.hex = '#00FA9A'
-
-cdef class MediumSlateBlue (Color) :
-  def __init__(self) :
-    self.hex = '#7B68EE'
-
-cdef class MediumOrchid (Color) :
-  def __init__(self) :
-    self.hex = '#BA55D3'
-
-cdef class Maroon (Color) :
-  def __init__(self) :
-    self.hex = '#800000'
-
-cdef class MediumTurquoise (Color) :
-  def __init__(self) :
-    self.hex = '#48D1CC'
-
-cdef class MediumSeaGreen (Color) :
-  def __init__(self) :
-    self.hex = '#3CB371'
-
-cdef class MediumVioletRed (Color) :
-  def __init__(self) :
-    self.hex = '#C71585'
-
-cdef class MintCream (Color) :
-  def __init__(self) :
-    self.hex = '#F5FFFA'
-
-cdef class Moccasin (Color) :
-  def __init__(self) :
-    self.hex = '#FFE4B5'
-
-cdef class MediumBlue (Color) :
-  def __init__(self) :
-    self.hex = '#0000CD'
-
-cdef class MediumPurple (Color) :
-  def __init__(self) :
-    self.hex = '#9370D8'
+mediumAquaMarine       = Color ( hex='#66CDAA' )
+midnightBlue           = Color ( hex='#191970' )
+magenta                = Color ( hex='#FF00FF' )
+mistyRose              = Color ( hex='#FFE4E1' )
+mediumSpringGreen      = Color ( hex='#00FA9A' )
+mediumSlateBlue        = Color ( hex='#7B68EE' )
+mediumOrchid           = Color ( hex='#BA55D3' )
+maroon                 = Color ( hex='#800000' )
+mediumTurquoise        = Color ( hex='#48D1CC' )
+mediumSeaGreen         = Color ( hex='#3CB371' )
+mediumVioletRed        = Color ( hex='#C71585' )
+mintCream              = Color ( hex='#F5FFFA' )
+moccasin               = Color ( hex='#FFE4B5' )
+mediumBlue             = Color ( hex='#0000CD' )
+mediumPurple           = Color ( hex='#9370D8' )

Modified: trunk/pysoy/src/colors/n.pxi
===================================================================
--- trunk/pysoy/src/colors/n.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/n.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.N* classes
+# PySoy colors.n* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,10 +17,5 @@
 #
 # $Id$
 
-cdef class Navy (Color) :
-  def __init__(self) :
-    self.hex = '#000080'
-
-cdef class NavajoWhite (Color) :
-  def __init__(self) :
-    self.hex = '#FFDEAD'
+navy                   = Color ( hex='#000080' )
+navajoWhite            = Color ( hex='#FFDEAD' )

Modified: trunk/pysoy/src/colors/o.pxi
===================================================================
--- trunk/pysoy/src/colors/o.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/o.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.O* classes
+# PySoy colors.o* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,26 +17,9 @@
 #
 # $Id$
 
-cdef class OldLace (Color) :
-  def __init__(self) :
-    self.hex = '#FDF5E6'
-
-cdef class OrangeRed (Color) :
-  def __init__(self) :
-    self.hex = '#FF4500'
-
-cdef class Orchid (Color) :
-  def __init__(self) :
-    self.hex = '#DA70D6'
-
-cdef class Olive (Color) :
-  def __init__(self) :
-    self.hex = '#808000'
-
-cdef class Orange (Color) :
-  def __init__(self) :
-    self.hex = '#FFA500'
-
-cdef class OliveDrab (Color) :
-  def __init__(self) :
-    self.hex = '#6B8E23'
+oldLace                = Color ( hex='#FDF5E6' )
+orangeRed              = Color ( hex='#FF4500' )
+orchid                 = Color ( hex='#DA70D6' )
+olive                  = Color ( hex='#808000' )
+orange                 = Color ( hex='#FFA500' )
+oliveDrab              = Color ( hex='#6B8E23' )

Modified: trunk/pysoy/src/colors/p.pxi
===================================================================
--- trunk/pysoy/src/colors/p.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/p.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.P* classes
+# PySoy colors.p* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,50 +17,15 @@
 #
 # $Id$
 
-cdef class Peru (Color) :
-  def __init__(self) :
-    self.hex = '#CD853F'
-
-cdef class PaleGreen (Color) :
-  def __init__(self) :
-    self.hex = '#98FB98'
-
-cdef class PaleVioletRed (Color) :
-  def __init__(self) :
-    self.hex = '#D87093'
-
-cdef class PowderBlue (Color) :
-  def __init__(self) :
-    self.hex = '#B0E0E6'
-
-cdef class PeachPuff (Color) :
-  def __init__(self) :
-    self.hex = '#FFDAB9'
-
-cdef class Pearl (Color) :
-  def __init__(self) :
-    self.hex = '#FAFFC7'
-
-cdef class PapayaWhip (Color) :
-  def __init__(self) :
-    self.hex = '#FFEFD5'
-
-cdef class Pink (Color) :
-  def __init__(self) :
-    self.hex = '#FFC0CB'
-
-cdef class Purple (Color) :
-  def __init__(self) :
-    self.hex = '#800080'
-
-cdef class Plum (Color) :
-  def __init__(self) :
-    self.hex = '#DDA0DD'
-
-cdef class PaleTurquoise (Color) :
-  def __init__(self) :
-    self.hex = '#AFEEEE'
-
-cdef class PaleGoldenRod (Color) :
-  def __init__(self) :
-    self.hex = '#EEE8AA'
+peru                   = Color ( hex='#CD853F' )
+paleGreen              = Color ( hex='#98FB98' )
+paleVioletRed          = Color ( hex='#D87093' )
+powderBlue             = Color ( hex='#B0E0E6' )
+peachPuff              = Color ( hex='#FFDAB9' )
+pearl                  = Color ( hex='#FAFFC7' )
+papayaWhip             = Color ( hex='#FFEFD5' )
+pink                   = Color ( hex='#FFC0CB' )
+purple                 = Color ( hex='#800080' )
+plum                   = Color ( hex='#DDA0DD' )
+paleTurquoise          = Color ( hex='#AFEEEE' )
+paleGoldenRod          = Color ( hex='#EEE8AA' )

Modified: trunk/pysoy/src/colors/r.pxi
===================================================================
--- trunk/pysoy/src/colors/r.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/r.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.R* classes
+# PySoy colors.r* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,14 +17,6 @@
 #
 # $Id$
 
-cdef class Red (Color) :
-  def __init__(self) :
-    self.hex = '#FF0000'
-
-cdef class RoyalBlue (Color) :
-  def __init__(self) :
-    self.hex = '#4169E1'
-
-cdef class RosyBrown (Color) :
-  def __init__(self) :
-    self.hex = '#BC8F8F'
+red                    = Color ( hex='#FF0000' )
+royalBlue              = Color ( hex='#4169E1' )
+rosyBrown              = Color ( hex='#BC8F8F' )

Modified: trunk/pysoy/src/colors/s.pxi
===================================================================
--- trunk/pysoy/src/colors/s.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/s.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.S* classes
+# PySoy colors.s* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,62 +17,18 @@
 #
 # $Id$
 
-cdef class SpringGreen (Color) :
-  def __init__(self) :
-    self.hex = '#00FF7F'
-
-cdef class SkyBlue (Color) :
-  def __init__(self) :
-    self.hex = '#87CEEB'
-
-cdef class Salmon (Color) :
-  def __init__(self) :
-    self.hex = '#FA8072'
-
-cdef class SlateGrey (Color) :
-  def __init__(self) :
-    self.hex = '#708090'
-
-cdef class Silver (Color) :
-  def __init__(self) :
-    self.hex = '#C0C0C0'
-
-cdef class SaddleBrown (Color) :
-  def __init__(self) :
-    self.hex = '#8B4513'
-
-cdef class Sienna (Color) :
-  def __init__(self) :
-    self.hex = '#A0522D'
-
-cdef class SeaShell (Color) :
-  def __init__(self) :
-    self.hex = '#FFF5EE'
-
-cdef class SlateGray (Color) :
-  def __init__(self) :
-    self.hex = '#708090'
-
-cdef class SeaGreen (Color) :
-  def __init__(self) :
-    self.hex = '#2E8B57'
-
-cdef class Snow (Color) :
-  def __init__(self) :
-    self.hex = '#FFFAFA'
-
-cdef class SlateBlue (Color) :
-  def __init__(self) :
-    self.hex = '#6A5ACD'
-
-cdef class SteelBlue (Color) :
-  def __init__(self) :
-    self.hex = '#4682B4'
-
-cdef class SandyBrown (Color) :
-  def __init__(self) :
-    self.hex = '#F4A460'
-
-cdef class StainlessSteel (Color):
-  def __init__(self) :
-    self.hex = '#E0DFDB'
+springGreen            = Color ( hex='#00FF7F' )
+skyBlue                = Color ( hex='#87CEEB' )
+salmon                 = Color ( hex='#FA8072' )
+slateGrey              = Color ( hex='#708090' )
+silver                 = Color ( hex='#C0C0C0' )
+saddleBrown            = Color ( hex='#8B4513' )
+sienna                 = Color ( hex='#A0522D' )
+seaShell               = Color ( hex='#FFF5EE' )
+slateGray              = Color ( hex='#708090' )
+seaGreen               = Color ( hex='#2E8B57' )
+snow                   = Color ( hex='#FFFAFA' )
+slateBlue              = Color ( hex='#6A5ACD' )
+steelBlue              = Color ( hex='#4682B4' )
+sandyBrown             = Color ( hex='#F4A460' )
+stainlessSteel         = Color ( hex='#E0DFDB' )

Modified: trunk/pysoy/src/colors/t.pxi
===================================================================
--- trunk/pysoy/src/colors/t.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/t.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.T* classes
+# PySoy colors.t* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,22 +17,8 @@
 #
 # $Id$
 
-cdef class Tan (Color) :
-  def __init__(self) :
-    self.hex = '#D2B48C'
-
-cdef class Tomato (Color) :
-  def __init__(self) :
-    self.hex = '#FF6347'
-
-cdef class Teal (Color) :
-  def __init__(self) :
-    self.hex = '#008080'
-
-cdef class Thistle (Color) :
-  def __init__(self) :
-    self.hex = '#D8BFD8'
-
-cdef class Turquoise (Color) :
-  def __init__(self) :
-    self.hex = '#40E0D0'
+tan                    = Color ( hex='#D2B48C' )
+tomato                 = Color ( hex='#FF6347' )
+teal                   = Color ( hex='#008080' )
+thistle                = Color ( hex='#D8BFD8' )
+turquoise              = Color ( hex='#40E0D0' )

Modified: trunk/pysoy/src/colors/v.pxi
===================================================================
--- trunk/pysoy/src/colors/v.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/v.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.V* classes
+# PySoy colors.v* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,10 +17,5 @@
 #
 # $Id$
 
-cdef class Violet (Color) :
-  def __init__(self) :
-    self.hex = '#ee82ee'
-    
-cdef class VeryLightBlueGreen (Color) :
-  def __init__(self) :
-    self.hex = '#2bafed'
+violet                 = Color ( hex='#ee82ee' )
+veryLightBlueGreen     = Color ( hex='#2bafed' )

Modified: trunk/pysoy/src/colors/w.pxi
===================================================================
--- trunk/pysoy/src/colors/w.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/w.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.W* classes
+# PySoy colors.w* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,15 +17,6 @@
 #
 # $Id$
 
-cdef class Wheat (Color) :
-  def __init__(self) :
-    self.hex = '#f5deb3'
-
-cdef class White (Color) :
-  def __init__(self) :
-    self.hex = '#ffffff'
-
-cdef class WhiteSmoke (Color) :
-  def __init__(self) :
-    self.hex = '#f5f5f5'
-
+wheat                  = Color ( hex='#f5deb3' )
+white                  = Color ( hex='#ffffff' )
+whiteSmoke             = Color ( hex='#f5f5f5' )

Modified: trunk/pysoy/src/colors/y.pxi
===================================================================
--- trunk/pysoy/src/colors/y.pxi        2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/colors/y.pxi        2008-02-12 12:03:19 UTC (rev 870)
@@ -1,4 +1,4 @@
-# PySoy colors.Y* classes
+# PySoy colors.y* objects
 #
 # Copyright (C) 2006,2007,2008 PySoy Group
 #
@@ -17,10 +17,5 @@
 #
 # $Id$
 
-cdef class Yellow (Color) :
-  def __init__(self) :
-    self.hex = '#ffff00'
-
-cdef class YellowGreen (Color) :
-  def __init__(self) :
-    self.hex = '#9acd32'
+yellow                 = Color ( hex='#ffff00' )
+yellowGreen            = Color ( hex='#9acd32' )

Modified: trunk/pysoy/src/materials/A.pxi
===================================================================
--- trunk/pysoy/src/materials/A.pxi     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/materials/A.pxi     2008-02-12 12:03:19 UTC (rev 870)
@@ -18,12 +18,12 @@
 # $Id$
 
 cdef class Aventurine (Material) :
-       '''PySoy material.Aventurine
-       
-          This default material is intended to look like green aventurine
-       '''
-       def __init__(self) :
-               self.ambient = soy.colors.Aventurine()
-               self.diffuse = soy.colors.Aventurine()
-               self.specular = soy.colors.Teal()
-               self.shininess = 10
+  '''PySoy material.Aventurine
+
+     This default material is intended to look like green aventurine
+  '''
+  def __init__(self) :
+    self.ambient = soy.colors.aventurine
+    self.diffuse = soy.colors.aventurine
+    self.specular = soy.colors.teal
+    self.shininess = 10

Modified: trunk/pysoy/src/materials/B.pxi
===================================================================
--- trunk/pysoy/src/materials/B.pxi     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/materials/B.pxi     2008-02-12 12:03:19 UTC (rev 870)
@@ -18,12 +18,12 @@
 # $Id$
 
 cdef class Basalt (Material) :
-       '''Pysoy materials.Basalt
-          
-          This default material is intended to look like the igneous rock - 
basalt
-       '''
-       def __init__(self) :
-               self.ambient = soy.colors.Basalt()
-               self.diffuse = soy.colors.Basalt()
-               self.specular = soy.colors.Basalt()
-               self.shininess = 4
+  '''Pysoy materials.Basalt
+   
+     This default material is intended to look like the igneous rock - basalt
+  '''
+  def __init__(self) :
+    self.ambient = soy.colors.basalt
+    self.diffuse = soy.colors.basalt
+    self.specular = soy.colors.basalt
+    self.shininess = 4

Modified: trunk/pysoy/src/materials/C.pxi
===================================================================
--- trunk/pysoy/src/materials/C.pxi     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/materials/C.pxi     2008-02-12 12:03:19 UTC (rev 870)
@@ -18,24 +18,24 @@
 # $Id$
 
 cdef class Copper (Material) :
-       '''Pysoy materials.Copper
+  '''Pysoy materials.Copper
        
-          This default material is intended to look like copper
-       '''
-       def __init__(self) :
-               self.ambient = soy.colors.Copper()
-               self.diffuse = soy.colors.Copper()
-               self.specular = soy.colors.Yellow()
-               self.shininess = 5
-               
+     This default material is intended to look like copper
+  '''
+  def __init__(self) :
+    self.ambient = soy.colors.copper
+    self.diffuse = soy.colors.copper
+    self.specular = soy.colors.yellow
+    self.shininess = 5
 
+
 cdef class CopperSulfate (Material) :
-       '''Pysoy materials.CopperSulfate
-       
-          This default material is intended to look like the crystal of 
Copper(II) Sulfate
-       '''
-       def __init__(self) :
-               self.ambient = soy.colors.CopperSulfate()
-               self.diffuse = soy.colors.CopperSulfate()
-               self.specular = soy.colors.VeryLightBlueGreen()
-               self.shininess = 10
+  '''Pysoy materials.CopperSulfate
+
+     This default material is intended to look like the crystal of Copper(II) 
Sulfate
+  '''
+  def __init__(self) :
+    self.ambient = soy.colors.copperSulfate
+    self.diffuse = soy.colors.copperSulfate
+    self.specular = soy.colors.veryLightBlueGreen
+    self.shininess = 10

Modified: trunk/pysoy/src/materials/D.pxi
===================================================================
--- trunk/pysoy/src/materials/D.pxi     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/materials/D.pxi     2008-02-12 12:03:19 UTC (rev 870)
@@ -18,12 +18,12 @@
 # $Id$
 
 cdef class DarkWood (Material) :
-       '''Pysoy materials.DarkWood
-       
-          This default material is intended to look like dark wood
-       '''
-       def __init__(self) :
-               self.ambient = soy.colors.DarkWood()
-               self.diffuse = soy.colors.DarkWood()
-               self.specular = soy.colors.DarkWood()
-               self.shininess = 0
+  '''Pysoy materials.DarkWood
+
+     This default material is intended to look like dark wood
+  '''
+  def __init__(self) :
+    self.ambient = soy.colors.darkWood
+    self.diffuse = soy.colors.darkWood
+    self.specular = soy.colors.darkWood
+    self.shininess = 0

Modified: trunk/pysoy/src/materials/Material.pxi
===================================================================
--- trunk/pysoy/src/materials/Material.pxi      2008-02-12 10:29:29 UTC (rev 
869)
+++ trunk/pysoy/src/materials/Material.pxi      2008-02-12 12:03:19 UTC (rev 
870)
@@ -40,17 +40,17 @@
     if ambient :
       self._ambient = ambient
     else :
-      self._ambient = soy.colors.White()
+      self._ambient = soy.colors.white
 
     if diffuse :
       self._diffuse = diffuse
     else :
-      self._diffuse = soy.colors.White()
+      self._diffuse = soy.colors.white
 
     if specular :
       self._specular = specular
     else :
-      self._specular = soy.colors.White()
+      self._specular = soy.colors.white
 
     self._shininess = .5
 
@@ -58,7 +58,7 @@
     self._blend_func_dst = gl.GL_ONE_MINUS_SRC_ALPHA
     self._shadeless      = 0
 
-    self._emissive = soy.colors.Black()
+    self._emissive = soy.colors.black
 
 
 
@@ -66,32 +66,32 @@
     return '<Material>'
 
   cdef int _is_transparent(self):
-      cdef gl.GLfloat _ambient[4]
-      cdef gl.GLfloat _diffuse[4]
-      cdef gl.GLfloat _specular[4]
+    cdef gl.GLfloat _ambient[4]
+    cdef gl.GLfloat _diffuse[4]
+    cdef gl.GLfloat _specular[4]
 
-      (<soy.colors.Color> self._ambient)._getRGBA(_ambient)
-      (<soy.colors.Color> self._diffuse)._getRGBA(_diffuse)
-      (<soy.colors.Color> self._specular)._getRGBA(_specular)
+    (<soy.colors.Color> self._ambient)._getRGBA(_ambient)
+    (<soy.colors.Color> self._diffuse)._getRGBA(_diffuse)
+    (<soy.colors.Color> self._specular)._getRGBA(_specular)
 
-      if self._color:
-          if ( <soy.textures.Texture> self._color)._chans %2 == 0:
-              return 1
-          else:
-              return 0
+    if self._color:
+      if ( <soy.textures.Texture> self._color)._chans %2 == 0:
+        return 1
       else:
-          if _ambient[3] != 1.0:
-              return 1
-          if _diffuse[3] != 1.0:
-              return 1
-          if _specular[3] != 1.0:
-              return 1
-          return 0
+        return 0
+    else:
+      if _ambient[3] != 1.0:
+        return 1
+      if _diffuse[3] != 1.0:
+        return 1
+      if _specular[3] != 1.0:
+        return 1
+      return 0
 
   cdef int _has_bumpmap(self):
-      if self._normal:
-          return 1
-      return 0
+    if self._normal:
+      return 1
+    return 0
 
   cdef void _coreBind(self) :
     cdef gl.GLfloat _ambient[4]
@@ -111,75 +111,69 @@
       gl.glShadeModel(gl.GL_FLAT)
 
     if self._shadeless:
-        gl.glDisable(gl.GL_LIGHTING)
-        gl.glColor4f(_diffuse[0], _diffuse[1], _diffuse[2], _diffuse[3])
+      gl.glDisable(gl.GL_LIGHTING)
+      gl.glColor4f(_diffuse[0], _diffuse[1], _diffuse[2], _diffuse[3])
     else: 
-        gl.glMaterialfv(gl.GL_FRONT, gl.GL_AMBIENT, _ambient)
-        gl.glMaterialfv(gl.GL_FRONT, gl.GL_DIFFUSE, _diffuse)
-        gl.glMaterialf (gl.GL_FRONT, gl.GL_SHININESS, self._shininess)    
-        gl.glMaterialfv(gl.GL_FRONT, gl.GL_SPECULAR, _specular)
-        gl.glMaterialfv(gl.GL_FRONT, gl.GL_EMISSION, _emissive)
+      gl.glMaterialfv(gl.GL_FRONT, gl.GL_AMBIENT, _ambient)
+      gl.glMaterialfv(gl.GL_FRONT, gl.GL_DIFFUSE, _diffuse)
+      gl.glMaterialf (gl.GL_FRONT, gl.GL_SHININESS, self._shininess)    
+      gl.glMaterialfv(gl.GL_FRONT, gl.GL_SPECULAR, _specular)
+      gl.glMaterialfv(gl.GL_FRONT, gl.GL_EMISSION, _emissive)
 
     if self._color :
       (<soy.textures.Texture> self._color)._coreBind()
 
     if self._has_bumpmap():
-        gl.glEnable(gl.GL_BLEND)
-        gl.glBlendFunc(gl.GL_DST_COLOR, gl.GL_ZERO)
-        gl.glEnable(gl.GL_POLYGON_OFFSET_FILL)
-        gl.glPolygonOffset(0,-2)
+      gl.glEnable(gl.GL_BLEND)
+      gl.glBlendFunc(gl.GL_DST_COLOR, gl.GL_ZERO)
+      gl.glEnable(gl.GL_POLYGON_OFFSET_FILL)
+      gl.glPolygonOffset(0,-2)
     elif self._is_transparent():
-        gl.glEnable(gl.GL_BLEND)
-        gl.glBlendFunc(self._blend_func_src, self._blend_func_dst)
+      gl.glEnable(gl.GL_BLEND)
+      gl.glBlendFunc(self._blend_func_src, self._blend_func_dst)
 
   cdef void _coreUnBind(self) :
     if self._color :
       (<soy.textures.Texture> self._color)._coreUnBind()
 
     if self._has_bumpmap():
-        gl.glDisable(gl.GL_BLEND)
-        gl.glDisable(gl.GL_POLYGON_OFFSET_FILL)
-        gl.glPolygonOffset(0,0)
+      gl.glDisable(gl.GL_BLEND)
+      gl.glDisable(gl.GL_POLYGON_OFFSET_FILL)
+      gl.glPolygonOffset(0,0)
     elif self._is_transparent():
-        gl.glDisable(gl.GL_BLEND)
+      gl.glDisable(gl.GL_BLEND)
 
     if self._shadeless:
-        gl.glEnable(gl.GL_LIGHTING)
+      gl.glEnable(gl.GL_LIGHTING)
 
   cdef void _coreBindBumpPass(self) :
-      if self._has_bumpmap():
+    if not self._has_bumpmap() :
+      return
+    if not _normalisation_cube_map._was_created :
+      _normalisation_cube_map._generate(32,32)
+    gl.glActiveTexture(gl.GL_TEXTURE0)
+    (<soy.textures.Texture> self._normal)._coreBind()
+    gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_COMBINE);
+    gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_SOURCE0_RGB,  gl.GL_TEXTURE);
+    gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_COMBINE_RGB,  gl.GL_REPLACE);
+    gl.glActiveTexture(gl.GL_TEXTURE1)
+    _normalisation_cube_map._coreBind()
+    gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_COMBINE);
+    gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_SOURCE0_RGB,  gl.GL_TEXTURE);
+    gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_COMBINE_RGB,  gl.GL_DOT3_RGB);
+    gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_SOURCE1_RGB,  gl.GL_PREVIOUS);
+    gl.glActiveTexture(gl.GL_TEXTURE0)
 
-        if not _normalisation_cube_map._was_created:
-            _normalisation_cube_map._generate(32,32)
-
-        gl.glActiveTexture(gl.GL_TEXTURE0)
-        (<soy.textures.Texture> self._normal)._coreBind()
-
-        gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_COMBINE);
-        gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_SOURCE0_RGB,  gl.GL_TEXTURE);
-        gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_COMBINE_RGB,  gl.GL_REPLACE);
-
-        gl.glActiveTexture(gl.GL_TEXTURE1)
-        _normalisation_cube_map._coreBind()
-
-        gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_COMBINE);
-        gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_SOURCE0_RGB,  gl.GL_TEXTURE);
-        gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_COMBINE_RGB,  gl.GL_DOT3_RGB);
-        gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_SOURCE1_RGB,  gl.GL_PREVIOUS);
-
-        gl.glActiveTexture(gl.GL_TEXTURE0)
-
   cdef void _coreUnBindBumpPass(self) :
-      if self._has_bumpmap():
-        gl.glActiveTexture(gl.GL_TEXTURE0)
-        (<soy.textures.Texture> self._normal)._coreUnBind()
-        gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_MODULATE)
+    if not self._has_bumpmap() :
+      return
+    gl.glActiveTexture(gl.GL_TEXTURE0)
+    (<soy.textures.Texture> self._normal)._coreUnBind()
+    gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_MODULATE)
+    gl.glActiveTexture(gl.GL_TEXTURE1)
+    _normalisation_cube_map._coreUnBind()
+    gl.glActiveTexture(gl.GL_TEXTURE0)
 
-        gl.glActiveTexture(gl.GL_TEXTURE1)
-        _normalisation_cube_map._coreUnBind()
-
-        gl.glActiveTexture(gl.GL_TEXTURE0)
-
   property color :
     def __get__(self) :
       return self._color
@@ -189,12 +183,12 @@
       self._color = None
   
   property normal:
-      def __get__(self):
-          return self._normal
-      def __set__(self, soy.textures.Texture val):
-          self._normal = val
-      def __del__(self):
-          self._normal = None
+    def __get__(self):
+      return self._normal
+    def __set__(self, soy.textures.Texture val):
+      self._normal = val
+    def __del__(self):
+      self._normal = None
 
   property ambient :
     def __get__(self) :
@@ -202,7 +196,7 @@
     def __set__(self, soy.colors.Color value) :
       self._ambient = value
     def __del__(self) :
-      self._ambient = soy.colors.Gray()
+      self._ambient = soy.colors.gray
 
 
   property diffuse :
@@ -211,7 +205,7 @@
     def __set__(self, soy.colors.Color value) :
       self._diffuse = value
     def __del__(self) :
-      self._diffuse = soy.colors.White()
+      self._diffuse = soy.colors.white
 
 
   property shades :
@@ -256,7 +250,7 @@
       else :
         raise TypeError('must be a soy.color')
     def __del__(self) :
-      self._specular=soy.colors.White()
+      self._specular=soy.colors.white
 
   property emissive :
     def __get__(self) :
@@ -267,32 +261,30 @@
       else :
         raise TypeError('must be a soy.color')
     def __del__(self) :
-      self._emissive=soy.colors.Black()
+      self._emissive=soy.colors.black
 
   property blend_func_src:
-      def __get__(self):
-          return self._blend_func_src
-      def __set__(self,val):
-          self._blend_func_src = val
+    def __get__(self):
+      return self._blend_func_src
+    def __set__(self,val):
+      self._blend_func_src = val
 
   property blend_func_dst:
-      def __get__(self):
-          return self._blend_func_dst
-      def __set__(self,val):
-          self._blend_func_dst = val
+    def __get__(self):
+      return self._blend_func_dst
+    def __set__(self,val):
+      self._blend_func_dst = val
   
   property transparent:
-      def __get__(self):
-          return self._is_transparent()
+    def __get__(self):
+      return self._is_transparent()
 
   property has_bumpmap:
-      def __get__(self):
-          return self._has_bumpmap()
+    def __get__(self):
+      return self._has_bumpmap()
 
   property shadeless:
-      def __get__(self):
-          return self._shadeless
-      def __set__(self,val):
-          self._shadeless = val
-
-
+    def __get__(self):
+      return self._shadeless
+    def __set__(self,val):
+      self._shadeless = val

Modified: trunk/pysoy/src/materials/P.pxi
===================================================================
--- trunk/pysoy/src/materials/P.pxi     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/materials/P.pxi     2008-02-12 12:03:19 UTC (rev 870)
@@ -18,12 +18,12 @@
 # $Id$
 
 cdef class Pearl (Material) :
-       '''Pysoy materials.Pearl
-       
-          This material is intended to look like Yule Marble
-       '''
-       def __init__(self):
-               self.ambient = soy.colors.White()
-               self.diffuse = soy.colors.White()
-               self.specular = soy.colors.LightPink()
-               self.shininess = 10
+  '''Pysoy materials.Pearl
+
+     This material is intended to look like Yule Marble
+  '''
+  def __init__(self):
+    self.ambient = soy.colors.white
+    self.diffuse = soy.colors.white
+    self.specular = soy.colors.lightPink
+    self.shininess = 10

Modified: trunk/pysoy/src/materials/R.pxi
===================================================================
--- trunk/pysoy/src/materials/R.pxi     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/materials/R.pxi     2008-02-12 12:03:19 UTC (rev 870)
@@ -18,12 +18,12 @@
 # $Id$
 
 cdef class Rhodonite (Material) :
-       '''PySoy materials.Rhodonite
-       
-          This default material is intended to look like rhodonite, a pink gem.
-       '''
-       def __init__(self):
-               self.ambient = soy.colors.DeepPink()
-               self.diffuse = soy.colors.Pink()
-               self.specular = soy.colors.LightPink()
-               self.shininess = 8
+  '''PySoy materials.Rhodonite
+
+     This default material is intended to look like rhodonite, a pink gem.
+  '''
+  def __init__(self):
+    self.ambient = soy.colors.deepPink
+    self.diffuse = soy.colors.pink
+    self.specular = soy.colors.lightPink
+    self.shininess = 8

Modified: trunk/pysoy/src/materials/S.pxi
===================================================================
--- trunk/pysoy/src/materials/S.pxi     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/materials/S.pxi     2008-02-12 12:03:19 UTC (rev 870)
@@ -23,7 +23,7 @@
      This default material is intended to look like stainless steel.
   '''
   def __init__(self) :
-    self.ambient = soy.colors.StainlessSteel()
-    self.diffuse = soy.colors.StainlessSteel()
-    self.specular = soy.colors.White()
+    self.ambient = soy.colors.stainlessSteel
+    self.diffuse = soy.colors.stainlessSteel
+    self.specular = soy.colors.white
     self.shininess = 9

Modified: trunk/pysoy/src/materials/V.pxi
===================================================================
--- trunk/pysoy/src/materials/V.pxi     2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/materials/V.pxi     2008-02-12 12:03:19 UTC (rev 870)
@@ -18,13 +18,12 @@
 # $Id$
 
 cdef class VelvetyRed (Material) :
-       '''Pysoy materials.VelvetyRed
-       
-          This class is intended to look like Red Velvet
-       '''
-       def __init__(self) :
-               self.ambient = soy.colors.Red()
-               self.diffuse = soy.colors.Red()
-               self.specular = soy.colors.Red()
-               self.shininess = 0
-       
+  '''Pysoy materials.VelvetyRed
+
+     This class is intended to look like Red Velvet
+  '''
+  def __init__(self) :
+    self.ambient = soy.colors.red
+    self.diffuse = soy.colors.red
+    self.specular = soy.colors.red
+    self.shininess = 0

Modified: trunk/pysoy/src/meshes/Liquid.pxi
===================================================================
--- trunk/pysoy/src/meshes/Liquid.pxi   2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/meshes/Liquid.pxi   2008-02-12 12:03:19 UTC (rev 870)
@@ -5,7 +5,8 @@
 cimport soy.scenes
 
 cdef class Liquid(Mesh):
-  def __cinit__(self, liquid_size=(1,1,1), fog_color=soy.colors.Blue(), 
liquid_mat=soy.materials.StainlessSteel()   ):
+  def __cinit__(self, liquid_size=(1,1,1), fog_color=soy.colors.blue, 
+                liquid_mat=soy.materials.StainlessSteel) :
     self._liquid_mat = liquid_mat
     self._liquid_size[0] = liquid_size[0]
     self._liquid_size[1] = liquid_size[1]

Modified: trunk/pysoy/src/scenes/Scene.pxi
===================================================================
--- trunk/pysoy/src/scenes/Scene.pxi    2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/scenes/Scene.pxi    2008-02-12 12:03:19 UTC (rev 870)
@@ -36,7 +36,7 @@
     self._spaceID  = ode.dSimpleSpaceCreate(NULL)
     self._stepSize = 0.01
     self._prevTime = _time()
-    self._ambient  = soy.colors.Gray()
+    self._ambient  = soy.colors.gray
     _scenes.lock()
     _scenes.append(<void *>self)
     _scenes.unlock()
@@ -150,7 +150,7 @@
     This is the ambient light for the scene.  When no light is used this is 
     the only light available in the scene - use it well.
 
-    Defaults to soy.colors.Gray().
+    Defaults to soy.colors.gray
     '''
     def __get__(self) :
       return self._ambient

Modified: trunk/pysoy/src/textures/Print.pxi
===================================================================
--- trunk/pysoy/src/textures/Print.pxi  2008-02-12 10:29:29 UTC (rev 869)
+++ trunk/pysoy/src/textures/Print.pxi  2008-02-12 12:03:19 UTC (rev 870)
@@ -41,11 +41,11 @@
     if background :
       self._background = background
     else :
-      self._background = soy.colors.Clear()
+      self._background = soy.colors.clear
     if foreground :
       self._foreground = foreground
     else :
-      self._foreground = soy.colors.White()
+      self._foreground = soy.colors.white
     self.text = text
     self.font = font
 
@@ -56,7 +56,7 @@
       self._background = value
       self._draw()
     def __del__(self) :
-      self._background = soy.colors.Clear()
+      self._background = soy.colors.clear
 
 
   property foreground :
@@ -66,7 +66,7 @@
       self._foreground = value
       self._draw()
     def __del__(self) :
-      self._foreground = soy.colors.Clear()
+      self._foreground = soy.colors.clear
     
     
   property text :

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to