Package org.jzy3d.plot3d.primitives
Class Tube
java.lang.Object
org.jzy3d.plot3d.primitives.Drawable
org.jzy3d.plot3d.primitives.Wireframeable
org.jzy3d.plot3d.primitives.Tube
- All Implemented Interfaces:
ISingleColorable,IGLRenderer,ISortableDraw
A
The position and shape of a
method. A
method. Being backed by a GLU cylinder, its normals are automatically
processed which make the object able to reflect light.
Tube may be used to render cylinders or pyramids, according to its input parameters.
The position and shape of a
Tube is defined through its
invalid @link
setData()
Tube is a Wireframeable and support only one color that is defined trough its
invalid @link
setColor()
- Author:
- Martin Pernollet
-
Field Summary
Fields inherited from class org.jzy3d.plot3d.primitives.Wireframeable
depthFunctionChangeForWireframe, faceDisplayed, materialAmbiantReflection, materialDiffuseReflection, materialEmission, materialShininess, materialSpecularReflection, NO_OVERLAP_DEPTH_RATIO, polygonOffsetFactor, polygonOffsetFillEnable, polygonOffsetUnit, polygonWireframeDepthTrick, reflectLight, wireframeColor, wireframeColorFromPolygonPoints, wireframeDisplayed, wireframeWidth, wireframeWithLineLoopFields inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyGeometryTransform(Transform transform) voidCall OpenGL2 routines for rendering the object.getColor()Get the color.voidSet the color.voidsetData(Coord3d position, float radiusBottom, float radiusTop, float height, int slices, int stacks) Set theTubedata.voidsetPosition(Coord3d position) Set the position of the Cylinder and the dimensions of its boundingbox.voidsetSlicing(int verticalWires, int horizontalWires) Set the cylinder slicing parameters, i.e. the subtlety of the circle estimation.voidsetVolume(float radiusBottom, float radiusTop, float height) Set the top and bottom radius of the cylinder, its height, and the dimensions of its boundingbox.voidMethods inherited from class org.jzy3d.plot3d.primitives.Wireframeable
applyDepthRangeDefault, applyDepthRangeForOverlying, applyDepthRangeForUnderlying, applyMaterial, doDrawBoundsIfDisplayed, getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, getPolygonOffsetFactor, getPolygonOffsetUnit, getWireframeColor, getWireframeWidth, isFaceDisplayed, isPolygonOffsetFillEnable, isPolygonWireframeDepthTrick, isReflectLight, isWireframeColorFromPolygonPoints, isWireframeDisplayed, polygonOffsetFillDisable, polygonOffsetFillEnable, polygonOffsetLineDisable, polygonOffsetLineEnable, setFaceDisplayed, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflection, setPolygonOffsetFactor, setPolygonOffsetFillEnable, setPolygonOffsetUnit, setPolygonWireframeDepthTrick, setReflectLight, setWireframeColor, setWireframeColorFromPolygonPoints, setWireframeDisplayed, setWireframeWidthMethods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString, toString
-
Constructor Details
-
Tube
public Tube()Initialize a Cylinder at the origin. -
Tube
Initialize a cylinder with the given parameters.
-
-
Method Details
-
draw
Description copied from class:DrawableCall OpenGL2 routines for rendering the object.- Specified by:
drawin interfaceIGLRenderer- Specified by:
drawin classDrawable
-
applyGeometryTransform
- Specified by:
applyGeometryTransformin classDrawable
-
updateBounds
public void updateBounds()- Specified by:
updateBoundsin classDrawable
-
setData
public void setData(Coord3d position, float radiusBottom, float radiusTop, float height, int slices, int stacks) Set theTubedata.- Parameters:
position- cylinder position (may be handled diffrently in future version)radiusBottom- radius of the bottom circleradiusTop- radius of the top circleheight- height of the cylinderslices- number of vertical slices (i.e. wireframes)stacks- number of horizontal stacks (i.e. wireframes)
-
setPosition
Set the position of the Cylinder and the dimensions of its boundingbox. Note that this position will be use to translate the object before drawing it (meaning a glTranslate(position) is performed right after the Translate.execute).- Parameters:
position-
-
setVolume
public void setVolume(float radiusBottom, float radiusTop, float height) Set the top and bottom radius of the cylinder, its height, and the dimensions of its boundingbox.- Parameters:
radiusBottom-radiusTop-height-
-
setSlicing
public void setSlicing(int verticalWires, int horizontalWires) Set the cylinder slicing parameters, i.e. the subtlety of the circle estimation.- Parameters:
verticalWires- number of vertical sliceshorizontalWires- number of horizontal slices
-
setColor
Description copied from interface:ISingleColorableSet the color.- Specified by:
setColorin interfaceISingleColorable- Parameters:
color- the color
-
getColor
Description copied from interface:ISingleColorableGet the color.- Specified by:
getColorin interfaceISingleColorable- Returns:
- color the color.
-