summaryrefslogtreecommitdiff
path: root/meta/3rd/Cocos4.0/library/cc.Physics3DRigidBody.lua
blob: 5c68569d92e615d74074da65f69bf2e17f0f079a (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
---@meta

---@class cc.Physics3DRigidBody :cc.Physics3DObject
local Physics3DRigidBody={ }
cc.Physics3DRigidBody=Physics3DRigidBody




---*  Set the acceleration. 
---@param acceleration vec3_table
---@return self
function Physics3DRigidBody:setGravity (acceleration) end
---*  Get friction. 
---@return float
function Physics3DRigidBody:getFriction () end
---@overload fun(vec3_table0:float):self
---@overload fun(vec3_table:vec3_table):self
---@param angFac vec3_table
---@return self
function Physics3DRigidBody:setAngularFactor (angFac) end
---* 
---@param constraint cc.Physics3DConstraint
---@return self
function Physics3DRigidBody:addConstraint (constraint) end
---*  Get the pointer of btRigidBody. 
---@return btRigidBody
function Physics3DRigidBody:getRigidBody () end
---*  Get total force. 
---@return vec3_table
function Physics3DRigidBody:getTotalForce () end
---*  Get the total number of constraints. 
---@return unsigned_int
function Physics3DRigidBody:getConstraintCount () end
---* Apply a central force.<br>
---* param   force the value of the force
---@param force vec3_table
---@return self
function Physics3DRigidBody:applyCentralForce (force) end
---*  Set mass and inertia. 
---@param mass float
---@param inertia vec3_table
---@return self
function Physics3DRigidBody:setMassProps (mass,inertia) end
---*  Set friction. 
---@param frict float
---@return self
function Physics3DRigidBody:setFriction (frict) end
---*  Set kinematic object. 
---@param kinematic boolean
---@return self
function Physics3DRigidBody:setKinematic (kinematic) end
---*  Set linear damping and angular damping. 
---@param lin_damping float
---@param ang_damping float
---@return self
function Physics3DRigidBody:setDamping (lin_damping,ang_damping) end
---* Apply a impulse.<br>
---* param   impulse the value of the impulse<br>
---* param   rel_pos the position of the impulse
---@param impulse vec3_table
---@param rel_pos vec3_table
---@return self
function Physics3DRigidBody:applyImpulse (impulse,rel_pos) end
---*  Check rigid body is kinematic object. 
---@return boolean
function Physics3DRigidBody:isKinematic () end
---* Apply a torque.<br>
---* param   torque the value of the torque
---@param torque vec3_table
---@return self
function Physics3DRigidBody:applyTorque (torque) end
---*  Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold 
---@param ccdMotionThreshold float
---@return self
function Physics3DRigidBody:setCcdMotionThreshold (ccdMotionThreshold) end
---*  Set rolling friction. 
---@param frict float
---@return self
function Physics3DRigidBody:setRollingFriction (frict) end
---*  Get motion threshold. 
---@return float
function Physics3DRigidBody:getCcdMotionThreshold () end
---*  Get the linear factor. 
---@return vec3_table
function Physics3DRigidBody:getLinearFactor () end
---*  Damps the velocity, using the given linearDamping and angularDamping. 
---@param timeStep float
---@return self
function Physics3DRigidBody:applyDamping (timeStep) end
---*  Get the angular velocity. 
---@return vec3_table
function Physics3DRigidBody:getAngularVelocity () end
---* 
---@param info cc.Physics3DRigidBodyDes
---@return boolean
function Physics3DRigidBody:init (info) end
---* Apply a torque impulse.<br>
---* param   torque the value of the torque
---@param torque vec3_table
---@return self
function Physics3DRigidBody:applyTorqueImpulse (torque) end
---*  Active or inactive. 
---@param active boolean
---@return self
function Physics3DRigidBody:setActive (active) end
---*  Set the linear factor. 
---@param linearFactor vec3_table
---@return self
function Physics3DRigidBody:setLinearFactor (linearFactor) end
---*  Set the linear velocity. 
---@param lin_vel vec3_table
---@return self
function Physics3DRigidBody:setLinearVelocity (lin_vel) end
---*  Get the linear velocity. 
---@return vec3_table
function Physics3DRigidBody:getLinearVelocity () end
---*  Set swept sphere radius. 
---@param radius float
---@return self
function Physics3DRigidBody:setCcdSweptSphereRadius (radius) end
---* Apply a force.<br>
---* param   force the value of the force<br>
---* param   rel_pos the position of the force
---@param force vec3_table
---@param rel_pos vec3_table
---@return self
function Physics3DRigidBody:applyForce (force,rel_pos) end
---*  Set the angular velocity. 
---@param ang_vel vec3_table
---@return self
function Physics3DRigidBody:setAngularVelocity (ang_vel) end
---* Apply a central impulse.<br>
---* param   impulse the value of the impulse
---@param impulse vec3_table
---@return self
function Physics3DRigidBody:applyCentralImpulse (impulse) end
---*  Get the acceleration. 
---@return vec3_table
function Physics3DRigidBody:getGravity () end
---*  Get rolling friction. 
---@return float
function Physics3DRigidBody:getRollingFriction () end
---*  Set the center of mass. 
---@param xform mat4_table
---@return self
function Physics3DRigidBody:setCenterOfMassTransform (xform) end
---*  Set the inverse of local inertia. 
---@param diagInvInertia vec3_table
---@return self
function Physics3DRigidBody:setInvInertiaDiagLocal (diagInvInertia) end
---@overload fun(cc.Physics3DConstraint0:unsigned_int):self
---@overload fun(cc.Physics3DConstraint:cc.Physics3DConstraint):self
---@param constraint cc.Physics3DConstraint
---@return self
function Physics3DRigidBody:removeConstraint (constraint) end
---*  Get total torque. 
---@return vec3_table
function Physics3DRigidBody:getTotalTorque () end
---*  Get inverse of mass. 
---@return float
function Physics3DRigidBody:getInvMass () end
---*  Get constraint by index. 
---@param idx unsigned_int
---@return cc.Physics3DConstraint
function Physics3DRigidBody:getConstraint (idx) end
---*  Get restitution. 
---@return float
function Physics3DRigidBody:getRestitution () end
---*  Get swept sphere radius. 
---@return float
function Physics3DRigidBody:getCcdSweptSphereRadius () end
---*  Get hit friction. 
---@return float
function Physics3DRigidBody:getHitFraction () end
---*  Get angular damping. 
---@return float
function Physics3DRigidBody:getAngularDamping () end
---*  Get the inverse of local inertia. 
---@return vec3_table
function Physics3DRigidBody:getInvInertiaDiagLocal () end
---*  Get the center of mass. 
---@return mat4_table
function Physics3DRigidBody:getCenterOfMassTransform () end
---*  Get the angular factor. 
---@return vec3_table
function Physics3DRigidBody:getAngularFactor () end
---*  Set restitution. 
---@param rest float
---@return self
function Physics3DRigidBody:setRestitution (rest) end
---*  Set hit friction. 
---@param hitFraction float
---@return self
function Physics3DRigidBody:setHitFraction (hitFraction) end
---*  Get linear damping. 
---@return float
function Physics3DRigidBody:getLinearDamping () end
---*  override. 
---@return mat4_table
function Physics3DRigidBody:getWorldTransform () end
---* 
---@return self
function Physics3DRigidBody:Physics3DRigidBody () end