Index: KX_ActuatorSensor.py =================================================================== --- KX_ActuatorSensor.py (revision 16289) +++ KX_ActuatorSensor.py (working copy) @@ -2,7 +2,7 @@ # Documentation for KX_ActuatorSensor from SCA_IActuator import * -class KX_ActuatorSensor(SCA_ISensor): +class KX_ActuatorSensor(SCA_IActuator): """ Actuator sensor detect change in actuator state of the parent object. It generates a positive pulse if the corresponding actuator is activated Index: KX_ConstraintActuator.py =================================================================== --- KX_ConstraintActuator.py (revision 16289) +++ KX_ConstraintActuator.py (working copy) @@ -60,8 +60,7 @@ @param limit: Position constraints: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY, KX_CONSTRAINTACT_LOCZ, Rotation constraints: KX_CONSTRAINTACT_ROTX, KX_CONSTRAINTACT_ROTY or KX_CONSTRAINTACT_ROTZ - Distance contraints: KX_ACT_CONSTRAINT_DIRPX, KX_ACT_CONSTRAINT_DIRPY, KX_ACT_CONSTRAINT_DIRPZ, - KX_ACT_CONSTRAINT_DIRNX, KX_ACT_CONSTRAINT_DIRNY, KX_ACT_CONSTRAINT_DIRNZ, + Distance contraints: KX_ACT_CONSTRAINT_DIRPX, KX_ACT_CONSTRAINT_DIRPY, KX_ACT_CONSTRAINT_DIRPZ, KX_ACT_CONSTRAINT_DIRNX, KX_ACT_CONSTRAINT_DIRNY, KX_ACT_CONSTRAINT_DIRNZ, Orientation constraints: KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ """ def getLimit(): @@ -72,8 +71,7 @@ @return: Position constraints: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY, KX_CONSTRAINTACT_LOCZ, Rotation constraints: KX_CONSTRAINTACT_ROTX, KX_CONSTRAINTACT_ROTY, KX_CONSTRAINTACT_ROTZ, - Distance contraints: KX_ACT_CONSTRAINT_DIRPX, KX_ACT_CONSTRAINT_DIRPY, KX_ACT_CONSTRAINT_DIRPZ, - KX_ACT_CONSTRAINT_DIRNX, KX_ACT_CONSTRAINT_DIRNY, KX_ACT_CONSTRAINT_DIRNZ, + Distance contraints: KX_ACT_CONSTRAINT_DIRPX, KX_ACT_CONSTRAINT_DIRPY, KX_ACT_CONSTRAINT_DIRPZ, KX_ACT_CONSTRAINT_DIRNX, KX_ACT_CONSTRAINT_DIRNY, KX_ACT_CONSTRAINT_DIRNZ, Orientation constraints: KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ """ def setRotDamp(duration): @@ -107,10 +105,10 @@ @type option: integer @param option: Binary combination of the following values: - 64 : Activate alignment to surface - 128 : Detect material rather than property - 256 : No deactivation if ray does not hit target - 512 : Activate distance control + 64 : Activate alignment to surface + 128 : Detect material rather than property + 256 : No deactivation if ray does not hit target + 512 : Activate distance control """ def getOption(): """ Index: KX_GameObject.py =================================================================== --- KX_GameObject.py (revision 16289) +++ KX_GameObject.py (working copy) @@ -18,7 +18,7 @@ @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. + 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] @@ -49,7 +49,7 @@ @rtype: int @return: the objects state. """ - def setState(): + def setState(visible): """ Sets the game object's visible flag. The bitmasks for states from 1 to 30 can be set with (1<<0, 1<<1, 1<<2 ... 1<<29) @@ -118,7 +118,7 @@ @type local: boolean @param local: - False: you get the "global" velocity ie: relative to world orientation (default). - - True: you get the "local" velocity ie: relative to object orientation. + - True: you get the "local" velocity ie: relative to object orientation. @rtype: list [vx, vy, vz] @return: the object's linear velocity. """ @@ -133,7 +133,7 @@ @param velocity: linear velocity vector. @type local: boolean @param local: - False: you get the "global" velocity ie: relative to world orientation (default). - - True: you get the "local" velocity ie: relative to object orientation. + - True: you get the "local" velocity ie: relative to object orientation. """ def getAngularVelocity(local = 0): """ @@ -141,7 +141,7 @@ @type local: boolean @param local: - False: you get the "global" velocity ie: relative to world orientation (default). - - True: you get the "local" velocity ie: relative to object orientation. + - True: you get the "local" velocity ie: relative to object orientation. @rtype: list [vx, vy, vz] @return: the object's angular velocity. """ @@ -153,7 +153,7 @@ @param velocity: angular velocity vector. @type local: boolean @param local: - False: you get the "global" velocity ie: relative to world orientation (default). - - True: you get the "local" velocity ie: relative to object orientation. + - True: you get the "local" velocity ie: relative to object orientation. """ def getVelocity(point): """ @@ -300,37 +300,39 @@ @rtype: L{KX_GameObject} @return: the first object hit or None if no object or object does not match prop """ - def rayCast(to,from,dist,prop,face,xray,poly): + def rayCast(to,fram,dist,prop,face,xray,poly): """ Look from a point/object to another point/object and find first object hit within dist that matches prop. - if poly is 0, returns a 3-tuple with object reference, hit point and hit normal or (None,None,None) if no hit. - if poly is 1, returns a 4-tuple with in addition a L{KX_PolyProxy} as 4th element. - Ex: + - if poly is 0, returns a 3-tuple with object reference, hit point and hit normal or (None,None,None) if no hit. + - if poly is 1, returns a 4-tuple with in addition a L{KX_PolyProxy} as 4th element. + Ex:: # shoot along the axis gun-gunAim (gunAim should be collision-free) ob,point,normal = gun.rayCast(gunAim,None,50) if ob: # hit something - Notes: + Notes: The ray ignores the object on which the method is called. It is casted from/to object center or explicit [x,y,z] points. The face paremeter determines the orientation of the normal: - 0 => hit normal is always oriented towards the ray origin (as if you casted the ray from outside) - 1 => hit normal is the real face normal (only for mesh object, otherwise face has no effect) + - 0 => hit normal is always oriented towards the ray origin (as if you casted the ray from outside) + - 1 => hit normal is the real face normal (only for mesh object, otherwise face has no effect) + The ray has X-Ray capability if xray parameter is 1, otherwise the first object hit (other than self object) stops the ray. The prop and xray parameters interact as follow: - prop off, xray off: return closest hit or no hit if there is no object on the full extend of the ray. - prop off, xray on : idem. - prop on, xray off: return closest hit if it matches prop, no hit otherwise. - prop on, xray on : return closest hit matching prop or no hit if there is no object matching prop on the full extend of the ray. + prop off, xray off: return closest hit or no hit if there is no object on the full extend of the ray. + prop off, xray on : idem. + prop on, xray off: return closest hit if it matches prop, no hit otherwise. + prop on, xray on : return closest hit matching prop or no hit if there is no object matching prop on the full extend of the ray. The L{KX_PolyProxy} 4th element of the return tuple when poly=1 allows to retrieve information on the polygon hit by the ray. If there is no hit or the hit object is not a static mesh, None is returned as 4th element. - The ray ignores collision-free objects and faces that dont have the collision flag enabled, you can however use ghost objects. + The ray ignores collision-free objects and faces that dont have the collision flag enabled, you can however use ghost objects. + @param to: [x,y,z] or object to which the ray is casted @type to: L{KX_GameObject} or 3-tuple - @param from: [x,y,z] or object from which the ray is casted; None or omitted => use self object center - @type from: L{KX_GameObject} or 3-tuple or None + @param fram: [x,y,z] or object from which the ray is casted; None or omitted => use self object center + @type fram: L{KX_GameObject} or 3-tuple or None @param dist: max distance to look (can be negative => look behind); 0 or omitted => detect up to to @type dist: float @param prop: property name that object must have; can be omitted => detect any object @@ -341,11 +343,11 @@ @type xray: int @param poly: polygon option: 1=>return value is a 4-tuple and the 4th element is a L{KX_PolyProxy} @type poly: int - @rtype: 3-tuple (L{KX_GameObject}, 3-tuple (x,y,z), 3-tuple (nx,ny,nz)) - or 4-tuple (L{KX_GameObject}, 3-tuple (x,y,z), 3-tuple (nx,ny,nz), L{KX_PolyProxy)) + @rtype: 3-tuple (L{KX_GameObject}, 3-tuple (x,y,z), 3-tuple (nx,ny,nz)) + or 4-tuple (L{KX_GameObject}, 3-tuple (x,y,z), 3-tuple (nx,ny,nz), L{KX_PolyProxy}) @return: (object,hitpoint,hitnormal) or (object,hitpoint,hitnormal,polygon) - If no hit, returns (None,None,None) or (None,None,None,None) - If the object hit is not a static mesh, polygon is None + If no hit, returns (None,None,None) or (None,None,None,None) + If the object hit is not a static mesh, polygon is None """ Index: KX_IpoActuator.py =================================================================== --- KX_IpoActuator.py (revision 16289) +++ KX_IpoActuator.py (working copy) @@ -6,7 +6,7 @@ """ IPO actuator activates an animation. """ - def set(mode, startframe, endframe, mode): + def set(mode, startframe, endframe, specialmode): """ Sets the properties of the actuator. @@ -16,8 +16,8 @@ @type startframe: integer @param endframe: last frame to use @type endframe: integer - @param mode: special mode - @type mode: integer (0=normal, 1=interpret location as force, 2=additive) + @param specialmode: special mode + @type specialmode: integer (0=normal, 1=interpret location as force, 2=additive) """ def setProperty(property): """ Index: KX_ObjectActuator.py =================================================================== --- KX_ObjectActuator.py (revision 16289) +++ KX_ObjectActuator.py (working copy) @@ -111,9 +111,7 @@ For the servo control actuator, this is the target speed. @rtype: list [vx, vy, vz, local] - @return: A four item list, containing the vector velocity, and whether - the velocity is applied in local coordinates (True) or world - coordinates (False) + @return: A four item list, containing the vector velocity, and whether the velocity is applied in local coordinates (True) or world coordinates (False) """ def setLinearVelocity(vx, vy, vz, local): """ Index: KX_PolyProxy.py =================================================================== --- KX_PolyProxy.py (revision 16289) +++ KX_PolyProxy.py (working copy) @@ -59,11 +59,10 @@ @rtype: integer @return: the material index in the mesh - + """ def getNumVertex(): """ Returns the number of vertex of the polygon. - @rtype: integer @return: number of vertex, 3 or 4. """ Index: KX_TrackToActuator.py =================================================================== --- KX_TrackToActuator.py (revision 16289) +++ KX_TrackToActuator.py (working copy) @@ -21,7 +21,7 @@ @type object: L{KX_GameObject}, string or None @param object: Either a reference to a game object or the name of the object to track. """ - def getObject(): + def getObject(name_only): """ Returns the name of the object to track. Index: Rasterizer.py =================================================================== --- Rasterizer.py (revision 16289) +++ Rasterizer.py (working copy) @@ -84,7 +84,8 @@ """ Sets the mouse cursor position. - @type x, y: integer + @type x: integer + @type y: integer """ def setBackgroundColor(rgba): Index: SCA_DelaySensor.py =================================================================== --- SCA_DelaySensor.py (revision 16289) +++ SCA_DelaySensor.py (working copy) @@ -1,6 +1,6 @@ # $Id$ # Documentation for SCA_DelaySensor -from SCA_IActuator import * +from SCA_ISensor import * class SCA_DelaySensor(SCA_ISensor): """