Package org.robwork.sdurw_geometry
Class Cone
- java.lang.Object
-
- org.robwork.sdurw_geometry.GeometryData
-
- org.robwork.sdurw_geometry.Primitive
-
- org.robwork.sdurw_geometry.Cone
-
public class Cone extends Primitive
cone primitive. Like a cylinder though where a radius can be
specified for both ends.
The cone is aligned with the z-axis such that top is in the positive z-axis
and the bottom is in the negative z-axis. The center of the cone will be
in (0,0,0) which is inside the cone.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robwork.sdurw_geometry.GeometryData
GeometryData.GeometryType
-
-
Constructor Summary
Constructors Constructor Description Cone(double height, double radiusTop, double radiusBot)constructorCone(double height, double radiusTop, double radiusBot, int levels)constructorCone(long cPtr, boolean cMemoryOwn)Cone(Q initQ)constructorCone(Q initQ, int levels)constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TriMeshPtrcreateMesh(int resolution)make a trimesh from this primitive.voiddelete()doublegetBottomRadius()the bottom radiusstatic longgetCPtr(Cone obj)doublegetHeight()the heightQgetParameters()get the parameters that define this primitivedoublegetTopRadius()the top radiusGeometryData.GeometryTypegetType()the type of this primitivevoidsetParameters(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
-
Cone
public Cone(long cPtr, boolean cMemoryOwn)
-
Cone
public Cone(Q initQ, int levels)
constructor
-
Cone
public Cone(Q initQ)
constructor
-
Cone
public Cone(double height, double radiusTop, double radiusBot, int levels)constructor- Parameters:
height- [in] height of coneradiusTop- [in] radius of the top endradiusBot- [in] radius of the bottom endlevels- [in] granularity of the mesh
-
Cone
public Cone(double height, double radiusTop, double radiusBot)constructor- Parameters:
height- [in] height of coneradiusTop- [in] radius of the top endradiusBot- [in] radius of the bottom end
-
-
Method Detail
-
getCPtr
public static long getCPtr(Cone obj)
-
getHeight
public double getHeight()
the height
-
getTopRadius
public double getTopRadius()
the top radius
-
getBottomRadius
public double getBottomRadius()
the bottom radius
-
createMesh
public TriMeshPtr createMesh(int resolution)
Description copied from class:Primitivemake a trimesh from this primitive. Use granularity to
specify minimum number of line segments a half circle is split into- Overrides:
createMeshin classPrimitive- Parameters:
resolution- [in]
-
getParameters
public Q getParameters()
Description copied from class:Primitiveget the parameters that define this primitive- Overrides:
getParametersin classPrimitive
-
setParameters
public void setParameters(Q q)
Description copied from class:Primitiveset the parameters that define this primitive- Overrides:
setParametersin classPrimitive
-
getType
public GeometryData.GeometryType getType()
Description copied from class:GeometryDatathe type of this primitive- Overrides:
getTypein classGeometryData
-
-