Package science.aist.imaging.api.domain
Class AbstractJavaPointCloud<T extends AbstractJavaPoint<T>>
- java.lang.Object
-
- science.aist.imaging.api.domain.AbstractJavaPointCloud<T>
-
- Type Parameters:
T
- The type of the point
- Direct Known Subclasses:
JavaPointCloud2D
,JavaPointCloud3D
public abstract class AbstractJavaPointCloud<T extends AbstractJavaPoint<T>> extends Object
Wrapping class for an unordered amount of points
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description AbstractJavaPointCloud()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AbstractJavaPointCloud<T>
add(T vector)
Adds the given JavaPoint to the point cloud.protected abstract T
calculateCenterPoint()
protected abstract <L extends AbstractJavaPointCloud<T>>
LcreatePointCloud(List<T> points)
abstract AbstractJavaPointCloud<T>
div(double scalar)
Divides the point cloud by the given scalar.boolean
equals(Object o)
int
hashCode()
abstract AbstractJavaPointCloud<T>
mult(T vector)
Multiplies the point cloud with the given scalar.abstract AbstractJavaPointCloud<T>
scale(T scaleFactors)
Scales the given JavaPointCloud around the center pointabstract AbstractJavaPointCloud<T>
scale(T scaleFactors, T scaleCenter)
Scales the given JavaPointCloud around the given scale center pointabstract AbstractJavaPointCloud<T>
sub(T vector)
Subtracts the given JavaPoint from the point cloud.String
toString()
protected <L extends AbstractJavaPointCloud<T>>
LtransformParallel(UnaryOperator<T> function)
Help method for applying a unary operator to all points of the point cloud
-
-
-
Method Detail
-
calculateCenterPoint
protected abstract T calculateCenterPoint()
-
transformParallel
protected <L extends AbstractJavaPointCloud<T>> L transformParallel(UnaryOperator<T> function)
Help method for applying a unary operator to all points of the point cloud- Type Parameters:
L
- the type of the line- Parameters:
function
- unary operator which is applied to every point in the point cloud- Returns:
- a new instance holding the transformed point cloud
-
createPointCloud
protected abstract <L extends AbstractJavaPointCloud<T>> L createPointCloud(List<T> points)
-
sub
public abstract AbstractJavaPointCloud<T> sub(T vector)
Subtracts the given JavaPoint from the point cloud.- Parameters:
vector
- The JavaPoint to be subtracted from the point cloud- Returns:
- A new instance holding the result of the subtraction
-
add
public abstract AbstractJavaPointCloud<T> add(T vector)
Adds the given JavaPoint to the point cloud.- Parameters:
vector
- The JavaPoint to be added to the point cloud- Returns:
- A new instance holding the result of the addition
-
mult
public abstract AbstractJavaPointCloud<T> mult(T vector)
Multiplies the point cloud with the given scalar.- Parameters:
vector
- The multiplied vector- Returns:
- A new instance holding the result of the multiplication
-
div
public abstract AbstractJavaPointCloud<T> div(double scalar)
Divides the point cloud by the given scalar.- Parameters:
scalar
- The scalar used for the division of the point cloud- Returns:
- A new instance holding the result of the division
-
scale
public abstract AbstractJavaPointCloud<T> scale(T scaleFactors)
Scales the given JavaPointCloud around the center point- Parameters:
scaleFactors
- vector containing the scale values- Returns:
- new scaled instance
-
scale
public abstract AbstractJavaPointCloud<T> scale(T scaleFactors, T scaleCenter)
Scales the given JavaPointCloud around the given scale center point- Parameters:
scaleFactors
- vector containing the scale valuesscaleCenter
- the scaleCenter- Returns:
- new scaled instance
-
-