Use epydoc for generating game python reference (like the bpython guys)
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Mon, 31 May 2004 13:06:04 +0000 (13:06 +0000)
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Mon, 31 May 2004 13:06:04 +0000 (13:06 +0000)
14 files changed:
source/gameengine/PyDoc/GameKeys.py
source/gameengine/PyDoc/GameLogic.py
source/gameengine/PyDoc/KX_CDActuator.py
source/gameengine/PyDoc/KX_Camera.py
source/gameengine/PyDoc/KX_GameObject.py
source/gameengine/PyDoc/KX_Light.py
source/gameengine/PyDoc/KX_MeshProxy.py
source/gameengine/PyDoc/KX_NetworkMessageSensor.py
source/gameengine/PyDoc/KX_VertexProxy.py
source/gameengine/PyDoc/Makefile
source/gameengine/PyDoc/SCA_ANDController.py
source/gameengine/PyDoc/SCA_ILogicBrick.py
source/gameengine/PyDoc/SCA_ISensor.py
source/gameengine/PyDoc/SCA_PropertySensor.py

index 58fc53b0961c75d37a3ff43bda34689196135d90..8dbc040368b81e18bc5ef6003ce0cef7fb8d2122 100644 (file)
 # $Id$
 """
 Documentation for the GameKeys module.
+======================================
 
 This module holds key constants for the SCA_KeyboardSensor.
 
-Alphabet keys:
-       AKEY
-       BKEY
-       CKEY
-       DKEY
-       EKEY
-       FKEY
-       GKEY
-       HKEY
-       IKEY
-       JKEY
-       KKEY
-       LKEY
-       MKEY
-       NKEY
-       OKEY
-       PKEY
-       QKEY
-       RKEY
-       SKEY
-       TKEY
-       UKEY
-       VKEY
-       WKEY
-       XKEY
-       YKEY
-       ZKEY
+Alphabet keys
+-------------
+       - AKEY
+       - BKEY
+       - CKEY
+       - DKEY
+       - EKEY
+       - FKEY
+       - GKEY
+       - HKEY
+       - IKEY
+       - JKEY
+       - KKEY
+       - LKEY
+       - MKEY
+       - NKEY
+       - OKEY
+       - PKEY
+       - QKEY
+       - RKEY
+       - SKEY
+       - TKEY
+       - UKEY
+       - VKEY
+       - WKEY
+       - XKEY
+       - YKEY
+       - ZKEY
 
-Number keys:
-       ZEROKEY
-       ONEKEY
-       TWOKEY
-       THREEKEY
-       FOURKEY
-       FIVEKEY
-       SIXKEY
-       SEVENKEY
-       EIGHTKEY
-       NINEKEY
+Number keys
+-----------
+       - ZEROKEY
+       - ONEKEY
+       - TWOKEY
+       - THREEKEY
+       - FOURKEY
+       - FIVEKEY
+       - SIXKEY
+       - SEVENKEY
+       - EIGHTKEY
+       - NINEKEY
 
-Shift Modifiers:
-       CAPSLOCKKEY
+Shift Modifiers
+---------------
+       - CAPSLOCKKEY
 
-       LEFTCTRLKEY
-       LEFTALTKEY
-       RIGHTALTKEY
-       RIGHTCTRLKEY
-       RIGHTSHIFTKEY
-       LEFTSHIFTKEY
+       LEFTCTRLKEY
+       LEFTALTKEY
+       RIGHTALTKEY
+       RIGHTCTRLKEY
+       RIGHTSHIFTKEY
+       LEFTSHIFTKEY
 
-Arrow Keys:
-       LEFTARROWKEY
-       DOWNARROWKEY
-       RIGHTARROWKEY
-       UPARROWKEY
+Arrow Keys
+----------
+       - LEFTARROWKEY
+       - DOWNARROWKEY
+       - RIGHTARROWKEY
+       - UPARROWKEY
 
-Numberpad Keys:
-       PAD0
-       PAD1
-       PAD2
-       PAD3
-       PAD4
-       PAD5
-       PAD6
-       PAD7
-       PAD8
-       PAD9
-       PADPERIOD
-       PADSLASHKEY
-       PADASTERKEY
-       PADMINUS
-       PADENTER
-       PADPLUSKEY
+Numberpad Keys
+--------------
+       - PAD0
+       - PAD1
+       - PAD2
+       - PAD3
+       - PAD4
+       - PAD5
+       - PAD6
+       - PAD7
+       - PAD8
+       - PAD9
+       - PADPERIOD
+       - PADSLASHKEY
+       - PADASTERKEY
+       - PADMINUS
+       - PADENTER
+       - PADPLUSKEY
 
-Function Keys:
-       F1KEY
-       F2KEY
-       F3KEY
-       F4KEY
-       F5KEY
-       F6KEY
-       F7KEY
-       F8KEY
-       F9KEY
-       F10KEY
-       F11KEY
-       F12KEY
+Function Keys
+-------------
+       - F1KEY
+       - F2KEY
+       - F3KEY
+       - F4KEY
+       - F5KEY
+       - F6KEY
+       - F7KEY
+       - F8KEY
+       - F9KEY
+       - F10KEY
+       - F11KEY
+       - F12KEY
 
-Other Keys:
-       ESCKEY
-       TABKEY
-       RETKEY
-       SPACEKEY
-       LINEFEEDKEY
-       BACKSPACEKEY
-       DELKEY
-       SEMICOLONKEY
-       PERIODKEY
-       COMMAKEY
-       QUOTEKEY
-       ACCENTGRAVEKEY
-       MINUSKEY
-       SLASHKEY
-       BACKSLASHKEY
-       EQUALKEY
-       LEFTBRACKETKEY
-       RIGHTBRACKETKEY
-       PAUSEKEY
-       INSERTKEY
-       HOMEKEY
-       PAGEUPKEY
-       PAGEDOWNKEY
-       ENDKEY
+Other Keys
+----------
+       - ESCKEY
+       - TABKEY
+       - RETKEY
+       - SPACEKEY
+       - LINEFEEDKEY
+       - BACKSPACEKEY
+       - DELKEY
+       - SEMICOLONKEY
+       - PERIODKEY
+       - COMMAKEY
+       - QUOTEKEY
+       - ACCENTGRAVEKEY
+       - MINUSKEY
+       - SLASHKEY
+       - BACKSLASHKEY
+       - EQUALKEY
+       - LEFTBRACKETKEY
+       - RIGHTBRACKETKEY
+       - PAUSEKEY
+       - INSERTKEY
+       - HOMEKEY
+       - PAGEUPKEY
+       - PAGEDOWNKEY
+       - ENDKEY
 """
index 05dfd0cd4811a09affe8d008e995df5b8e177e3f..20621fae65937dd751d004104c892aecd39faf29 100644 (file)
@@ -2,46 +2,51 @@
 """
 Documentation for the GameLogic Module.
 
-Constants:
-       KX_TRUE:  True value used by some modules
-       KX_FALSE: False value used by some modules.
+Constants
+=========
+       - KX_TRUE:  True value used by some modules
+       - KX_FALSE: False value used by some modules.
 
-Property Sensor:
+Property Sensor
+---------------
        Tests that the property sensor is able to perform.
-       KX_PROPSENSOR_EQUAL:            Activate when the property is equal to the sensor value.
-       KX_PROPSENSOR_NOTEQUAL          Activate when the property is not equal to the sensor value.
-       KX_PROPSENSOR_INTERVAL          Activate when the property is between the specified limits.
-       KX_PROPSENSOR_CHANGED           Activate when the property changes
-       KX_PROPSENSOR_EXPRESSION        Activate when the expression matches
+               - KX_PROPSENSOR_EQUAL:          Activate when the property is equal to the sensor value.
+               - KX_PROPSENSOR_NOTEQUAL                Activate when the property is not equal to the sensor value.
+               - KX_PROPSENSOR_INTERVAL                Activate when the property is between the specified limits.
+               - KX_PROPSENSOR_CHANGED         Activate when the property changes
+               - KX_PROPSENSOR_EXPRESSION      Activate when the expression matches
 
-Constraint Actuator:
+Constraint Actuator
+-------------------
        The axis and type (location/rotation) of constraint
-       KX_CONSTRAINTACT_LOCX
-       KX_CONSTRAINTACT_LOCY
-       KX_CONSTRAINTACT_LOCZ
-       KX_CONSTRAINTACT_ROTX
-       KX_CONSTRAINTACT_ROTY
-       KX_CONSTRAINTACT_ROTZ
+               - KX_CONSTRAINTACT_LOCX
+               - KX_CONSTRAINTACT_LOCY
+               - KX_CONSTRAINTACT_LOCZ
+               - KX_CONSTRAINTACT_ROTX
+               - KX_CONSTRAINTACT_ROTY
+               - KX_CONSTRAINTACT_ROTZ
 
-IPO Actuator:
+IPO Actuator
+------------
        IPO Types
-       KX_IPOACT_PLAY
-       KX_IPOACT_PINGPONG
-       KX_IPOACT_FLIPPER
-       KX_IPOACT_LOOPSTOP
-       KX_IPOACT_LOOPEND
+               - KX_IPOACT_PLAY
+               - KX_IPOACT_PINGPONG
+               - KX_IPOACT_FLIPPER
+               - KX_IPOACT_LOOPSTOP
+               - KX_IPOACT_LOOPEND
 
-Random distributions:
-       KX_RANDOMACT_BOOL_CONST
-       KX_RANDOMACT_BOOL_UNIFORM
-       KX_RANDOMACT_BOOL_BERNOUILLI
-       KX_RANDOMACT_INT_CONST
-       KX_RANDOMACT_INT_UNIFORM
-       KX_RANDOMACT_INT_POISSON
-       KX_RANDOMACT_FLOAT_CONST
-       KX_RANDOMACT_FLOAT_UNIFORM
-       KX_RANDOMACT_FLOAT_NORMAL
-       KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL
+Random Distributions
+--------------------
+       - KX_RANDOMACT_BOOL_CONST
+       - KX_RANDOMACT_BOOL_UNIFORM
+       - KX_RANDOMACT_BOOL_BERNOUILLI
+       - KX_RANDOMACT_INT_CONST
+       - KX_RANDOMACT_INT_UNIFORM
+       - KX_RANDOMACT_INT_POISSON
+       - KX_RANDOMACT_FLOAT_CONST
+       - KX_RANDOMACT_FLOAT_UNIFORM
+       - KX_RANDOMACT_FLOAT_NORMAL
+       - KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL
 
 """
 
index 12e74f166b52bba999495ef920824329375f21ad..a2fba4a4bb49c13eb1d60175a0c7db837991ab07 100644 (file)
@@ -26,7 +26,7 @@ class KX_CDActuator(SCA_ILogicBrick):
                """
                Gets the current gain (volume) of the CD.
                
-               @rtype float
-               @return Between 0.0 (silent) and 1.0 (max volume)
+               @rtype: float
+               @return: Between 0.0 (silent) and 1.0 (max volume)
                """
 
index 729380ddfb00fa4478129cd2437ccdec499940bd..b0671fb1a74ab6223e0d0191a4f5e6ec73bd13da 100644 (file)
@@ -6,100 +6,105 @@ class KX_Camera(KX_GameObject):
        """
        A Camera object.
        
-       @cvar INSIDE: see sphereInsideFrustum and boxInsideFrustum
-       @cvar INTERSECT: see sphereInsideFrustum and boxInsideFrustum
-       @cvar OUTSIDE: see sphereInsideFrustum and boxInsideFrustum
-       Attributes:
-       @cvar lens: The camera's lens value. float
-       @cvar near: The camera's near clip distance. float
-       @cvar far: The camera's far clip distance. float
-       @cvar frustum_culling: True if this camera is frustum culling. boolean
-       @cvar projection_matrix: This camera's 4x4 projection matrix. [[float]]
-       @cvar modelview_matrix: This camera's 4x4 model view matrix. [[float]] (read only)
-       Regenerated every frame from the camera's position and orientation.
-       @cvar camera_to_world: This camera's camera to world transform. [[float]] (read only)
-       Regenerated every frame from the camera's position and orientation.
-       @cvar world_to_camera: This camera's world to camera transform. [[float]] (read only)
-       Regenerated every frame from the camera's position and orientation.
-       This is camera_to_world inverted.
+       @group Constants: INSIDE, INTERSECT, OUTSIDE
+       @ivar INSIDE: see sphereInsideFrustum() and boxInsideFrustum()
+       @ivar INTERSECT: see sphereInsideFrustum() and boxInsideFrustum()
+       @ivar OUTSIDE: see sphereInsideFrustum() and boxInsideFrustum()
+       
+       @ivar lens: The camera's lens value. 
+       @type lens: float
+       @ivar near: The camera's near clip distance. 
+       @type near: float
+       @ivar far: The camera's far clip distance.
+       @type far: float
+       @ivar frustum_culling: True if this camera is frustum culling. 
+       @type frustum_culling: boolean
+       @ivar projection_matrix: This camera's 4x4 projection matrix.
+       @type projection_matrix: 4x4 Matrix [[float]]
+       @ivar modelview_matrix: This camera's 4x4 model view matrix. (read only)
+                               Regenerated every frame from the camera's position and orientation.
+       @type modelview_matrix: 4x4 Matrix [[float]] 
+       @ivar camera_to_world: This camera's camera to world transform. (read only)
+                              Regenerated every frame from the camera's position and orientation.
+       @type camera_to_world: 4x4 Matrix [[float]]
+       @ivar world_to_camera: This camera's world to camera transform. [[float]] (read only)
+                              Regenerated every frame from the camera's position and orientation.
+                              This is camera_to_world inverted.
+       @type world_to_camera: 4x4 Matrix [[float]]
        """
        
        def sphereInsideFrustum(centre, radius):
                """
                Tests the given sphere against the view frustum.
                
-               @return: INSIDE, OUTSIDE or INTERSECT
-               @type centre: list
                @param centre: The centre of the sphere (in world coordinates.)
-               @type radius: float
+               @type centre: list [x, y, z]
                @param radius: the radius of the sphere
+               @type radius: float
+               @return: INSIDE, OUTSIDE or INTERSECT
                
-               Example:
-               import GameLogic
-               co = GameLogic.getCurrentController()
-               cam = co.GetOwner()
-               
-               # A sphere of radius 4.0 located at [x, y, z] = [1.0, 1.0, 1.0]
-               if (cam.sphereInsideFrustum([1.0, 1.0, 1.0], 4) != cam.OUTSIDE):
-                       # Sphere is inside frustum !
-                       # Do something useful !
-               else:
-                       # Sphere is outside frustum
+               Example::
+                       import GameLogic
+                       co = GameLogic.getCurrentController()
+                       cam = co.GetOwner()
+                       
+                       # A sphere of radius 4.0 located at [x, y, z] = [1.0, 1.0, 1.0]
+                       if (cam.sphereInsideFrustum([1.0, 1.0, 1.0], 4) != cam.OUTSIDE):
+                               # Sphere is inside frustum !
+                               # Do something useful !
+                       else:
+                               # Sphere is outside frustum
                """
        def boxInsideFrustum(box):
                """
                Tests the given box against the view frustum.
                
+               Example::
+                       import GameLogic
+                       co = GameLogic.getCurrentController()
+                       cam = co.GetOwner()
+                       
+                       # Box to test...
+                       box = []
+                       box.append([-1.0, -1.0, -1.0])
+                       box.append([-1.0, -1.0,  1.0])
+                       box.append([-1.0,  1.0, -1.0])
+                       box.append([-1.0,  1.0,  1.0])
+                       box.append([ 1.0, -1.0, -1.0])
+                       box.append([ 1.0, -1.0,  1.0])
+                       box.append([ 1.0,  1.0, -1.0])
+                       box.append([ 1.0,  1.0,  1.0])
+                       
+                       if (cam.boxInsideFrustum(box) != cam.OUTSIDE):
+                               # Box is inside/intersects frustum !
+                               # Do something useful !
+                       else:
+                               # Box is outside the frustum !
+               
                @return: INSIDE, OUTSIDE or INTERSECT
                @type box: list
                @param box: Eight (8) corner points of the box (in world coordinates.)
-               
-               Example:
-               @verbatim{
-               import GameLogic
-               co = GameLogic.getCurrentController()
-               cam = co.GetOwner()
-               
-               # Box to test...
-               box = []
-               box.append([-1.0, -1.0, -1.0])
-               box.append([-1.0, -1.0,  1.0])
-               box.append([-1.0,  1.0, -1.0])
-               box.append([-1.0,  1.0,  1.0])
-               box.append([ 1.0, -1.0, -1.0])
-               box.append([ 1.0, -1.0,  1.0])
-               box.append([ 1.0,  1.0, -1.0])
-               box.append([ 1.0,  1.0,  1.0])
-               
-               if (cam.boxInsideFrustum(box) != cam.OUTSIDE):
-                       # Box is inside/intersects frustum !
-                       # Do something useful !
-               else:
-                       # Box is outside the frustum !
-               }
                """
        def pointInsideFrustum(point):
                """
                Tests the given point against the view frustum.
                
+               Example::
+                       import GameLogic
+                       co = GameLogic.getCurrentController()
+                       cam = co.GetOwner()
+       
+                       # Test point [0.0, 0.0, 0.0]"
+                       if (cam.pointInsideFrustum([0.0, 0.0, 0.0])):
+                               # Point is inside frustum !
+                               # Do something useful !
+                       else:
+                               # Box is outside the frustum !
+               
                @rtype: boolean
                @return: True if the given point is inside this camera's viewing frustum.
                @type point: [x, y, z]
                @param point: The point to test (in world coordinates.)
-               
-               Example:
-               @verbatim{
-               import GameLogic
-               co = GameLogic.getCurrentController()
-               cam = co.GetOwner()
-               
-               # Test point [0.0, 0.0, 0.0]"
-               if (cam.pointInsideFrustum([0.0, 0.0, 0.0])):
-               # Point is inside frustum !
-               # Do something useful !
-               else:
-               # Box is outside the frustum !
-               }
                """
        def getCameraToWorld():
                """
@@ -131,47 +136,46 @@ class KX_Camera(KX_GameObject):
                You should use normalised device coordinates for the clipping planes:
                left = -1.0, right = 1.0, top = 1.0, bottom = -1.0, near = cam.near, far = cam.far
                
+               Example::
+                       import GameLogic
+                       
+                       # Generate an identiy matrix.
+                       def Identity():
+                               return [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]
+                       
+                       # Generate a perspective projection matrix
+                       def Perspective(cam):
+                               return [[cam.near, 0.0     ,  0.0                                  ,  0.0                                      ],
+                                       [0.0     , cam.near,  0.0                                  ,  0.0                                      ],
+                                       [0.0     , 0.0     , -(cam.far+cam.near)/(cam.far-cam.near), -2.0*cam.far*cam.near/(cam.far - cam.near)],
+                                       [0.0     , 0.0     , -1.0                                  ,  0.0                                      ]]
+                       
+                       # Generate an orthographic projection matrix
+                       # You will need to scale the camera
+                       def Orthographic(cam):
+                               return [[1.0/cam.scaling[0], 0.0               ,  0.0                   ,  0.0                                  ],
+                                       [0.0               , 1.0/cam.scaling[1],  0.0                   ,  0.0                                  ],
+                                       [0.0               , 0.0               , -2.0/(cam.far-cam.near), -(cam.far+cam.near)/(cam.far-cam.near)],
+                                       [0.0               , 0.0               ,  0.0                   ,  1.0                                  ]]
+                       
+                       # Generate an isometric projection matrix
+                       def Isometric():
+                               return [[0.866, 0.0  , 0.866, 0.0],
+                                       [0.25 , 0.866,-0.25 , 0.0],
+                                       [0.0  , 0.0  ,-1.0  , 0.0],
+                                       [0.0  , 0.0  , 0.0  , 1.0]]
+                               m = Identity()
+                               m[0][0] = m[0][2] = m[1][1] = 0.8660254037844386
+                               m[1][0] = 0.25
+                               m[1][2] = -0.25
+                               m[3][3] = 1.0
+                               return m
+                       
+                       co = GameLogic.getCurrentController()
+                       cam = co.getOwner()
+                       cam.setProjectionMatrix(Perspective()))
+               
                @type matrix: 4x4 matrix.
                @param matrix: The new projection matrix for this camera.
-               
-               Example:
-               @verbatim{
-               import GameLogic
-               
-               # Generate an identiy matrix.
-               def Identity():
-                       return [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]
-               
-               # Generate a perspective projection matrix
-               def Perspective(cam):
-                       return [[cam.near, 0.0     ,  0.0                                  ,  0.0                                      ],
-                               [0.0     , cam.near,  0.0                                  ,  0.0                                      ],
-                               [0.0     , 0.0     , -(cam.far+cam.near)/(cam.far-cam.near), -2.0*cam.far*cam.near/(cam.far - cam.near)],
-                               [0.0     , 0.0     , -1.0                                  ,  0.0                                      ]]
-               
-               # Generate an orthographic projection matrix
-               # You will need to scale the camera
-               def Orthographic(cam):
-                       return [[1.0/cam.scaling[0], 0.0               ,  0.0                   ,  0.0                                  ],
-                               [0.0               , 1.0/cam.scaling[1],  0.0                   ,  0.0                                  ],
-                               [0.0               , 0.0               , -2.0/(cam.far-cam.near), -(cam.far+cam.near)/(cam.far-cam.near)],
-                               [0.0               , 0.0               ,  0.0                   ,  1.0                                  ]]
-               
-               # Generate an isometric projection matrix
-               def Isometric():
-                       return [[0.866, 0.0  , 0.866, 0.0],
-                               [0.25 , 0.866,-0.25 , 0.0],
-                               [0.0  , 0.0  ,-1.0  , 0.0],
-                               [0.0  , 0.0  , 0.0  , 1.0]]
-                       m = Identity()
-                       m[0][0] = m[0][2] = m[1][1] = 0.8660254037844386
-                       m[1][0] = 0.25
-                       m[1][2] = -0.25
-                       m[3][3] = 1.0
-                       return m
-               
-               co = GameLogic.getCurrentController()
-               cam = co.getOwner()
-               cam.setProjectionMatrix(Perspective()))
                """
 
index cdde9d039687e7dca365b5432b64bdb2c33cd01a..a95e66cee9674adf6715432313419660522e63b2 100644 (file)
@@ -8,13 +8,17 @@ class KX_GameObject:
        Properties assigned to game objects are accessible as attributes
        in objects of this class.
        
-       Attributes:
-       mass: The object's mass (provided the object has a physics controller). float. read only
-       parent: The object's parent object. KX_GameObject. read only
-       visible: visibility flag. boolean.
-       position: The object's position. list [x, y, z]
-       orientation: The object's orientation. 3x3 Matrix.  You can also write a Quaternion or Euler vector.
-       scaling: The object's scaling factor. list [sx, sy, sz]
+       @ivar mass: The object's mass (provided the object has a physics controller). float. read only
+       @ivar parent: The object's parent object. (Read only)
+       @type parent: KX_GameObject
+       @ivar visible: visibility flag. boolean.
+       @ivar position: The object's position. 
+       @type position: list [x, y, z]
+       @ivar orientation: The object's orientation. 3x3 Matrix.  
+                          You can also write a Quaternion or Euler vector.
+       @type orientation: 3x3 Matrix [[float]]
+       @ivar scaling: The object's scaling factor. list [sx, sy, sz]
+       @type scaling: list [sx, sy, sz]
        """
        
        def setVisible(visible):
@@ -34,8 +38,8 @@ class KX_GameObject:
                """
                Gets the game object's position.
                
-               @rtype list [x, y, z]
-               @return the object's position in world coordinates.
+               @rtype: list [x, y, z]
+               @return: the object's position in world coordinates.
                """
        def setOrientation(orn):
                """
@@ -48,8 +52,8 @@ class KX_GameObject:
                """
                Gets the game object's orientation.
                
-               @rtype 3x3 rotation matrix
-               @return The game object's rotation matrix
+               @rtype: 3x3 rotation matrix
+               @return: The game object's rotation matrix
                """
        def getLinearVelocity():
                """
@@ -60,8 +64,8 @@ class KX_GameObject:
                
                cf getVelocity()
                
-               @rtype list [vx, vy, vz]
-               @return the object's linear velocity.
+               @rtype: list [vx, vy, vz]
+               @return: the object's linear velocity.
                """
        def getVelocity(point):
                """
@@ -72,15 +76,15 @@ class KX_GameObject:
                
                @type point: list [x, y, z]
                @param point: the point to return the velocity for, in local coordinates. (optional: default = [0, 0, 0])
-               @rtype list [vx, vy, vz]
-               @return the velocity at the specified point.
+               @rtype: list [vx, vy, vz]
+               @return: the velocity at the specified point.
                """
        def getMass():
                """
                Gets the game object's mass.
                
-               @rtype float
-               @return the object's mass.
+               @rtype: float
+               @return: the object's mass.
                """
        def getReactionForce():
                """
@@ -89,8 +93,8 @@ class KX_GameObject:
                The reaction force is the force applied to this object over the last simulation timestep.
                This also includes impulses, eg from collisions.
                
-               @rtype list [fx, fy, fz]
-               @return the reaction force of this object.
+               @rtype: list [fx, fy, fz]
+               @return: the reaction force of this object.
                """
        def applyImpulse(point, impulse):
                """
@@ -126,7 +130,7 @@ class KX_GameObject:
                Gets this object's parent.
                
                @rtype: game object
-               @return this object's parent object, or None if this object has no parent.
+               @return: this object's parent object, or None if this object has no parent.
                """
        def getMesh(mesh):
                """
@@ -135,7 +139,7 @@ class KX_GameObject:
                @type mesh: integer
                @param mesh: the mesh object to return (optional: default mesh = 0)
                @rtype: mesh object
-               @returns the first mesh object associated with this game object, or None if this object has no meshs.
+               @return: the first mesh object associated with this game object, or None if this object has no meshs.
                """
        def getPhysicsId():
                """
index 95f6622faf0d625a2f468eb255c99a4b6789178b..39b10a88f97f9cf24ab8fe8331bd5918e06039fc 100644 (file)
@@ -5,27 +5,9 @@ from KX_GameObject import *
 class KX_Light(KX_GameObject):
        """
        A Light object.
-       
-       Constants:
-       @cvar SPOT:   A spot light source. See attribute 'type'
-       @cvar SUN:    A point light source with no attenuation. See attribute 'type'
-       @cvar NORMAL: A point light source. See attribute 'type'
-       
-       Attributes:
-       @cvar type:            The type of light - must be SPOT, SUN or NORMAL
-       @cvar layer:           The layer mask that this light affects object on. (bitfield)
-       @cvar energy:          The brightness of this light. (float)
-       @cvar distance:        The maximum distance this light can illuminate. (float) (SPOT and NORMAL lights only)
-       @cvar colour:          The colour of this light. ([r, g, b]) Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0]
-       @cvar color:           Synonym for colour.
-       @cvar lin_attenuation: The linear component of this lights attenuation. (SPOT and NORMAL lights only)
-       @cvar spotsize:        The cone angle of the spot light, in degrees. (float) (SPOT lights only)
-                              0.0 <= spotsize <= 180.0. Spotsize = 360.0 is also accepted. 
-       @cvar spotblend:       Specifies the intensity distribution of the spot light. (float) (SPOT lights only)
-                              Higher values result in a more focused light source.
-                              0.0 <= spotblend <= 1.0.
-       
+
        Example:
+       
        # Turn on a red alert light.
        import GameLogic
        
@@ -34,4 +16,24 @@ class KX_Light(KX_GameObject):
        
        light.energy = 1.0
        light.colour = [1.0, 0.0, 0.0]
+       
+       @group Constants: NORMAL, SPOT, SUN
+       @ivar SPOT:   A spot light source. See attribute 'type'
+       @ivar SUN:    A point light source with no attenuation. See attribute 'type'
+       @ivar NORMAL: A point light source. See attribute 'type'
+       
+       @ivar type:            The type of light - must be SPOT, SUN or NORMAL
+       @ivar layer:           The layer mask that this light affects object on. (bitfield)
+       @ivar energy:          The brightness of this light. (float)
+       @ivar distance:        The maximum distance this light can illuminate. (float) (SPOT and NORMAL lights only)
+       @ivar colour:          The colour of this light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0]
+       @type colour:          list [r, g, b]
+       @ivar color:           Synonym for colour.
+       @ivar lin_attenuation: The linear component of this lights attenuation. (SPOT and NORMAL lights only)
+       @ivar spotsize:        The cone angle of the spot light, in degrees. (float) (SPOT lights only)
+                              0.0 <= spotsize <= 180.0. Spotsize = 360.0 is also accepted. 
+       @ivar spotblend:       Specifies the intensity distribution of the spot light. (float) (SPOT lights only)
+                              Higher values result in a more focused light source.
+                              0.0 <= spotblend <= 1.0.
+       
        """
index 30858ace97f0d5752f834d80a4f8347ca43d77a5..e213c2351a957d0e11bb8b3d57a6af56c68b65ff 100644 (file)
@@ -12,7 +12,7 @@ class KX_MeshProxy:
                """
                Gets the number of materials associated with this object.
                
-               @rtype integer
+               @rtype: integer
                """
        
        def GetMaterialName(matid):
@@ -52,7 +52,7 @@ class KX_MeshProxy:
                @param matid: the specified material
                @type index: integer
                @param index: the index into the vertex array.
-               @rtype KX_VertexProxy
-               @return a vertex object.
+               @rtype: KX_VertexProxy
+               @return: a vertex object.
                """
 
index 85f87ecbaa7016b9bc76d81a5848c94953c64f6b..8f5f3609df753fb66371d95400d7ef97b27c98b9 100644 (file)
@@ -38,6 +38,6 @@ class KX_NetworkMessageSensor(SCA_ISensor):
                """
                Gets the list of message subjects received.
                
-               @rtype list
+               @rtype: list
                """
        
\ No newline at end of file
index 198298a5394067835a8386ff5dcb0b605619b38b..2802829033fbabcf88e707fda99b1fe331fa13a3 100644 (file)
@@ -9,24 +9,40 @@ class KX_VertexProxy:
        The physics simulation is NOT currently updated - physics will not respond
        to changes in the vertex position.
        
-       Attributes:
-       @cvar XYZ: The position of the vertex. (list [x, y, z])
-       @cvar UV: The texture coordinates of the vertex. (list [u, v])
-       @cvar normal: The normal of the vertex (list [nx, ny, nz])
-       @cvar colour: The colour of the vertex. (list [r, g, b, a]) Black = [0.0, 0.0, 0.0, 1.0], White = [1.0, 1.0, 1.0, 1.0]
-       @cvar color: Synonym for colour.
+       @ivar XYZ: The position of the vertex.
+       @type XYZ: list [x, y, z]
+       @ivar UV: The texture coordinates of the vertex.
+       @type UV: list [u, v]
+       @ivar normal: The normal of the vertex 
+       @type normal: list [nx, ny, nz]
+       @ivar colour: The colour of the vertex. 
+                     Black = [0.0, 0.0, 0.0, 1.0], White = [1.0, 1.0, 1.0, 1.0]
+       @type colour: list [r, g, b, a]
+       @ivar color: Synonym for colour.
        
-       @cvar x: The x coordinate of the vertex. (float)
-       @cvar y: The y coordinate of the vertex. (float)
-       @cvar z: The z coordinate of the vertex. (float)
+       @group Position: x, y, z
+       @ivar x: The x coordinate of the vertex.
+       @type x: float
+       @ivar y: The y coordinate of the vertex.
+       @type y: float
+       @ivar z: The z coordinate of the vertex.
+       @type z: float
        
-       @cvar u: The u texture coordinate of the vertex. (float)
-       @cvar v: The v texture coordinate of the vertex. (float)
+       @group Texture Coordinates: u, v
+       @ivar u: The u texture coordinate of the vertex.
+       @type u: float
+       @ivar v: The v texture coordinate of the vertex.
+       @type v: float
        
-       @cvar r: The red component of the vertex colour.   (float) 0.0 <= r <= 1.0
-       @cvar g: The green component of the vertex colour. (float) 0.0 <= g <= 1.0
-       @cvar b: The blue component of the vertex colour.  (float) 0.0 <= b <= 1.0
-       @cvar a: The alpha component of the vertex colour. (float) 0.0 <= a <= 1.0
+       @group Colour: r, g, b, a
+       @ivar r: The red component of the vertex colour.   0.0 <= r <= 1.0
+       @type r: float
+       @ivar g: The green component of the vertex colour. 0.0 <= g <= 1.0
+       @type g: float
+       @ivar b: The blue component of the vertex colour.  0.0 <= b <= 1.0
+       @type b: float
+       @ivar a: The alpha component of the vertex colour. 0.0 <= a <= 1.0
+       @type a: float
        """
        
        def getXYZ():
@@ -41,7 +57,7 @@ class KX_VertexProxy:
                Sets the position of this vertex.
                
                @type pos: list [x, y, z]
-               @param: the new position for this vertex in local coordinates.
+               @param pos: the new position for this vertex in local coordinates.
                """
        def getUV():
                """
index 3ac7b124f33addde0b48cb5a4b659137282ef4df..cddd1418411306e64cb911f9cd3842148de1c647 100644 (file)
@@ -4,8 +4,10 @@ SOURCES=$(shell ls *.py)
 TARGETS:=$(SOURCES:.py=.html)
 PYDOC=/usr/lib/python2.2/pydoc.py
 
-all: $(TARGETS)
-
-%.html: %.py
-       $(PYDOC) -w $*
-
+all: $(SOURCES)
+       epydoc -o BPY_GE_234 --url "http://www.blender.org" -t GameLogic.py \
+               -n "Blender GameEngine" --no-private --no-frames \
+               $(shell ls *.py )
+               
+clean:
+       rm *.html
index eec66f59e5deef8b70974b7f9b810f28ce45de5a..2a7549089d07d50acdd08fa690bf507aad17b269 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 # Documentation for SCA_ANDController
-form SCA_ILogicBrick import *
+from SCA_ILogicBrick import *
 
 class SCA_ANDController(SCA_ILogicBrick):
        """
index 6bb6d7fd43d39b4abfdd7c0cd9260d40bd362aa2..d76b057fccc105218eaf28b3f7822121aaf7640f 100644 (file)
@@ -11,7 +11,7 @@ class SCA_ILogicBrick:
                """
                Gets the game object associated with this logic brick.
                
-               @rtype KX_GameObject
+               @rtype: KX_GameObject
                """
        def setExecutePriority(priority):
                """
@@ -24,6 +24,6 @@ class SCA_ILogicBrick:
                """
                Gets the execution priority of this logic brick.
                
-               @rtype integer
-               @return this logic bricks current priority.
+               @rtype: integer
+               @return: this logic bricks current priority.
                """
index c964788f44777e670806c927967a7db432d8c32a..b96d8c8c0758c9dd8330427fbb9c7f0a9d756bb3 100644 (file)
@@ -27,15 +27,15 @@ class SCA_ISensor(SCA_ILogicBrick):
                """
                The frequency for pulse mode sensors.
                
-               @rtype integer
-               @return the pulse frequency in 1/50 sec.
+               @rtype: integer
+               @return: the pulse frequency in 1/50 sec.
                """
        def setFrequency(freq):
                """
                Sets the frequency for pulse mode sensors.
                
                @type freq: integer
-               @return the pulse frequency in 1/50 sec.
+               @return: the pulse frequency in 1/50 sec.
                """
        def getUseNegPulseMode():
                """
index f0a14477b24ba9d31a0f5b4d05eb258a687f3189..22de8d8b986d73a5f98ee78426f81227fa196661 100644 (file)
@@ -11,9 +11,9 @@ class SCA_PropertySensor(SCA_ISensor):
                """
                Gets when to activate this sensor.
                
-               KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL,
-                       KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED,
-                       or KX_PROPSENSOR_EXPRESSION.
+               @return: KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL,
+                        KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED,
+                        or KX_PROPSENSOR_EXPRESSION.
                """
 
        def setType(checktype):
@@ -29,8 +29,8 @@ class SCA_PropertySensor(SCA_ISensor):
                """
                Return the property with which the sensor operates.
                
-               @rtype string
-               @return the name of the property this sensor is watching.
+               @rtype: string
+               @return: the name of the property this sensor is watching.
                """
        def setProperty(name):
                """
@@ -43,8 +43,8 @@ class SCA_PropertySensor(SCA_ISensor):
                """
                Return the value with which the sensor compares to the value of the property.
                
-               @rtype string
-               @return the value of the property this sensor is watching.
+               @rtype: string
+               @return: the value of the property this sensor is watching.
                """
        def setValue(value):
                """