blender/source/gameengine/PyDoc
Benoit Bolsee becd467be8 BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information.
rayCast(to,from,dist,prop,face,xray,poly):

The face paremeter determines the orientation of the normal: 
  0 or omitted => 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.
if poly is 0 or omitted, 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 KX_PolyProxy as 4th element.

The KX_PolyProxy object holds information on the polygon hit by the ray: the index of the vertex forming the poylgon, material, etc.

Attributes (read-only):
 matname: The name of polygon material, empty if no material.
 material: The material of the polygon
 texture: The texture name of the polygon.
 matid: The material index of the polygon, use this to retrieve vertex proxy from mesh proxy
 v1: vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
 v2: vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
 v3: vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
 v4: vertex index of the fourth vertex of the polygon, 0 if polygon has only 3 vertex
     use this to retrieve vertex proxy from mesh proxy
 visible: visible state of the polygon: 1=visible, 0=invisible
 collide: collide state of the polygon: 1=receives collision, 0=collision free.
Methods:
 getMaterialName(): Returns the polygon material name with MA prefix
 getMaterial(): Returns the polygon material
 getTextureName(): Returns the polygon texture name
 getMaterialIndex(): Returns the material bucket index of the polygon. 
 getNumVertex(): Returns the number of vertex of the polygon.
 isVisible(): Returns whether the polygon is visible or not
 isCollider(): Returns whether the polygon is receives collision or not
 getVertexIndex(vertex): Returns the mesh vertex index of a polygon vertex
 getMesh(): Returns a mesh proxy

New methods of KX_MeshProxy have been implemented to retrieve KX_PolyProxy objects:
 getNumPolygons(): Returns the number of polygon in the mesh.
 getPolygon(index): Gets the specified polygon from the mesh.

More details in PyDoc.
2008-08-27 19:34:19 +00:00
..
BL_ActionActuator.py Adding an option for action actuator - "Continue" this means animations always play from where they left off. Continue was the 2.46 operation too, so new functionality is the option to disable. 2008-07-10 14:23:19 +00:00
BL_ShapeActionActuator.py BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time 2008-07-23 21:37:37 +00:00
epy_docgen.sh replacing epydoc generation script with one copied from bpy docs 2008-05-20 05:55:12 +00:00
GameKeys.py Minor Fixes: 2004-06-26 09:15:41 +00:00
GameLogic.py BGE Python API - GameLogic.getBlendFileList(path='//') to return a list of blend's in the current directory. Needed for creating a level selector that lists all files in the level directory. 2008-08-22 06:02:01 +00:00
KX_ActuatorSensor.py BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time 2008-07-23 21:37:37 +00:00
KX_Camera.py Added support for cameras in Blender's Ortho mode. 2004-07-20 12:07:06 +00:00
KX_CameraActuator.py Python API get/setObject update for Actuators. (SetParent, AddObject, Camera and TrackTo) 2008-08-14 08:58:25 +00:00
KX_CDActuator.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
KX_ConstraintActuator.py BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time 2008-07-23 21:37:37 +00:00
KX_GameActuator.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
KX_GameObject.py BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information. 2008-08-27 19:34:19 +00:00
KX_IpoActuator.py BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time 2008-07-23 21:37:37 +00:00
KX_Light.py Lighting updates: 2004-06-07 11:01:31 +00:00
KX_MeshProxy.py BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information. 2008-08-27 19:34:19 +00:00
KX_MouseFocusSensor.py Added Python module for Lights. 2004-05-30 11:09:46 +00:00
KX_NearSensor.py Added Python module for Lights. 2004-05-30 11:09:46 +00:00
KX_NetworkMessageActuator.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
KX_NetworkMessageSensor.py Use epydoc for generating game python reference (like the bpython guys) 2004-05-31 13:06:04 +00:00
KX_ObjectActuator.py BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time 2008-07-23 21:37:37 +00:00
KX_ParentActuator.py Python API get/setObject update for Actuators. (SetParent, AddObject, Camera and TrackTo) 2008-08-14 08:58:25 +00:00
KX_PolygonMaterial.py Big patches: 2005-03-25 10:33:39 +00:00
KX_PolyProxy.py BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information. 2008-08-27 19:34:19 +00:00
KX_RadarSensor.py Added Python module for Lights. 2004-05-30 11:09:46 +00:00
KX_RaySensor.py Added Python module for Lights. 2004-05-30 11:09:46 +00:00
KX_SCA_AddObjectActuator.py get/set Angular velocity for KX_GameObjects python api and for the AddObject actuator. 2008-08-27 03:34:53 +00:00
KX_SCA_EndObjectActuator.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
KX_SCA_ReplaceMeshActuator.py Convert and use actuators with no target object set. 2004-09-19 01:33:08 +00:00
KX_Scene.py Minor Fixes: 2004-06-26 09:15:41 +00:00
KX_SceneActuator.py Convert and use actuators with no target object set. 2004-09-19 01:33:08 +00:00
KX_SoundActuator.py Port Python updates from Tuhopuu2: 2004-07-17 05:28:23 +00:00
KX_StateActuator.py BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time 2008-07-23 21:37:37 +00:00
KX_TouchSensor.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
KX_TrackToActuator.py Python API get/setObject update for Actuators. (SetParent, AddObject, Camera and TrackTo) 2008-08-14 08:58:25 +00:00
KX_VertexProxy.py Port Python updates from Tuhopuu2: 2004-07-17 05:28:23 +00:00
KX_VisibilityActuator.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
Rasterizer.py Tweek the stereo settings: allow negative eye separation. 2004-10-24 23:50:44 +00:00
SCA_AlwaysSensor.py Added Python module for Lights. 2004-05-30 11:09:46 +00:00
SCA_ANDController.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
SCA_DelaySensor.py BGE patch: New Delay sensor (derived from patch #17472) 2008-08-16 20:45:37 +00:00
SCA_IActuator.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
SCA_IController.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
SCA_ILogicBrick.py Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
SCA_ISensor.py BGE state system improvement: the sensor with Level option enabled will trigger the controller of a newly activated state, even if the sensor is already connected to an active state; new isTriggered() python function to determine which sensor triggered the current controller. 2008-08-23 11:54:27 +00:00
SCA_KeyboardSensor.py Minor Fixes: 2004-06-26 09:15:41 +00:00
SCA_MouseSensor.py Added Python module for Lights. 2004-05-30 11:09:46 +00:00
SCA_ORController.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
SCA_PropertyActuator.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
SCA_PropertySensor.py Use epydoc for generating game python reference (like the bpython guys) 2004-05-31 13:06:04 +00:00
SCA_PythonController.py BGE python api addition, GameObject get/setState and Controller.getState() 2008-06-29 21:52:23 +00:00
SCA_RandomActuator.py Updates to GamePython Reference. 2004-06-02 12:43:27 +00:00
SCA_RandomSensor.py Added Python module for Lights. 2004-05-30 11:09:46 +00:00
WhatsNew.py Unified KX_BlenderPolyMaterial & GPC_PolygonMaterial into KX_PolygonMaterial. 2005-01-16 06:02:06 +00:00