Class Info |
|---|
public class SpringConstraint extends Component implements Constraint 弹簧约束组件。 |
Qualifier and Type | Method Name and Description |
|---|---|
static SpringConstraint.Descriptor | 获取弹簧约束组件描述符实例。 |
| 获取角度位移下限。 | |
| 获取角度位移上限。 | |
getAxis() 获取轴类型。 | |
float | 获取阻尼系数。 |
| 获取节点A相对约束点的位置坐标。 | |
| 获取节点B相对约束点的位置坐标。 | |
| 获取节点A相对约束点的旋转四元数。 | |
| 获取节点B相对约束点的旋转四元数。 | |
| 获取线性位移下限。 | |
| 获取线性位移上限。 | |
getNodeA() 获取弹簧约束组件的节点A。 | |
getNodeB() 获取弹簧约束组件的节点B。 | |
float | 获取刚度。 |
getType() 获取约束类型。 | |
setAngularLowerLimit(Vector3 value) 设置角度位移下限。 | |
setAngularUpperLimit(Vector3 value) 设置角度位移上限。 | |
setAxis(SpringConstraint.AxisType axis) 设置坐标轴。 | |
setDamping(float value) 设置阻尼系数。 | |
setFramePositionInA(Vector3 framePositionInA) 设置节点A相对约束点的位置坐标。 | |
setFramePositionInB(Vector3 framePositionInB) 设置节点B相对约束点的位置坐标。 | |
setFrameRotationInA(Quaternion frameRotationInA) 设置节点A相对约束点的旋转四元数。 | |
setFrameRotationInB(Quaternion frameRotationInB) 设置节点B相对约束点的旋转四元数。 | |
setLinearLowerLimit(Vector3 value) 设置线性位移下限。 | |
setLinearUpperLimit(Vector3 value) 设置线性位移上限。 | |
void | 设置弹簧约束组件的节点A。 |
void | 设置弹簧约束组件的节点B。 |
setStiffness(float value) 设置刚度。 |
Method |
|---|
public static SpringConstraint.Descriptor descriptor() 获取弹簧约束组件描述符实例。 |
Returns
Type | Description |
|---|---|
弹簧约束组件描述符实例。 |
Method |
|---|
public Vector3 getAngularLowerLimit() 获取角度位移下限。 |
Returns
Type | Description |
|---|---|
角度位移下限。 |
Method |
|---|
public Vector3 getAngularUpperLimit() 获取角度位移上限。 |
Returns
Type | Description |
|---|---|
角度位移上限。 |
Method |
|---|
public Vector3 getFramePositionInA() 获取节点A相对约束点的位置坐标。 |
Returns
Type | Description |
|---|---|
位置坐标。 |
Method |
|---|
public Vector3 getFramePositionInB() 获取节点B相对约束点的位置坐标。 |
Returns
Type | Description |
|---|---|
位置坐标。 |
Method |
|---|
public Quaternion getFrameRotationInA() 获取节点A相对约束点的旋转四元数。 |
Returns
Type | Description |
|---|---|
旋转四元数。 |
Method |
|---|
public Quaternion getFrameRotationInB() 获取节点B相对约束点的旋转四元数。 |
Returns
Type | Description |
|---|---|
旋转四元数。 |
Method |
|---|
public Vector3 getLinearLowerLimit() 获取线性位移下限。 |
Returns
Type | Description |
|---|---|
线性位移下限。 |
Method |
|---|
public Vector3 getLinearUpperLimit() 获取线性位移上限。 |
Returns
Type | Description |
|---|---|
线性位移上限。 |
Method |
|---|
public SpringConstraint setAngularLowerLimit(Vector3 value) 设置角度位移下限。 |
Parameters
Name | Description |
|---|---|
value | 角度位移下限。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setAngularUpperLimit(Vector3 value) 设置角度位移上限。 |
Parameters
Name | Description |
|---|---|
value | 角度位移上限。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setAxis(SpringConstraint.AxisType axis) 设置坐标轴。 |
Parameters
Name | Description |
|---|---|
axis | 坐标轴。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setDamping(float value) 设置阻尼系数。 |
Parameters
Name | Description |
|---|---|
value | 阻尼系数,取值范围[0, 1]。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setFramePositionInA(Vector3 framePositionInA) 设置节点A相对约束点的位置坐标。 |
Parameters
Name | Description |
|---|---|
framePositionInA | 位置坐标。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setFramePositionInB(Vector3 framePositionInB) 设置节点B相对约束点的位置坐标。 |
Parameters
Name | Description |
|---|---|
framePositionInB | 位置坐标。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setFrameRotationInA(Quaternion frameRotationInA) 设置节点A相对约束点的旋转四元数。 |
Parameters
Name | Description |
|---|---|
frameRotationInA | 旋转四元数。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setFrameRotationInB(Quaternion frameRotationInB) 设置节点B相对约束点的旋转四元数。 |
Parameters
Name | Description |
|---|---|
frameRotationInB | 旋转四元数。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setLinearLowerLimit(Vector3 value) 设置线性位移下限。 |
Parameters
Name | Description |
|---|---|
value | 线性位移下限。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public SpringConstraint setLinearUpperLimit(Vector3 value) 设置线性位移上限。 |
Parameters
Name | Description |
|---|---|
value | 线性位移上限。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public void setNodeA(Node nodeA) 设置弹簧约束组件的节点A。 |
Parameters
Name | Description |
|---|---|
nodeA | 弹簧约束组件的节点A。 |
Method |
|---|
public void setNodeB(Node nodeB) 设置弹簧约束组件的节点B。 |
Parameters
Name | Description |
|---|---|
nodeB | 弹簧约束组件的节点B。 |
Method |
|---|
public SpringConstraint setStiffness(float value) 设置刚度。 |
Parameters
Name | Description |
|---|---|
value | 刚度值。 |
Returns
Type | Description |
|---|---|
自身实例。 |