public class PointConverter extends Object
public static Point2i intFromDoubleFloor(Point2d point)
point
- the point to convert.public static Point3i intFromDoubleFloor(Point3d point)
point
- the point to convert.public static Point3i intFromDoubleCeil(Point3d point)
point
- the point to convert.public static Point3i convertTo3i(Point2i point)
point
- the point to convert.public static Point3i convertTo3i(Point2i point, int z)
point
- the point to convert.z
- the value for the Z-axis component in the newly created point.public static Point3d convertTo3d(Point2d point)
point
- the point to convert.public static Point2d doubleFromFloat(Point2f point)
point
- the point to convert.public static Point3d double3DFromFloat(Point2f point)
point
- the point to convert.public static Point3d doubleFromFloat(Point3f point)
point
- the point to convert.public static Point3d doubleFromInt(Point2i point)
point
- the point to convert.public static Point3d doubleFromInt(ReadableTuple3i point)
ReadableTuple3i
to a Point3d
.point
- the point to convert.public static Point3f floatFromInt(Point2i point)
point
- the point to convert.public static Point2f floatFromDouble(Point2d point)
point
- the point to convert.public static Point3f floatFromDouble(Point3d point)
point
- the point to convert.public static Point3f floatFromInt(ReadableTuple3i point)
ReadableTuple3i
to a Point3f
.point
- the point to convert.public static Point3f floatFromIntDropZ(ReadableTuple3i point)
ReadableTuple3i
to a Point3f
, preserving X- and Y-components but
set setting the Z-component to be 0
.point
- the point to convert.public static Point3i intFromFloat(Point3f point, boolean round)
point
- the point to convert.round
- if true, each component's value is rounded to the nearest integer, otherwise the
ceiling operation is used.public static Point3i intFromDouble(Point3d point, boolean round)
point
- the point to convert.round
- if true, each component's value is rounded to the nearest integer, otherwise the
ceiling operation is used.public static List<Point3f> convert3iTo3f(List<Point3i> points)
points
- the list of points to convert.public static List<Point3f> convert3dTo3f(List<Point3d> points)
points
- the list of points to convert.public static List<Point3f> convert2iTo3f(List<Point2i> points)
points
- the list of points to convert.public static List<Point3d> convert2iTo3d(List<Point2i> points)
points
- the list of points to convert.public static List<Point3d> convert3fTo3d(List<Point3f> points)
points
- the list of points to convert.public static List<Point3i> convert3i(List<Point3f> points, boolean round)
points
- the list of points to convert.round
- if true, each component's value is rounded to the nearest integer, otherwise the
ceiling operation is used.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.