~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/gameengine/PyDoc/KX_TouchSensor.py

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: KX_TouchSensor.py,v 1.3 2004/06/02 12:43:27 kester Exp $
 
2
# Documentation for KX_TouchSensor
 
3
from SCA_ISensor import *
 
4
 
 
5
class KX_TouchSensor(SCA_ISensor):
 
6
        """
 
7
        Touch sensor detects collisions between objects.
 
8
        """
 
9
        def setProperty(name):
 
10
                """
 
11
                Set the property or material to collide with. Use
 
12
                setTouchMaterial() to switch between properties and
 
13
                materials.
 
14
                @type name: string
 
15
                """
 
16
        def getProperty():
 
17
                """
 
18
                Returns the property or material to collide with. Use
 
19
                getTouchMaterial() to find out whether this sensor
 
20
                looks for properties or materials.
 
21
                
 
22
                @rtype: string
 
23
                """
 
24
 
 
25
        def getHitObject():
 
26
                """
 
27
                Returns the last object hit by this touch sensor.
 
28
                
 
29
                @rtype: L{KX_GameObject}
 
30
                """
 
31
        def getHitObjectList():
 
32
                """
 
33
                Returns a list of all objects hit in the last frame.
 
34
                
 
35
                Only objects that have the requisite material/property are listed.
 
36
                
 
37
                @rtype: list [L{KX_GameObject}]
 
38
                """
 
39
        def getTouchMaterial():
 
40
                """
 
41
                Returns KX_TRUE if this sensor looks for a specific material,
 
42
                KX_FALSE if it looks for a specific property.
 
43
                """
 
44
        def setTouchMaterial(flag):
 
45
                """
 
46
                Set flag to KX_TRUE to switch on positive pulse mode,
 
47
                KX_FALSE to switch off positive pulse mode.
 
48
                
 
49
                @type flag: KX_TRUE or KX_FALSE.
 
50
                """