Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-04-15 17:50:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-15 17:50:56 +0400
commit514c78ba39f296fcac60b33d9a040af2051d23cc (patch)
tree4f824d3dbfcec6c5397ceeb44e7379ad2ae7cf2f /source/gameengine/PyDoc
parente8f4d9322112e64677df11ba834a26159874b332 (diff)
BGE MouseFocusSensor
- fix for multiple viewpors broke single viewport (both work now) - python could get uninitialized values from m_prevTargetPoint and m_prevSourcePoint - getting the RayDirection for python could crash blender trying to normalize a zero length vector. - added python attributes - removed unused canvas from the MouseFocusSensor class
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r--source/gameengine/PyDoc/KX_MouseFocusSensor.py27
1 files changed, 20 insertions, 7 deletions
diff --git a/source/gameengine/PyDoc/KX_MouseFocusSensor.py b/source/gameengine/PyDoc/KX_MouseFocusSensor.py
index ceab5b8c511..24f7716218b 100644
--- a/source/gameengine/PyDoc/KX_MouseFocusSensor.py
+++ b/source/gameengine/PyDoc/KX_MouseFocusSensor.py
@@ -8,46 +8,59 @@ class KX_MouseFocusSensor(SCA_MouseSensor):
The mouse focus sensor works by transforming the mouse coordinates from 2d device
space to 3d space then raycasting away from the camera.
+
+ @ivar raySource: The worldspace source of the ray (the view position)
+ @type raySource: list (vector of 3 floats)
+ @ivar rayTarget: The worldspace target of the ray.
+ @type rayTarget: list (vector of 3 floats)
+ @ivar rayDirection: The L{rayTarget} - L{raySource} normalized.
+ @type rayDirection: list (normalized vector of 3 floats)
+ @ivar hitObject: the last object the mouse was over.
+ @type hitObject: L{KX_GameObject<KX_GameObject.KX_GameObject>} or None
+ @ivar hitPosition: The worldspace position of the ray intersecton.
+ @type hitPosition: list (vector of 3 floats)
+ @ivar hitNormal: the worldspace normal from the face at point of intersection.
+ @type hitNormal: list (normalized vector of 3 floats)
"""
def getHitNormal():
"""
- Returns the normal (in worldcoordinates) at the point of collision where the object was hit by this ray.
-
+ Returns the normal (in worldcoordinates) at the point of collision where the object was hit by this ray. (B{deprecated})
+
@rtype: list [x, y, z]
@return: the ray collision normal.
"""
def getHitObject():
"""
- Returns the object that was hit by this ray or None.
+ Returns the object that was hit by this ray or None. (B{deprecated})
@rtype: L{KX_GameObject} or None
@return: the collision object.
"""
def getHitPosition():
"""
- Returns the position (in worldcoordinates) at the point of collision where the object was hit by this ray.
+ Returns the position (in worldcoordinates) at the point of collision where the object was hit by this ray. (B{deprecated})
@rtype: list [x, y, z]
@return: the ray collision position.
"""
def getRayDirection():
"""
- Returns the normalized direction (in worldcoordinates) of the ray cast by the mouse.
+ Returns the normalized direction (in worldcoordinates) of the ray cast by the mouse. (B{deprecated})
@rtype: list [x, y, z]
@return: the ray direction.
"""
def getRaySource():
"""
- Returns the position (in worldcoordinates) the ray was cast from by the mouse.
+ Returns the position (in worldcoordinates) the ray was cast from by the mouse. (B{deprecated})
@rtype: list [x, y, z]
@return: the ray source.
"""
def getRayTarget():
"""
- Returns the target of the ray (in worldcoordinates) that seeks the focus object.
+ Returns the target of the ray (in worldcoordinates) that seeks the focus object. (B{deprecated})
@rtype: list [x, y, z]
@return: the ray target.