API Docs for: 0.7.1
Show:

FrictionEquation Class

约束沿切线方向接触的滑动。

构造器

FrictionEquation

(
  • bodyA
  • bodyB
  • slipForce
)

参数:

  • bodyA Body
  • bodyB Body
  • slipForce Number

Methods

addToWlambda

(
  • deltalambda
)

添加约束速度到刚体中

参数:

  • deltalambda Number

computeB

() Number

计算SPOOK 方程的RHS 值(Computes the RHS of the SPOOK equation)

Returns:

Number:

computeGiMf

() Number

计算G值乘以 inv(M)(M 为每个物体对角线块的质量矩阵) 乘以f (刚体的作用力)

Returns:

Number:

computeGiMGt

() Number

计算G值乘以 inv(M)(M 为每个物体对角线块的质量矩阵) 乘以G的导数 G'

Returns:

Number:

computeGq

() Number

计算G值乘以q(q 为广义刚体坐标)

Returns:

Number:

computeGW

() Number

计算G值乘以W(W 为刚体的速度)

Returns:

Number:

computeGWlambda

() Number

计算G值乘以W lambda (W 为刚体的速度)

Returns:

Number:

computeInvC

(
  • eps
)
Number

计算SPOOK等式的分母部分:C = G * inv(M)* G'+ eps

参数:

  • eps Number

Returns:

Number:

getSlipForce

() Number

获取最大作用力 for the constraint.

Returns:

Number:

gmult

() Number

将雅可比项乘以相应的位置或速度

Returns:

Number:

setSlipForce

(
  • slipForce
)

设置约束的滑动条件,摩擦力不能大于这个值。

参数:

  • slipForce Number

update

()

根据当前参数计算SPOOK参数.a,.b和.epsilon。 参见SPOOK笔记中的等式9,10和11。.

Properties

bodyA

Body

将要参与约束的第一个刚体

bodyB

Body

将要参与约束的第二个刚体

contactEquations

ContactEquation

ContactEquations connected to this friction equation. The contact equations can be used to rescale the max force for the friction. If more than one contact equation is given, then the max force can be set to the average.

contactPointA

Array

Relative vector from center of body A to the contact point, world oriented.

contactPointB

Array

Relative vector from center of body B to the contact point, world oriented.

enabled

Boolean

设置或获取当前方程式的可用状态,如果为true, 它将被添加到求解中

frictionCoefficient

Number

The friction coefficient to use.

G

Array

两个连接对象的雅克布矩阵,包含了6个数字,分别是两个对象的x, y 和 angle

maxForce

Number

求解时施加的最大作用力

minForce

Number

求解时施加的最小作用力

multiplier

Number

由上一次求解得到的约束乘数,大致相当于约束所产生的作用力

needsUpdate

Boolean

标志刚度或弛豫是否改变

relativeVelocity

Number

相对速度

relaxation

Number

稳定约束方程所需的步进, 通常为3到5个步进

shapeA

Shape

The shape in body i that triggered this friction.

shapeB

Shape

The shape in body j that triggered this friction.

stiffness

Number

约束方程的刚度,通常使用一个较大的数字(〜1e7),但也可以自由设置一个数字以获得比较稳定的模拟

t

Array

面向世界的摩擦力作用的切线矢量。