Represents the three coordinates of a point in three-dimensional space, using Single-precision floating point numbers.

Constructors

  • Returns Point3f

  • Initializes a new two-dimensional vector from two components.

    Parameters

    • x: number

      X component of vector.

    • y: number

      Y component of vector.

    • z: number

      Z component of vector.

    Returns Point3f

Properties

X: number
Y: number
Z: number
origin: Point3f

Gets the value of a point at location 0,0,0.

unset: Point3f

Gets the value of a point at location RhinoMath.UnsetValue,RhinoMath.UnsetValue,RhinoMath.UnsetValue.

Methods

  • Adds a point to another point.

    (Provided for languages that do not support operator overloading. You can use the + operator otherwise)

    Parameters

    Returns Point3f

    A new point that is the sum of point1 plus point2.

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

    (Provided for languages that do not support operator overloading. You can use the + operator otherwise)

    Parameters

    Returns Point3f

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

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

    (Provided for languages that do not support operator overloading. You can use the + operator otherwise)

    Parameters

    Returns Point3f

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

  • Compares this Point3f with another Point3f.

    Component evaluation priority is first X, then Y, then Z.

    Parameters

    • point3f: Point3f
    • other: Point3f

      The other Point3d to use in comparison.

    Returns number

    0: if this is identical to other -1: if this.X < other.X -1: if this.X == other.X and this.Y < other.Y -1: if this.X == other.X and this.Y == other.Y and this.Z < other.Z +1: otherwise.

  • Returns Point3f

  • Initializes a new two-dimensional vector from two components.

    Parameters

    • x: number

      X component of vector.

    • y: number

      Y component of vector.

    • z: number

      Z component of vector.

    Returns Point3f

  • Computes the distance between two points.

    Parameters

    Returns number

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

  • Computes the squared distance between two points.

    Parameters

    Returns number

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

  • Divides a point by a factor.

    (Provided for languages that do not support operator overloading. You can use the / operator otherwise)

    Parameters

    • point: Point3f

      A point.

    • value: number

      A value.

    Returns Point3f

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

  • This object as a JSON-compatible dict (rhino3dm only; inverse: Decode).

    Parameters

    Returns Record<string, any>

    A dict of numbers and strings: geometry and other objects are stored as their 3dm archive, base64 encoded, with the archive version.

  • Check that all values in other are within epsilon of the values in this

    Parameters

    Returns boolean

  • Determines whether the specified Point3f has the same values as the present point.

    Parameters

    Returns boolean

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

  • Each coordinate of the point must pass the RhinoMath.IsValidSingle test.

    Parameters

    Returns boolean

  • Multiplies a point by a factor.

    (Provided for languages that do not support operator overloading. You can use the * operator otherwise)

    Parameters

    • point: Point3f

      A point.

    • value: number

      A value.

    Returns Point3f

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

  • Multiplies a point by a factor.

    (Provided for languages that do not support operator overloading. You can use the * operator otherwise)

    Parameters

    • value: number

      A value.

    • point: Point3f

      A point.

    Returns Point3f

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

  • Computes the additive inverse of all coordinates in the point, and returns the new point.

    (Provided for languages that do not support operator overloading. You can use the - unary operator otherwise)

    Parameters

    Returns Point3f

    A point value that, when summed with the point input, yields the Origin.

  • Subtracts a vector from a point.

    (Provided for languages that do not support operator overloading. You can use the - operator otherwise)

    Parameters

    Returns Point3f

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

  • Subtracts a point from another point.

    (Provided for languages that do not support operator overloading. You can use the - operator otherwise)

    Parameters

    Returns Vector3f

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

  • Constructs the string representation for the current point.

    Parameters

    Returns string

    The point representation in the form X,Y,Z.

  • Transforms the present point in place. The transformation matrix acts on the left of the point. i.e.,

    result = transformation*point

    Parameters

    Returns void