File: KX_RaySensor.py

package info (click to toggle)
blender 2.46%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 68,208 kB
  • ctags: 77,061
  • sloc: ansic: 518,049; cpp: 199,438; python: 67,585; sh: 7,097; makefile: 3,572; perl: 2,082; java: 8
file content (33 lines) | stat: -rw-r--r-- 783 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# $Id: KX_RaySensor.py 2607 2004-05-30 11:09:46Z kester $
# Documentation for KX_RaySensor
from SCA_ISensor import *

class KX_RaySensor(SCA_ISensor):
	"""
	A ray sensor detects the first object in a given direction.
	"""
	
	def getHitObject():
		"""
		Returns the game object that was hit by this ray.
		
		@rtype: KX_GameObject
		"""
	def getHitPosition():
		"""
		Returns the position (in worldcoordinates) where the object was hit by this ray.
		
		@rtype: list [x, y, z]
		"""
	def getHitNormal():
		"""
		Returns the normal (in worldcoordinates) of the object at the location where the object was hit by this ray.
		
		@rtype: list [nx, ny, nz]
		"""
	def getRayDirection():
		"""
		Returns the direction from the ray (in worldcoordinates)
		
		@rtype: list [dx, dy, dz]
		"""