public class Cad3DPoint extends Cad2DPoint
The Cad point.
Constructor and Description |
---|
Cad3DPoint()
Initializes a new instance of the
Cad3DPoint class. |
Cad3DPoint(double pointX,
double pointY)
Initializes a new instance of the
Cad3DPoint class. |
Cad3DPoint(double x,
double y,
double z)
Initializes a new instance of the
Cad3DPoint class. |
Cad3DPoint(int attributeZ)
Initializes a new instance of the
Cad3DPoint class, but only z attribute. |
Cad3DPoint(int attributeX,
int attributeY,
int attributeZ)
Initializes a new instance of the
Cad3DPoint class. |
Modifier and Type | Method and Description |
---|---|
static double |
angleBetween3Points(Cad3DPoint a,
Cad3DPoint b,
Cad3DPoint c)
Angles the between3 points.
|
static Cad3DPoint |
cross(Cad3DPoint vc1,
Cad3DPoint vc2)
The cross product of two vectors.
|
double |
distance(Cad3DPoint destination)
The distance.
|
static double |
dot(Cad3DPoint vc1,
Cad3DPoint vc2)
The dot product of two vectors.
|
double |
getZ()
Gets or sets the z.
|
Cad3DPoint |
inverse()
Inverses this instance.
|
double |
length()
The length.
|
static Cad3DPoint |
max(Cad3DPoint pt1,
Cad3DPoint pt2)
The maximum of two points.
|
static Cad3DPoint |
min(Cad3DPoint pt1,
Cad3DPoint pt2)
The minimum of two points.
|
static Cad3DPoint |
op_Addition(Cad3DPoint pt1,
Cad3DPoint pt2)
Sum of two points
|
static Cad3DPoint |
op_Multiply(Cad3DPoint pt,
double sc)
Multiplication of a point and a scalar
|
static Cad3DPoint |
op_Subtraction(Cad3DPoint pt1,
Cad3DPoint pt2)
Diff of two points
|
static Cad3DPoint |
rotatePoint(Cad3DPoint pointToRotate,
Cad3DPoint centerPoint,
double angleInRadians)
Rotates one point arount another one
|
void |
setZ(double value)
Gets or sets the z.
|
distance, getApsPoint, getX, getY, setX, setY
public Cad3DPoint()
Initializes a new instance of the Cad3DPoint
class.
public Cad3DPoint(double x, double y, double z)
Initializes a new instance of the Cad3DPoint
class.
x
- The x ordinate.y
- The y ordinate.z
- The z ordinate.public Cad3DPoint(int attributeZ)
Initializes a new instance of the Cad3DPoint
class, but only z attribute.
attributeZ
- The attribute z.public Cad3DPoint(int attributeX, int attributeY, int attributeZ)
Initializes a new instance of the Cad3DPoint
class.
attributeX
- The attribute x.attributeY
- The attribute y.attributeZ
- The attribute z.public Cad3DPoint(double pointX, double pointY)
Initializes a new instance of the Cad3DPoint
class.
pointX
- The pointX.pointY
- The point Y.public final double getZ()
Gets or sets the z.
public final void setZ(double value)
Gets or sets the z.
public static double angleBetween3Points(Cad3DPoint a, Cad3DPoint b, Cad3DPoint c)
Angles the between3 points.
a
- First Pointb
- second pointc
- third pointpublic static Cad3DPoint rotatePoint(Cad3DPoint pointToRotate, Cad3DPoint centerPoint, double angleInRadians)
Rotates one point arount another one
pointToRotate
- the point to rotatecenterPoint
- the centre point of rotationangleInRadians
- The angle In Radians.public final double distance(Cad3DPoint destination)
The distance.
destination
- The destination.double
.public final double length()
The length.
double
.public static Cad3DPoint cross(Cad3DPoint vc1, Cad3DPoint vc2)
The cross product of two vectors.
vc1
- The first vectorvc2
- The second vectorpublic static double dot(Cad3DPoint vc1, Cad3DPoint vc2)
The dot product of two vectors.
vc1
- The first vectorvc2
- The second vectorpublic static Cad3DPoint min(Cad3DPoint pt1, Cad3DPoint pt2)
The minimum of two points.
pt1
- The first pointpt2
- The second pointpublic static Cad3DPoint max(Cad3DPoint pt1, Cad3DPoint pt2)
The maximum of two points.
pt1
- The first pointpt2
- The second pointpublic final Cad3DPoint inverse()
Inverses this instance.
public static Cad3DPoint op_Addition(Cad3DPoint pt1, Cad3DPoint pt2)
Sum of two points
pt1
- The first pointpt2
- The second pointpublic static Cad3DPoint op_Subtraction(Cad3DPoint pt1, Cad3DPoint pt2)
Diff of two points
pt1
- The first pointpt2
- The second pointpublic static Cad3DPoint op_Multiply(Cad3DPoint pt, double sc)
Multiplication of a point and a scalar
pt
- The pointsc
- The scalar