# Point3d

Kind of class: public class org.casalib.math.geom none 09/23/08 Aaron Clinger, David Bliss, Mike Creighton org.casalib.math.geom.Point3d Wednesday, 31 December 2008, 20:18:28
Stores location of a point in a three-dimensional coordinate system, where x represents the horizontal axis, y represents the vertical axis, z represents the axis that is vertically perpendicular to the x/y axis or depth.

## Summary

Constructor
• Point3d (x:Number = 0, y:Number = 0, z:Number = 0)
• Creates a new Point3d.
Instance properties
• x : Number
• The horizontal coordinate of the point.
• y : Number
• The vertical coordinate of the point.
• z : Number
• The depth coordinate of the point.
Class methods
• distance (firstPoint:Point3d) : Number
• Determines the distance between the first and second points in 3D space.
• interpolate (firstPoint:Point3d) : Point3d
• Determines a point between two specified points.
Instance methods
• add (point:Point3d) : Point3d
• Adds the coordinates of another Point3d to the coordinates of this point to create a new Point3d.
• subtract (point:Point3d) : Point3d
• Subtracts the coordinates of another Point3d from the coordinates of this point to create a new Point3d.
• offset (xOffset:Number, yOffset:Number, zOffset:Number) : void
• Offsets the Point object by the specified amount.
• equals (point:Point3d) : Boolean
• Determines if the point specified in the point parameter is equal to this point object.
• clone
• Creates a copy of this Point3d object.

## Constructor

### Point3d

public function Point3d (
x:Number = 0, y:Number = 0, z:Number = 0)

Creates a new Point3d.
Parameters:
x:
The horizontal coordinate of the point.
y:
The vertical coordinate of the point.
z:
The depth coordinate of the point.

## Instance properties

### x

public x:Number
(read,write)

The horizontal coordinate of the point.

### y

public y:Number
(read,write)

The vertical coordinate of the point.

### z

public z:Number
(read,write)

The depth coordinate of the point.

## Class methods

### distance

public static function distance (
firstPoint:Point3d, secondPoint:Point3d) : Number

Determines the distance between the first and second points in 3D space.
Parameters:
firstPoint :
The first Point3d.
secondPoint:
The second Point3d.
Returns:
• Distance between the two points.

### interpolate

public static function interpolate (
firstPoint:Point3d, secondPoint:Point3d, amount:Percent) : Point3d

Determines a point between two specified points.
Parameters:
firstPoint :
The first Point3d.
secondPoint:
The second Point3d.
amount :
The level of interpolation between the two points. If `0%`, `firstPoint` is returned; if `100%`, `secondPoint` is returned.
Returns:
• The new, interpolated point.

## Instance methods

### add

public function add (
point:Point3d) : Point3d

Adds the coordinates of another Point3d to the coordinates of this point to create a new Point3d.
Parameters:
point:
The point to be added.
Returns:
• The new point.

### clone

public function clone (

Creates a copy of this Point3d object.
Returns:
• A new Point3d with the same values as this point.

### equals

public function equals (
point:Point3d) : Boolean

Determines if the point specified in the `point` parameter is equal to this point object.
Parameters:
point:
A Point3d object.
Returns:
• Returns `true` if shape's location is identical; otherwise `false`.

### offset

public function offset (
xOffset:Number, yOffset:Number, zOffset:Number) : void

Offsets the Point object by the specified amount.
Parameters:
xOffset:
The amount by which to offset the horizontal coordinate.
yOffset:
The amount by which to offset the vertical coordinate.
zOffset:
The amount by which to offset the depth coordinate.

### subtract

public function subtract (
point:Point3d) : Point3d

Subtracts the coordinates of another Point3d from the coordinates of this point to create a new Point3d.
Parameters:
point:
The point to be subtracted.
Returns:
• The new point.