目录

HingeConstraint

Class Info

public class HingeConstraint extends Component implements Constraint

铰链约束组件。

Public Method Summary

Qualifier and Type

Method Name and Description

static HingeConstraint.Descriptor

descriptor()

获取铰链约束组件的描述符实例。

Vector3

getAxisA()

获取节点A的旋转轴。

Vector3

getAxisB()

获取节点B的旋转轴。

float

getLowerLimit()

获取铰链约束组件角度下限值。

Node

getNodeA()

获取铰链约束组件连接的节点A。

Node

getNodeB()

获取铰链约束组件连接的节点B。

Vector3

getPivotA()

获取以节点A重心为坐标原点的铰链约束组件的中心点位置坐标。

Vector3

getPivotB()

获取以节点B重心为坐标原点的铰链约束组件的中心点位置坐标。

Constraint.Type

getType()

获取约束组件类型。

float

getUpperLimit()

获取铰链约束组件角度上限值。

HingeConstraint

setAxisA(Vector3 axisA)

设置节点A的旋转轴。

HingeConstraint

setAxisB(Vector3 axisB)

设置节点B的旋转轴。

HingeConstraint

setLowerLimit(float lowerLimit)

设置铰链约束组件角度下限值。

void

setNodeA(Node nodeA)

设置铰链约束组件连接的节点A。

void

setNodeB(Node nodeB)

设置铰链约束组件连接的节点B。

HingeConstraint

setPivotA(Vector3 pivotA)

设置以节点A重心为坐标原点的铰链约束组件的中心点位置坐标。

HingeConstraint

setPivotB(Vector3 pivotB)

设置以节点B重心为坐标原点的铰链约束组件的中心点位置坐标。

HingeConstraint

setUpperLimit(float upperLimit)

设置铰链约束组件角度上限值。

Public Methods

[h2]descriptor

Method

public static HingeConstraint.Descriptor descriptor()

获取铰链约束组件描述符实例。

Returns

Type

Description

HingeConstraint.Descriptor

铰链约束组件描述符实例。

[h2]getAxisA

Method

public Vector3 getAxisA()

获取节点A的旋转轴。

Returns

Type

Description

Vector3

旋转轴。

[h2]getAxisB

Method

public Vector3 getAxisB()

获取节点B的旋转轴。

Returns

Type

Description

Vector3

旋转轴。

[h2]getLowerLimit

Method

public float getLowerLimit()

获取铰链约束组件角度下限值。

Returns

Type

Description

float

角度下限值。

[h2]getNodeA

Method

public Node getNodeA()

获取铰链约束组件连接的节点A。

Returns

Type

Description

Node

铰链约束组件连接的节点A。

[h2]getNodeB

Method

public Node getNodeB()

获取铰链约束组件连接的节点B。

Returns

Type

Description

Node

铰链约束组件连接的节点B。

[h2]getPivotA

Method

public Vector3 getPivotA()

获取以节点A重心为坐标原点的铰链约束组件的中心点位置坐标。

Returns

Type

Description

Vector3

位置坐标。

[h2]getPivotB

Method

public Vector3 getPivotB()

获取以节点B重心为坐标原点的铰链约束组件的中心点位置坐标。

Returns

Type

Description

Vector3

位置坐标。

[h2]getType

Method

public Constraint.Type getType()

获取约束类型。

Returns

Type

Description

Constraint.Type

约束类型。

[h2]getUpperLimit

Method

public float geUpperLimit()

获取铰链约束组件角度上限值。

Returns

Type

Description

float

角度上限值。

[h2]setAxisA

Method

public HingeConstraint setAxisA(Vector3 axisA)

设置节点A的旋转轴。

Parameters

Name

Description

axisA

旋转轴。

Returns

Type

Description

HingeConstraint

自身实例。

[h2]setAxisB

Method

public HingeConstraint setAxisB(Vector3 axisB)

设置节点B旋转轴。

Parameters

Name

Description

axisB

旋转轴。

Returns

Type

Description

HingeConstraint

自身实例。

[h2]setLowerLimit

Method

public HingeConstraint setLowerLimit(float lowerLimit)

设置铰链约束组件旋转角度下限值。

Parameters

Name

Description

lowerLimit

旋转角度下限值。

Returns

Type

Description

HingeConstraint

自身实例。

[h2]setNodeA

Method

public void setNodeA(Node nodeA)

设置铰链约束组件连接的节点A。

Parameters

Name

Description

nodeA

铰链约束组件连接的节点A。

[h2]setNodeB

Method

public void setNodeB(Node nodeB)

设置铰链约束组件连接的节点B。

Parameters

Name

Description

nodeB

铰链约束组件连接的节点B。

[h2]setPivotA

Method

public HingeConstraint setPivotA(Vector3 pivotA)

设置以节点A重心为坐标原点的铰链约束组件的中心点位置坐标。

Parameters

Name

Description

pivotA

位置坐标。

Returns

Type

Description

HingeConstraint

自身实例。

[h2]setPivotB

Method

public HingeConstraint setPivotB(Vector3 pivotB)

设置以节点B重心为坐标原点的铰链约束组件的中心点位置坐标。

Parameters

Name

Description

pivotB

位置坐标。

Returns

Type

Description

HingeConstraint

自身实例。

[h2]setUpperLimit

Method

public HingeConstraint setUpperLimit(float upperLimit)

设置铰链约束组件角度上限值。

Parameters

Name

Description

upperLimit

旋转角度上限值。

Returns

Type

Description

HingeConstraint

自身实例。