Class Info |
|---|
public class HingeConstraint extends Component implements Constraint 铰链约束组件。 |
Qualifier and Type | Method Name and Description |
|---|---|
static HingeConstraint.Descriptor | 获取铰链约束组件的描述符实例。 |
getAxisA() 获取节点A的旋转轴。 | |
getAxisB() 获取节点B的旋转轴。 | |
float | 获取铰链约束组件角度下限值。 |
getNodeA() 获取铰链约束组件连接的节点A。 | |
getNodeB() 获取铰链约束组件连接的节点B。 | |
| 获取以节点A重心为坐标原点的铰链约束组件的中心点位置坐标。 | |
| 获取以节点B重心为坐标原点的铰链约束组件的中心点位置坐标。 | |
getType() 获取约束组件类型。 | |
float | 获取铰链约束组件角度上限值。 |
| 设置节点A的旋转轴。 | |
| 设置节点B的旋转轴。 | |
setLowerLimit(float lowerLimit) 设置铰链约束组件角度下限值。 | |
void | 设置铰链约束组件连接的节点A。 |
void | 设置铰链约束组件连接的节点B。 |
| 设置以节点A重心为坐标原点的铰链约束组件的中心点位置坐标。 | |
| 设置以节点B重心为坐标原点的铰链约束组件的中心点位置坐标。 | |
setUpperLimit(float upperLimit) 设置铰链约束组件角度上限值。 |
Method |
|---|
public static HingeConstraint.Descriptor descriptor() 获取铰链约束组件描述符实例。 |
Returns
Type | Description |
|---|---|
铰链约束组件描述符实例。 |
Method |
|---|
public float getLowerLimit() 获取铰链约束组件角度下限值。 |
Returns
Type | Description |
|---|---|
float | 角度下限值。 |
Method |
|---|
public Vector3 getPivotA() 获取以节点A重心为坐标原点的铰链约束组件的中心点位置坐标。 |
Returns
Type | Description |
|---|---|
位置坐标。 |
Method |
|---|
public Vector3 getPivotB() 获取以节点B重心为坐标原点的铰链约束组件的中心点位置坐标。 |
Returns
Type | Description |
|---|---|
位置坐标。 |
Method |
|---|
public float geUpperLimit() 获取铰链约束组件角度上限值。 |
Returns
Type | Description |
|---|---|
float | 角度上限值。 |
Method |
|---|
public HingeConstraint setAxisA(Vector3 axisA) 设置节点A的旋转轴。 |
Parameters
Name | Description |
|---|---|
axisA | 旋转轴。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public HingeConstraint setAxisB(Vector3 axisB) 设置节点B旋转轴。 |
Parameters
Name | Description |
|---|---|
axisB | 旋转轴。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public HingeConstraint setLowerLimit(float lowerLimit) 设置铰链约束组件旋转角度下限值。 |
Parameters
Name | Description |
|---|---|
lowerLimit | 旋转角度下限值。 |
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 HingeConstraint setPivotA(Vector3 pivotA) 设置以节点A重心为坐标原点的铰链约束组件的中心点位置坐标。 |
Parameters
Name | Description |
|---|---|
pivotA | 位置坐标。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public HingeConstraint setPivotB(Vector3 pivotB) 设置以节点B重心为坐标原点的铰链约束组件的中心点位置坐标。 |
Parameters
Name | Description |
|---|---|
pivotB | 位置坐标。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public HingeConstraint setUpperLimit(float upperLimit) 设置铰链约束组件角度上限值。 |
Parameters
Name | Description |
|---|---|
upperLimit | 旋转角度上限值。 |
Returns
Type | Description |
|---|---|
自身实例。 |