Header menu logo Euclid

Pnt Type

An immutable 3D point. Made up from 3 floats: X, Y, and Z. A 3D point represents a location in space, but not direction or an offset. (use Vec for that.) (2D Points are called 'Pt' )

Record fields

Record Field Description

X

Full Usage: X

Field type: float

Gets the X part of this 3D point.

Field type: float

Y

Full Usage: Y

Field type: float

Gets the Y part of this 3D point.

Field type: float

Z

Full Usage: Z

Field type: float

Gets the Z part of this 3D point.

Field type: float

Constructors

Constructor Description

Pnt(x, y, z)

Full Usage: Pnt(x, y, z)

Parameters:
    x : float
    y : float
    z : float

Returns: Pnt

Create a new 3D point. Made up from 3 floats: X, Y, and Z.

x : float
y : float
z : float
Returns: Pnt

Instance members

Instance member Description

this.AsString

Full Usage: this.AsString

Returns: string

Format 3D point into string with nice floating point number formatting of X, Y and Z But without full type name as in pt.ToString()

Returns: string

Static members

Static member Description

f * a

Full Usage: f * a

Parameters:
    f : float
    a : Pnt

Returns: Pnt
Modifiers: inline

Multiplies a scalar with a 3D point, also called scaling a point. Returns a new 3D point.

f : float
a : Pnt
Returns: Pnt

a * f

Full Usage: a * f

Parameters:
    a : Pnt
    f : float

Returns: Pnt
Modifiers: inline

Multiplies a 3D point with a scalar, also called scaling a point. Returns a new 3D point.

a : Pnt
f : float
Returns: Pnt

p + v

Full Usage: p + v

Parameters:
Returns: Pnt
Modifiers: inline

Add a unit-vector to a 3D point. Returns a new 3D point.

p : Pnt
v : UnitVec
Returns: Pnt

p + v

Full Usage: p + v

Parameters:
Returns: Pnt
Modifiers: inline

Add a vector to a 3D point. Returns a new 3D point.

p : Pnt
v : Vec
Returns: Pnt

a + b

Full Usage: a + b

Parameters:
Returns: Pnt
Modifiers: inline

Add two 3D points together. Returns a new 3D point.

a : Pnt
b : Pnt
Returns: Pnt

p - v

Full Usage: p - v

Parameters:
Returns: Pnt
Modifiers: inline

Subtract a vector from a 3D point. Returns a new 3D point.

p : Pnt
v : Vec
Returns: Pnt

p - v

Full Usage: p - v

Parameters:
Returns: Pnt
Modifiers: inline

Subtract a unit-vector from a 3D point. Returns a new 3D point.

p : Pnt
v : UnitVec
Returns: Pnt

a - b

Full Usage: a - b

Parameters:
Returns: Vec
Modifiers: inline

Subtract one 3D point from another. 'a-b' returns a new 3D vector from b to a.

a : Pnt
b : Pnt
Returns: Vec

p / f

Full Usage: p / f

Parameters:
    p : Pnt
    f : float

Returns: Pnt
Modifiers: inline

Divides a 3D point by a scalar, also be called dividing/scaling a point. Returns a new 3D point.

p : Pnt
f : float
Returns: Pnt

Pnt.DivideByInt(pt, i)

Full Usage: Pnt.DivideByInt(pt, i)

Parameters:
    pt : Pnt
    i : int

Returns: Pnt

Divides the 3D point by an integer. (This member is needed by Array.average and similar functions)

pt : Pnt
i : int
Returns: Pnt

Pnt.Origin

Full Usage: Pnt.Origin

Returns: Pnt
Modifiers: inline

Same as Pnt.Zero.

Returns: Pnt

Pnt.Zero

Full Usage: Pnt.Zero

Returns: Pnt
Modifiers: inline

Same as Pnt.Origin.

Returns: Pnt

Type something to start searching.