georegression.metric
Class Distance3D_F32
- java.lang.Object
-
- georegression.metric.Distance3D_F32
-
public class Distance3D_F32 extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Distance3D_F32()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static floatdistance(Cylinder3D_F32 cylinder, Point3D_F32 point)Returns the signed distance a point is from the cylinder's surface.static floatdistance(LineParametric3D_F32 l0, LineParametric3D_F32 l1)Distance of the closest point between two lines.static floatdistance(LineParametric3D_F32 l, Point3D_F32 p)Distance from the point to the closest point on the line.static floatdistance(LineSegment3D_F32 l, Point3D_F32 p)Distance from the point to the closest point on the line segment.static floatdistance(PlaneGeneral3D_F32 plane, Point3D_F32 point)Distance between a plane and a point.static floatdistance(Sphere3D_F32 sphere, Point3D_F32 point)Returns the signed distance a point is from the sphere's surface.static floatdistance(Triangle3D_F32 triangle, Point3D_F32 point)Signed distance from a 3D point to 3D triangle.
-
-
-
Method Detail
-
distance
public static float distance(LineParametric3D_F32 l0, LineParametric3D_F32 l1)
Distance of the closest point between two lines. Parallel lines are correctly handled.- Parameters:
l0- First line. Not modified.l1- Second line. Not modified.- Returns:
- Distance between the closest point on both lines.
-
distance
public static float distance(LineParametric3D_F32 l, Point3D_F32 p)
Distance from the point to the closest point on the line.- Parameters:
l- Line. Not modified.p- Point. Not modified.- Returns:
- distance.
-
distance
public static float distance(LineSegment3D_F32 l, Point3D_F32 p)
Distance from the point to the closest point on the line segment.- Parameters:
l- Line. Not modified.p- Point. Not modified.- Returns:
- distance.
-
distance
public static float distance(PlaneGeneral3D_F32 plane, Point3D_F32 point)
Distance between a plane and a point. A signed distance is returned, where a positive value is returned if the point is on the same side of the plane as the normal and the opposite if it's on the other.- Parameters:
plane- The planepoint- The point- Returns:
- Signed distance
-
distance
public static float distance(Sphere3D_F32 sphere, Point3D_F32 point)
Returns the signed distance a point is from the sphere's surface. If the point is outside of the sphere it's distance will be positive. If it is inside it will be negative. distance = ||sphere.center - point|| - r- Parameters:
sphere- The spherepoint- The point- Returns:
- Signed distance
-
distance
public static float distance(Cylinder3D_F32 cylinder, Point3D_F32 point)
Returns the signed distance a point is from the cylinder's surface. If the point is outside of the cylinder it's distance will be positive. If it is inside it will be negative.- Parameters:
cylinder- The cylinderpoint- The point- Returns:
- Signed distance
-
distance
public static float distance(Triangle3D_F32 triangle, Point3D_F32 point)
Signed distance from a 3D point to 3D triangle. The sign indicates which side of the triangle the point is on. SeeDistancePointTriangle3D_F32for the details.- Parameters:
triangle- 3D trianglepoint- Point for which the closest point on the triangle is found- Returns:
- The closest point
-
-
DataMelt 3.0 © DataMelt by jWork.ORG