~ubuntu-branches/ubuntu/lucid/blender/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-08-06 22:32:19 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806223219-8z4eej1u8levu4pz
Tags: 2.49a+dfsg-0ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Build-depend on python-2.6 rather than python-2.5.
  - debian/misc/*.desktop: Add Spanish translation to .desktop 
    files.
  - debian/pyversions: 2.6.
  - debian/rules: Clean *.o of source/blender/python/api2_2x/
* New upstream release (LP: #382153).
* Refreshed patches:
  - 01_sanitize_sys.patch
  - 02_tmp_in_HOME
  - 10_use_systemwide_ftgl
  - 70_portability_platform_detection
* Removed patches merged upstream:
  - 30_fix_python_syntax_warning
  - 90_ubuntu_ffmpeg_52_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: KX_ConstraintActuator.py 17083 2008-10-14 22:31:10Z campbellbarton $
2
 
# Documentation for KX_ConstraintActuator
3
 
from SCA_IActuator import *
4
 
 
5
 
class KX_ConstraintActuator(SCA_IActuator):
6
 
        """
7
 
        A constraint actuator limits the position, rotation, distance or orientation of an object.
8
 
        """
9
 
        def setDamp(time):
10
 
                """
11
 
                Sets the time this constraint is delayed.
12
 
                
13
 
                @param time: The number of frames to delay.  
14
 
                             Negative values are ignored.
15
 
                @type time: integer
16
 
                """
17
 
        def getDamp():
18
 
                """
19
 
                Returns the damping time of the constraint.
20
 
                
21
 
                @rtype: integer
22
 
                """
23
 
        def setMin(lower):
24
 
                """
25
 
                Sets the lower bound of the constraint.
26
 
                
27
 
                For rotational and orientation constraints, lower is specified in degrees.
28
 
                
29
 
                @type lower: float
30
 
                """
31
 
        def getMin():
32
 
                """
33
 
                Gets the lower bound of the constraint.
34
 
                
35
 
                For rotational and orientation constraints, the lower bound is returned in radians.
36
 
                
37
 
                @rtype: float
38
 
                """
39
 
        def setMax(upper):
40
 
                """
41
 
                Sets the upper bound of the constraint.
42
 
                
43
 
                For rotational and orientation constraints, upper is specified in degrees.
44
 
                
45
 
                @type upper: float
46
 
                """
47
 
        def getMax():
48
 
                """
49
 
                Gets the upper bound of the constraint.
50
 
                
51
 
                For rotational and orientation constraints, the upper bound is returned in radians.
52
 
                
53
 
                @rtype: float
54
 
                """
55
 
        def setLimit(limit):
56
 
                """
57
 
                Sets the type of constraint.
58
 
                
59
 
                See module L{GameLogic} for valid constraint types.
60
 
                
61
 
                @param limit:
62
 
                        Position constraints: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY, KX_CONSTRAINTACT_LOCZ
63
 
                        Rotation constraints: KX_CONSTRAINTACT_ROTX, KX_CONSTRAINTACT_ROTY or KX_CONSTRAINTACT_ROTZ
64
 
                        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
65
 
                        Orientation constraints: KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ
66
 
                """
67
 
        def getLimit():
68
 
                """
69
 
                Gets the type of constraint.
70
 
                
71
 
                See module L{GameLogic} for valid constraints.
72
 
                
73
 
                @return:
74
 
                        Position constraints: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY, KX_CONSTRAINTACT_LOCZ, 
75
 
                        Rotation constraints: KX_CONSTRAINTACT_ROTX, KX_CONSTRAINTACT_ROTY, KX_CONSTRAINTACT_ROTZ,
76
 
                        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,
77
 
                        Orientation constraints: KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ
78
 
                """
79
 
        def setRotDamp(duration):
80
 
                """
81
 
                Sets the time constant of the orientation constraint.
82
 
                
83
 
                @param duration: If the duration is negative, it is set to 0.
84
 
                @type duration: integer
85
 
                """
86
 
        def getRotDamp():
87
 
                """ 
88
 
                Returns the damping time for application of the constraint.
89
 
                
90
 
                @rtype: integer
91
 
                """
92
 
        def setDirection(vector):
93
 
                """
94
 
                Sets the reference direction in world coordinate for the orientation constraint
95
 
                
96
 
                @type vector: 3-tuple
97
 
                """
98
 
        def getDirection():
99
 
                """
100
 
                Returns the reference direction of the orientation constraint in world coordinate.
101
 
                
102
 
                @rtype: 3-tuple
103
 
                """
104
 
        def setOption(option):
105
 
                """
106
 
                Sets several options of the distance constraint.
107
 
                
108
 
                @type option: integer
109
 
                @param option: Binary combination of the following values:
110
 
                               64  : Activate alignment to surface
111
 
                               128 : Detect material rather than property
112
 
                               256 : No deactivation if ray does not hit target
113
 
                               512 : Activate distance control
114
 
                """
115
 
        def getOption():
116
 
                """
117
 
                Returns the option parameter.
118
 
                
119
 
                @rtype: integer
120
 
                """
121
 
        def setTime(duration):
122
 
                """
123
 
                Sets the activation time of the actuator.
124
 
                
125
 
                @type duration: integer
126
 
                @param duration: The actuator disables itself after this many frame.
127
 
                                 If set to 0 or negative, the actuator is not limited in time.
128
 
                """
129
 
        def getTime():
130
 
                """
131
 
                Returns the time parameter.
132
 
                
133
 
                @rtype: integer
134
 
                """
135
 
        def setProperty(property):
136
 
                """
137
 
                Sets the name of the property or material for the ray detection of the distance constraint.
138
 
                
139
 
                @type property: string
140
 
                @param property: If empty, the ray will detect any collisioning object.
141
 
                """
142
 
        def getProperty():
143
 
                """
144
 
                Returns the property parameter.
145
 
                
146
 
                @rtype: string
147
 
                """
148
 
        def setDistance(distance):
149
 
                """
150
 
                Sets the target distance in distance constraint.
151
 
                
152
 
                @type distance: float
153
 
                """
154
 
        def getDistance():
155
 
                """
156
 
                Returns the distance parameter.
157
 
                
158
 
                @rtype: float
159
 
                """
160
 
        def setRayLength(length):
161
 
                """
162
 
                Sets the maximum ray length of the distance constraint.
163
 
                
164
 
                @type length: float
165
 
                """
166
 
        def getRayLength():
167
 
                """
168
 
                Returns the length of the ray
169
 
                
170
 
                @rtype: float
171
 
                """
172
 
 
173
 
 
174
 
 
175
 
 
176
 
 
177
 
 
178
 
 
179
 
 
180