diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-31 17:06:04 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-31 17:06:04 +0400 |
commit | 0dfc3a3b785ca5ed39a48e0d62a0c472167c5506 (patch) | |
tree | 05c0ab514628172d637c4b6c0be311d00144106a /source/gameengine | |
parent | 4f457fa277754a0c34f07bfa02acad00bfb50731 (diff) |
Use epydoc for generating game python reference (like the bpython guys)
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/PyDoc/GameKeys.py | 220 | ||||
-rw-r--r-- | source/gameengine/PyDoc/GameLogic.py | 71 | ||||
-rw-r--r-- | source/gameengine/PyDoc/KX_CDActuator.py | 4 | ||||
-rw-r--r-- | source/gameengine/PyDoc/KX_Camera.py | 220 | ||||
-rw-r--r-- | source/gameengine/PyDoc/KX_GameObject.py | 46 | ||||
-rw-r--r-- | source/gameengine/PyDoc/KX_Light.py | 42 | ||||
-rw-r--r-- | source/gameengine/PyDoc/KX_MeshProxy.py | 6 | ||||
-rw-r--r-- | source/gameengine/PyDoc/KX_NetworkMessageSensor.py | 2 | ||||
-rw-r--r-- | source/gameengine/PyDoc/KX_VertexProxy.py | 48 | ||||
-rw-r--r-- | source/gameengine/PyDoc/Makefile | 12 | ||||
-rw-r--r-- | source/gameengine/PyDoc/SCA_ANDController.py | 2 | ||||
-rw-r--r-- | source/gameengine/PyDoc/SCA_ILogicBrick.py | 6 | ||||
-rw-r--r-- | source/gameengine/PyDoc/SCA_ISensor.py | 6 | ||||
-rw-r--r-- | source/gameengine/PyDoc/SCA_PropertySensor.py | 14 |
14 files changed, 370 insertions, 329 deletions
diff --git a/source/gameengine/PyDoc/GameKeys.py b/source/gameengine/PyDoc/GameKeys.py index 58fc53b0961..8dbc040368b 100644 --- a/source/gameengine/PyDoc/GameKeys.py +++ b/source/gameengine/PyDoc/GameKeys.py @@ -1,120 +1,128 @@ # $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 """ diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py index 05dfd0cd481..20621fae659 100644 --- a/source/gameengine/PyDoc/GameLogic.py +++ b/source/gameengine/PyDoc/GameLogic.py @@ -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 """ diff --git a/source/gameengine/PyDoc/KX_CDActuator.py b/source/gameengine/PyDoc/KX_CDActuator.py index 12e74f166b5..a2fba4a4bb4 100644 --- a/source/gameengine/PyDoc/KX_CDActuator.py +++ b/source/gameengine/PyDoc/KX_CDActuator.py @@ -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) """ diff --git a/source/gameengine/PyDoc/KX_Camera.py b/source/gameengine/PyDoc/KX_Camera.py index 729380ddfb0..b0671fb1a74 100644 --- a/source/gameengine/PyDoc/KX_Camera.py +++ b/source/gameengine/PyDoc/KX_Camera.py @@ -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())) """ diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index cdde9d03968..a95e66cee96 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -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(): """ diff --git a/source/gameengine/PyDoc/KX_Light.py b/source/gameengine/PyDoc/KX_Light.py index 95f6622faf0..39b10a88f97 100644 --- a/source/gameengine/PyDoc/KX_Light.py +++ b/source/gameengine/PyDoc/KX_Light.py @@ -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. + """ diff --git a/source/gameengine/PyDoc/KX_MeshProxy.py b/source/gameengine/PyDoc/KX_MeshProxy.py index 30858ace97f..e213c2351a9 100644 --- a/source/gameengine/PyDoc/KX_MeshProxy.py +++ b/source/gameengine/PyDoc/KX_MeshProxy.py @@ -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. """ diff --git a/source/gameengine/PyDoc/KX_NetworkMessageSensor.py b/source/gameengine/PyDoc/KX_NetworkMessageSensor.py index 85f87ecbaa7..8f5f3609df7 100644 --- a/source/gameengine/PyDoc/KX_NetworkMessageSensor.py +++ b/source/gameengine/PyDoc/KX_NetworkMessageSensor.py @@ -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 diff --git a/source/gameengine/PyDoc/KX_VertexProxy.py b/source/gameengine/PyDoc/KX_VertexProxy.py index 198298a5394..2802829033f 100644 --- a/source/gameengine/PyDoc/KX_VertexProxy.py +++ b/source/gameengine/PyDoc/KX_VertexProxy.py @@ -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(): """ diff --git a/source/gameengine/PyDoc/Makefile b/source/gameengine/PyDoc/Makefile index 3ac7b124f33..cddd1418411 100644 --- a/source/gameengine/PyDoc/Makefile +++ b/source/gameengine/PyDoc/Makefile @@ -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 diff --git a/source/gameengine/PyDoc/SCA_ANDController.py b/source/gameengine/PyDoc/SCA_ANDController.py index eec66f59e5d..2a7549089d0 100644 --- a/source/gameengine/PyDoc/SCA_ANDController.py +++ b/source/gameengine/PyDoc/SCA_ANDController.py @@ -1,6 +1,6 @@ # $Id$ # Documentation for SCA_ANDController -form SCA_ILogicBrick import * +from SCA_ILogicBrick import * class SCA_ANDController(SCA_ILogicBrick): """ diff --git a/source/gameengine/PyDoc/SCA_ILogicBrick.py b/source/gameengine/PyDoc/SCA_ILogicBrick.py index 6bb6d7fd43d..d76b057fccc 100644 --- a/source/gameengine/PyDoc/SCA_ILogicBrick.py +++ b/source/gameengine/PyDoc/SCA_ILogicBrick.py @@ -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. """ diff --git a/source/gameengine/PyDoc/SCA_ISensor.py b/source/gameengine/PyDoc/SCA_ISensor.py index c964788f447..b96d8c8c075 100644 --- a/source/gameengine/PyDoc/SCA_ISensor.py +++ b/source/gameengine/PyDoc/SCA_ISensor.py @@ -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(): """ diff --git a/source/gameengine/PyDoc/SCA_PropertySensor.py b/source/gameengine/PyDoc/SCA_PropertySensor.py index f0a14477b24..22de8d8b986 100644 --- a/source/gameengine/PyDoc/SCA_PropertySensor.py +++ b/source/gameengine/PyDoc/SCA_PropertySensor.py @@ -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): """ |