Class JavaPointCloud2D
- java.lang.Object
-
- science.aist.imaging.api.domain.AbstractJavaPointCloud<JavaPoint2D>
-
- science.aist.imaging.api.domain.twodimensional.JavaPointCloud2D
-
public class JavaPointCloud2D extends AbstractJavaPointCloud<JavaPoint2D>
2D Point cloud
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description JavaPointCloud2D(@NonNull List<JavaPoint2D> points)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaPointCloud2D
add(JavaPoint2D vector)
Adds the given JavaPoint to the point cloud.protected JavaPoint2D
calculateCenterPoint()
protected <L extends AbstractJavaPointCloud<JavaPoint2D>>
LcreatePointCloud(List<JavaPoint2D> point3DS)
JavaPointCloud2D
div(double scalar)
Divides the point cloud by the given scalar.JavaPointCloud2D
mult(JavaPoint2D vector)
Multiplies the point cloud with the given scalar.JavaPointCloud2D
rotate(double rotation, JavaPoint2D origin)
Rotates the point cloud around the given originJavaPointCloud2D
rotateAroundCenter(double rotation)
Rotates the point cloud around the center point.JavaPointCloud2D
scale(JavaPoint2D scaleFactors)
Scales the given JavaPointCloud around the center pointJavaPointCloud2D
scale(JavaPoint2D scaleFactors, JavaPoint2D scaleCenter)
Scales the given JavaPointCloud around the given scale center pointJavaPointCloud2D
sub(JavaPoint2D vector)
Subtracts the given JavaPoint from the point cloud.-
Methods inherited from class science.aist.imaging.api.domain.AbstractJavaPointCloud
equals, hashCode, toString, transformParallel
-
-
-
-
Constructor Detail
-
JavaPointCloud2D
public JavaPointCloud2D(@NonNull @NonNull List<JavaPoint2D> points)
-
-
Method Detail
-
sub
public JavaPointCloud2D sub(JavaPoint2D vector)
Subtracts the given JavaPoint from the point cloud.- Specified by:
sub
in classAbstractJavaPointCloud<JavaPoint2D>
- Parameters:
vector
- The JavaPoint to be subtracted from the point cloud- Returns:
- A new instance holding the result of the subtraction
-
add
public JavaPointCloud2D add(JavaPoint2D vector)
Adds the given JavaPoint to the point cloud.- Specified by:
add
in classAbstractJavaPointCloud<JavaPoint2D>
- Parameters:
vector
- The JavaPoint to be added to the point cloud- Returns:
- A new instance holding the result of the addition
-
mult
public JavaPointCloud2D mult(JavaPoint2D vector)
Multiplies the point cloud with the given scalar.- Specified by:
mult
in classAbstractJavaPointCloud<JavaPoint2D>
- Parameters:
vector
- The multiplied vector- Returns:
- A new instance holding the result of the multiplication
-
div
public JavaPointCloud2D div(double scalar)
Divides the point cloud by the given scalar.- Specified by:
div
in classAbstractJavaPointCloud<JavaPoint2D>
- Parameters:
scalar
- The scalar used for the division of the point cloud- Returns:
- A new instance holding the result of the division
-
rotateAroundCenter
public JavaPointCloud2D rotateAroundCenter(double rotation)
Rotates the point cloud around the center point.- Parameters:
rotation
- radians to rotate the points- Returns:
- Returns a new, rotated instance
-
rotate
public JavaPointCloud2D rotate(double rotation, JavaPoint2D origin)
Rotates the point cloud around the given origin- Parameters:
origin
- origin point around which will be rotated.rotation
- the radians to rotate the points- Returns:
- Returns a new, rotated instance
-
scale
public JavaPointCloud2D scale(JavaPoint2D scaleFactors)
Scales the given JavaPointCloud around the center point- Specified by:
scale
in classAbstractJavaPointCloud<JavaPoint2D>
- Parameters:
scaleFactors
- vector containing the scale values- Returns:
- new scaled instance
-
scale
public JavaPointCloud2D scale(JavaPoint2D scaleFactors, JavaPoint2D scaleCenter)
Scales the given JavaPointCloud around the given scale center point- Specified by:
scale
in classAbstractJavaPointCloud<JavaPoint2D>
- Parameters:
scaleFactors
- vector containing the scale valuesscaleCenter
- the scaleCenter- Returns:
- new scaled instance
-
calculateCenterPoint
protected JavaPoint2D calculateCenterPoint()
- Specified by:
calculateCenterPoint
in classAbstractJavaPointCloud<JavaPoint2D>
-
createPointCloud
protected <L extends AbstractJavaPointCloud<JavaPoint2D>> L createPointCloud(List<JavaPoint2D> point3DS)
- Specified by:
createPointCloud
in classAbstractJavaPointCloud<JavaPoint2D>
-
-