java.lang.Object
uk.ac.leeds.ccg.v3d.core.V3D_Object
uk.ac.leeds.ccg.v3d.geometry.V3D_Geometry
uk.ac.leeds.ccg.v3d.geometry.V3D_Point
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<V3D_Point>,V3D_FiniteGeometry
public class V3D_Point extends V3D_Geometry implements java.lang.Comparable<V3D_Point>, V3D_FiniteGeometry
V3D_Point
- Version:
- 1.0
- Author:
- Andy Turner
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description V3D_Point(V3D_Environment e, ch.obermuhlner.math.big.BigRational x, ch.obermuhlner.math.big.BigRational y, ch.obermuhlner.math.big.BigRational z)V3D_Point(V3D_Point p) -
Method Summary
Modifier and Type Method Description V3D_Pointapply(V3D_Vector v)intcompareTo(V3D_Point o)booleanequals(java.lang.Object o)java.math.BigDecimalgetDistance(V3D_Line l, int scale, java.math.RoundingMode rm)Get the distance between this andl.java.math.BigDecimalgetDistance(V3D_Plane pl, int scale, java.math.RoundingMode rm)Get the distance between this andpl.java.math.BigDecimalgetDistance(V3D_Point p, int scale, java.math.RoundingMode rm)Get the distance between this andp.ch.obermuhlner.math.big.BigRationalgetDistanceSquared(V3D_Point p)Get the distance squared between this andp.V3D_EnvelopegetEnvelope()inthashCode()java.lang.StringtoString()
-
Field Details
-
Constructor Details
-
V3D_Point
- Parameters:
p- The point to duplicate
-
V3D_Point
public V3D_Point(V3D_Environment e, ch.obermuhlner.math.big.BigRational x, ch.obermuhlner.math.big.BigRational y, ch.obermuhlner.math.big.BigRational z)- Parameters:
e- WhatV3D_Object.eis set to.x- Whatxis set to.y- Whatyis set to.z- Whatzis set to.
-
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
apply
- Parameters:
v- The vector to apply.- Returns:
- a new point which is this shifted by v.
-
getDistance
Get the distance between this andp.- Parameters:
p- A point.scale- The scale. A positive value gives the number of decimal places. A negative value rounds to the left of the decimal point.rm- The RoundingMode for the calculation.- Returns:
- The distance from
pto this.
-
getDistanceSquared
Get the distance squared between this andp.- Parameters:
p- A point.- Returns:
- The distance squared from
pto this.
-
getDistance
Get the distance between this andl.- Parameters:
l- A line.scale- The scale. A positive value gives the number of decimal places. A negative value rounds to the left of the decimal point.rm- The RoundingMode for the calculation.- Returns:
- The distance from
pto this.
-
getDistance
Get the distance between this andpl.- Parameters:
pl- A plane.scale- The scale. A positive value gives the number of decimal places. A negative value rounds to the left of the decimal point.rm- The RoundingMode for the calculation.- Returns:
- The distance from
pto this.
-
getEnvelope
- Specified by:
getEnvelopein interfaceV3D_FiniteGeometry
-
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<V3D_Point>- Parameters:
o- The point to compare with.- Returns:
- -1, 0, 1 depending on if this is less than equal to or greater
than
o.
-