Class JavaModel3D
- java.lang.Object
-
- science.aist.imaging.api.domain.threedimensional.JavaModel3D
-
public class JavaModel3D extends Object
Class which represents any 3D model given by a mesh of 3D polygons
The model only contains an internal state for the properties (width, length, height, roll, pitch, yaw). For the actual state use e.g. VolumeBox3D#getBox from service-core using
points
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description JavaModel3D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getHeight()
gets value of fieldheight
which represents the internal state.double
getLength()
gets value of fieldlength
which represents the internal state.double
getWidth()
gets value of fieldwidth
which represents the internal state.JavaModel3D
move(JavaPoint3D vector)
Moves the model3D by the given vectorJavaModel3D
rotate(double roll, double pitch, double yaw)
Rotates the model 3D around the origin (0,0,0)JavaModel3D
rotate(JavaPoint3D origin, double roll, double pitch, double yaw)
Rotates the model 3D around the given originJavaModel3D
rotateAroundCenter(double roll, double pitch, double yaw)
Rotates the Model3D around it's centercenterPoint
JavaModel3D
scale(double scaleFactor)
Scales the given Model3DJavaModel3D
scale(JavaPoint3D scaleFactors)
Scales the given Model3DJavaModel3D
transformParallel(UnaryOperator<JavaPolygon3D> function)
Method for applying a unary operator to polygons of the mesh
-
-
-
Method Detail
-
getWidth
public double getWidth()
gets value of fieldwidth
which represents the internal state. For the actual state use VolumeBox3D#getBox from service-core usingpoints
- Returns:
- value of field width
- See Also:
width
-
getLength
public double getLength()
gets value of fieldlength
which represents the internal state. For the actual state use VolumeBox3D#getBox from service-core usingpoints
- Returns:
- value of field length
- See Also:
length
-
getHeight
public double getHeight()
gets value of fieldheight
which represents the internal state. For the actual state use VolumeBox3D#getBox from service-core usingpoints
- Returns:
- value of field height
- See Also:
height
-
transformParallel
public JavaModel3D transformParallel(UnaryOperator<JavaPolygon3D> function)
Method for applying a unary operator to polygons of the mesh- Parameters:
function
- unary operator which is applied to every polygon in the mesh- Returns:
- a new instance holding the transformed model 3D (Attention: internal status is lost)
-
move
public JavaModel3D move(JavaPoint3D vector)
Moves the model3D by the given vector- Parameters:
vector
- the vector used for moving the model- Returns:
- A new instance holding the moved result
-
rotate
public JavaModel3D rotate(double roll, double pitch, double yaw)
Rotates the model 3D around the origin (0,0,0)- Parameters:
roll
- Rotation around x-axis (in degrees)pitch
- Rotation around y-axis (in degrees)yaw
- Rotation around z-axis (in degrees)- Returns:
- Returns a new, rotated instance
-
rotateAroundCenter
public JavaModel3D rotateAroundCenter(double roll, double pitch, double yaw)
Rotates the Model3D around it's centercenterPoint
- Parameters:
roll
- Rotation around x-axis (in degrees)pitch
- Rotation around y-axis (in degrees)yaw
- Rotation around z-axis (in degrees)- Returns:
- Returns a new, rotated instance
-
rotate
public JavaModel3D rotate(JavaPoint3D origin, double roll, double pitch, double yaw)
Rotates the model 3D around the given origin- Parameters:
origin
- origin point around which will be rotated.roll
- Rotation around x-axis (in degrees)pitch
- Rotation around y-axis (in degrees)yaw
- Rotation around z-axis (in degrees)- Returns:
- Returns a new, rotated instance
-
scale
public JavaModel3D scale(double scaleFactor)
Scales the given Model3D- Parameters:
scaleFactor
- unified scale factor used for scaling the cloud- Returns:
- new scaled instance
-
scale
public JavaModel3D scale(JavaPoint3D scaleFactors)
Scales the given Model3D- Parameters:
scaleFactors
- vector containing the scale values- Returns:
- new scaled instance
-
-