Package org.robwork.sdurw_geometry
Class Tube
- java.lang.Object
-
- org.robwork.sdurw_geometry.GeometryData
-
- org.robwork.sdurw_geometry.Primitive
-
- org.robwork.sdurw_geometry.Tube
-
public class Tube extends Primitive
a tube primitive. radius is in xy-plane and height is in z-axis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robwork.sdurw_geometry.GeometryData
GeometryData.GeometryType
-
-
Constructor Summary
Constructors Constructor Description Tube(float radius, float thickness, float height)
Constructs tube primitive with the specified setup
The tube is aligned with the height in the z-direction such that tube extends height/2
above and below the xy-plane.
Tube(float radius, float thickness, float height, int levels)
Constructs tube primitive with the specified setup
The tube is aligned with the height in the z-direction such that tube extends height/2
above and below the xy-plane.
Tube(long cPtr, boolean cMemoryOwn)
Tube(Q initQ)
Constructs tube primitive based on vector with parameters
Tube(Q initQ, int levels)
Constructs tube primitive based on vector with parameters
-
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(Tube obj)
float
getHeight()
Get the height of the tube.float
getInnerRadius()
Get the inner radius of the tube.Q
getParameters()
get the parameters that define this primitivefloat
getThickness()
Get the thickness of the tube.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
-
Tube
public Tube(long cPtr, boolean cMemoryOwn)
-
Tube
public Tube(float radius, float thickness, float height, int levels)
Constructs tube primitive with the specified setup
The tube is aligned with the height in the z-direction such that tube extends height/2
above and below the xy-plane.
- Parameters:
radius
- [in] inner radius of the tube.thickness
- [in] thickness of the tube.height
- [in] height of the cylinder.levels
- [in] granularity of the mesh.
-
Tube
public Tube(float radius, float thickness, float height)
Constructs tube primitive with the specified setup
The tube is aligned with the height in the z-direction such that tube extends height/2
above and below the xy-plane.
- Parameters:
radius
- [in] inner radius of the tube.thickness
- [in] thickness of the tube.height
- [in] height of the cylinder.
-
Tube
public Tube(Q initQ, int levels)
Constructs tube primitive based on vector with parameters
- Parameters:
initQ
- [in] vector of (radius, height)levels
- [in] granularity of the mesh
-
Tube
public Tube(Q initQ)
Constructs tube primitive based on vector with parameters
- Parameters:
initQ
- [in] vector of (radius, height)
-
-
Method Detail
-
getCPtr
public static long getCPtr(Tube obj)
-
getInnerRadius
public float getInnerRadius()
Get the inner radius of the tube.- Returns:
- the radius
-
getThickness
public float getThickness()
Get the thickness of the tube.- Returns:
- the thickness.
-
getHeight
public float getHeight()
Get the height of the tube.- Returns:
- the height
-
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
-
-