目录

Point2PointConstraint

Class Info

public class Point2PointConstraint extends Component implements Constraint

点对点约束组件。

Public Method Summary

Qualifier and Type

Method Name and Description

static Point2PointConstraint.Descriptor

descriptor()

获取点对点约束组件的描述符实例。

Node

getNodeA()

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

Node

getNodeB()

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

Vector3

getPivotA()

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

Vector3

getPivotB()

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

Constraint.Type

getType()

获取约束类型。

void

setNodeA(Node nodeA)

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

void

setNodeB(Node nodeB)

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

Point2PointConstraint

setPivotA(Vector3 pivotA)

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

Point2PointConstraint

setPivotB(Vector3 pivotB)

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

Public Methods

[h2]descriptor

Method

public static Point2PointConstraint.Descriptor descriptor()

获取点对点约束组件描述符实例。

Returns

Type

Description

Point2PointConstraint.Descriptor

点对点约束组件描述符实例。

[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]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 Point2PointConstraint setPivotA(Vector3 pivotA)

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

Parameters

Name

Description

pivotA

位置坐标。

Returns

Type

Description

Point2PointConstraint

自身实例。

[h2]setPivotB

Method

public Point2PointConstraint setPivotB(Vector3 pivotB)

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

Parameters

Name

Description

pivotB

位置坐标。

Returns

Type

Description

Point2PointConstraint

自身实例。