Skip to content

[mxcad_3d API documentation](../README. md)/Mx3dGePoint

Class: Mx3dGePoint

Represents a point in three-dimensional space.

Provide constructors and methods for obtaining and setting the coordinates of points.

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new Mx3dGePoint()

By default, construct a point located at the origin (0,0,0).

Overrides

Mx3dGeObject.constructor

new Mx3dGePoint(theXYZ)

Construct a point using the given coordinate array.

Parameters

NameTypeDescription
TheXYZVectorcontains X, Y. An array of Z-coordinate values

Overrides

Mx3dGeObject.constructor

new Mx3dGePoint(theX, theY, theZ)

Using the given X, Y. Construct a point based on the Z-coordinate value.

Parameters

NameTypeDescription
TheXNumberX coordinate value
TheYNumberY coordinate value
TheZNumberZ coordinate value

Overrides

Mx3dGeObject.constructor

Methods

Vertex

Vertex(): Mx3dShapeVertex

Obtain the topological point shape of the current point

Returns

Mx3dShapeVertex

Topological point shape


X

X(): number

Obtain the X coordinate value of a point in the world coordinate system

Returns

number

X-coordinate value


Y

Y(): number

Obtain the Y-coordinate value of a point in the world coordinate system

Returns

number

Y coordinate value


Z

Z(): number

Obtain the Z-coordinate value of a point in the world coordinate system

Returns

number

Z-coordinate value


setX

setX(theX): void

Set the X coordinate value of the point in the world coordinate system

Parameters

NameTypeDescription
TheXnumberX coordinate value

Returns

void


setXYZ

setXYZ(theX, theY, theZ): void

Set the X, Y, Z coordinate values of the point in the world coordinate system

Parameters

NameTypeDescription
TheXnumberX coordinate value
TheYnumberY coordinate value
TheZnumberZ coordinate value

Returns

void


setY

setY(theY): void

Set the Y coordinate value of the point in the world coordinate system

Parameters

NameTypeDescription
TheYnumberY coordinate value

Returns

void


setZ

setZ(theZ): void

Set the Z-coordinate value of the point in the world coordinate system

Parameters

NameTypeDescription
TheZnumberZ coordinate value

Returns

void