Package org.robwork.sdurw_geometry
Class Cylinder
- java.lang.Object
-
- org.robwork.sdurw_geometry.GeometryData
-
- org.robwork.sdurw_geometry.Primitive
-
- org.robwork.sdurw_geometry.Cylinder
-
public class Cylinder extends Primitive
a cylinder primitive. By default the radius is in the x-y plane and height is along
the z-axis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robwork.sdurw_geometry.GeometryData
GeometryData.GeometryType
-
-
Constructor Summary
Constructors Constructor Description Cylinder()
constructorCylinder(float radius, float height)
Constructs cylinder primitive with the specified setup
The cylinder is aligned with the height in the z-direction.
Cylinder(float radius, float height, int levels)
Constructs cylinder primitive with the specified setup
The cylinder is aligned with the height in the z-direction.
Cylinder(int levels)
constructorCylinder(long cPtr, boolean cMemoryOwn)
Cylinder(Q initQ)
Constructor.Cylinder(Q initQ, int levels)
Constructor.Cylinder(Transform3D transform, float radius, float height)
Construct cylinder primitive with specified radius and height and with the given
transform.
The cylinder will be centered in the position of transform and oriented in the
direction of the third column of the rotation matrix of transform.Cylinder(Transform3D transform, float radius, float height, int levels)
Construct cylinder primitive with specified radius and height and with the given
transform.
The cylinder will be centered in the position of transform and oriented in the
direction of the third column of the rotation matrix of transform.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TriMeshPtr
createMesh(int resolution)
make a trimesh from this primitive.void
delete()
static long
getCPtr(Cylinder obj)
double
getHeight()
Get the height of the cylinder.Q
getParameters()
get the parameters that define this primitivedouble
getRadius()
Get the radius of the cylinder.Transform3Df
getTransform()
Returns the transform of the cylinder.
Default is the identity matrix unless a transform has been specified.GeometryData.GeometryType
getType()
the type of this primitivevoid
setParameters(Q q)
set the parameters that define this primitive-
Methods inherited from class org.robwork.sdurw_geometry.Primitive
getCPtr, getTriMesh, getTriMesh, isConvex, isInside
-
Methods inherited from class org.robwork.sdurw_geometry.GeometryData
getCPtr, toString
-
-
-
-
Constructor Detail
-
Cylinder
public Cylinder(long cPtr, boolean cMemoryOwn)
-
Cylinder
public Cylinder(int levels)
constructor
-
Cylinder
public Cylinder()
constructor
-
Cylinder
public Cylinder(float radius, float height, int levels)
Constructs cylinder primitive with the specified setup
The cylinder is aligned with the height in the z-direction.
- Parameters:
radius
- [in] radius of the cylinder.height
- [in] height of the cylinder.levels
- [in] granularity of the mesh
-
Cylinder
public Cylinder(float radius, float height)
Constructs cylinder primitive with the specified setup
The cylinder is aligned with the height in the z-direction.
- Parameters:
radius
- [in] radius of the cylinder.height
- [in] height of the cylinder.
-
Cylinder
public Cylinder(Q initQ, int levels)
Constructor.- Parameters:
initQ
- [in] vector with (height, radius)levels
- [in] granularity of the mesh
-
Cylinder
public Cylinder(Q initQ)
Constructor.- Parameters:
initQ
- [in] vector with (height, radius)
-
Cylinder
public Cylinder(Transform3D transform, float radius, float height, int levels)
Construct cylinder primitive with specified radius and height and with the given
transform.
The cylinder will be centered in the position of transform and oriented in the
direction of the third column of the rotation matrix of transform.- Parameters:
transform
- [in] The transform specifying how the pose of the cylinderradius
- [in] radius of the cylinder.height
- [in] height of the cylinder.levels
- [in] granularity of the mesh
-
Cylinder
public Cylinder(Transform3D transform, float radius, float height)
Construct cylinder primitive with specified radius and height and with the given
transform.
The cylinder will be centered in the position of transform and oriented in the
direction of the third column of the rotation matrix of transform.- Parameters:
transform
- [in] The transform specifying how the pose of the cylinderradius
- [in] radius of the cylinder.height
- [in] height of the cylinder.
-
-
Method Detail
-
getCPtr
public static long getCPtr(Cylinder obj)
-
getRadius
public double getRadius()
Get the radius of the cylinder.- Returns:
- the radius.
-
getHeight
public double getHeight()
Get the height of the cylinder.- Returns:
- the height.
-
getTransform
public Transform3Df getTransform()
Returns the transform of the cylinder.
Default is the identity matrix unless a transform has been specified.- Returns:
- Transform of the cylinder
-
createMesh
public TriMeshPtr createMesh(int resolution)
Description copied from class:Primitive
make a trimesh from this primitive. Use granularity to
specify minimum number of line segments a half circle is split into- Overrides:
createMesh
in classPrimitive
- Parameters:
resolution
- [in]
-
getParameters
public Q getParameters()
Description copied from class:Primitive
get the parameters that define this primitive- Overrides:
getParameters
in classPrimitive
-
setParameters
public void setParameters(Q q)
Description copied from class:Primitive
set the parameters that define this primitive- Overrides:
setParameters
in classPrimitive
-
getType
public GeometryData.GeometryType getType()
Description copied from class:GeometryData
the type of this primitive- Overrides:
getType
in classGeometryData
-
-