Class Point3d

Represents the three coordinates of a point in three-dimensional space, using floating point values.

Hierarchy

  • Point3d

Constructors

  • Initializes a new point by defining the X, Y and Z coordinates.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns Point3d

Properties

X: number

Gets or sets the X (first) component of the point.

Y: number

Gets or sets the Y (second) component of the point.

Z: number

Gets or sets the Z (third) component of the point.

Accessors

  • get Origin(): Point3d
  • Gets the value of a point at location 0,0,0.

    Returns Point3d

Methods

  • Sums up a point and a vector, and returns a new point.

    Returns

    A new point that results from the addition of point and vector.

    Parameters

    Returns Point3d

  • Sums up a point and a point, and returns a new point.

    Returns

    A new point that results from the addition of point and point.

    Parameters

    Returns Point3d

  • Clone this point

    Returns

    A new point that is a copy of this point.

    Returns Point3d

  • Computes distance to another point.

    Returns

    The length of the line between this and the other point; or 0 if any of the points is not valid.

    Parameters

    Returns number

  • Divides a Point3d by a number.

    Returns

    A new point that is coordinate-wise divided by t.

    Parameters

    • factor: number

      the factor to divide this point by.

    Returns Point3d

  • Determines whether it equials to other point.

    Parameters

    • other: Point3d

      Another point to compare.

    Returns boolean

  • Multiplies a Point3d by a number.

    Returns

    A new point that is coordinate-wise multiplied by t.

    Parameters

    • factor: number

      the factor to multiply this point by.

    Returns Point3d

  • Subtracts a vector from a point.

    Returns

    A new point that is the difference of point minus vector.

    Parameters

    Returns Point3d

  • Subtracts a point from a point.

    Returns

    A new point that is the difference of point minus vector.

    Parameters

    Returns Vector3d

  • Transforms the point and return a new point The transformation matrix acts on the left of the point; i.e., result = transformation * point

    Parameters

    • transformation: Transform

      Transformation matrix to apply.

    Returns Point3d

  • override toString

    Returns string

  • Sums up a point and a vector, and returns a new point.

    Returns

    A new point that results from the addition of point and vector.

    Parameters

    Returns Point3d

  • Sums up a point and a point, and returns a new vector.

    Returns

    A new point that results from the addition of point1 and point2.

    Parameters

    Returns Point3d

  • Initializes a new point by copying coordinates from another point.

    Parameters

    Returns Point3d

  • Initializes a new point by copying coordinates from the components of a vector.

    Parameters

    Returns Point3d

  • Computes distance between two points.

    Parameters

    Returns number

  • Divides a Point3d by a number.

    Returns

    A new point that is coordinate-wise divided by t.

    Parameters

    • point: Point3d

      A point.

    • t: number

      A number.

    Returns Point3d

  • Determines whether two points have the same value.

    Returns

    true if point has the same coordinates as this; otherwise false.

    Parameters

    Returns boolean

  • Interpolate between two points.

    Returns

    A new point that is the linear interpolation between a and b at t.

    Parameters

    • v1: Point3d
    • v2: Point3d
    • t: number

      Interpolation parameter. If t=0 then this point is set to pA. If t=1 then this point is set to pB. Values of t in between 0.0 and 1.0 result in points between pA and pB.

    Returns Point3d

  • Multiplies a Point3d by a number.

    Returns

    A new point that is coordinate-wise multiplied by t.

    Parameters

    • point: Point3d

      A point.

    • t: number

      A number.

    Returns Point3d

  • Subtracts a vector from a point.

    Returns

    A new point that is the difference of point minus vector.

    Parameters

    Returns Point3d

  • Subtracts a point from a point.

    Returns

    A new point that is the difference of point minus vector.

    Parameters

    Returns Vector3d

Generated using TypeDoc