Interface ElementTetrahedron
- All Superinterfaces:
Element
,InteractionSource
- All Known Implementing Classes:
ElementTetrahedron
Title: ElementTetrahedron
Description: A 3D Tetrahedron. The tetrahedron can be incomplete or double, if height!=sizeZ.
- Version:
- December 2008
- Author:
- Francisco Esquembre
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.opensourcephysics.display3d.core.Element
TARGET_POSITION, TARGET_SIZE
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the truncation height for this tetrahedron.boolean
Whether the tetrahedron is closed at its bottom.boolean
Whether the tetrahedron is closed at its top.void
setClosedBottom
(boolean close) Whether the tetrahedron should be closed at its bottom.void
setClosedTop
(boolean close) Whether an incomplete tetrahedron element should be closed at its top.void
setTruncationHeight
(double height) Sets the truncation height for this tetrahedron.Methods inherited from interface org.opensourcephysics.display3d.core.Element
getDrawingPanel3D, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isVisible, loadUnmutableObjects, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource
addInteractionListener, getInteractionTarget, removeInteractionListener
-
Method Details
-
setTruncationHeight
void setTruncationHeight(double height) Sets the truncation height for this tetrahedron. The standard height of a tetrahedron is set using setSizeZ(). This method helps create truncated tetrahedrons by setting the truncation height at a value smaller than the Z size. Negative, zero, or Double.NaN values set the tetrahedron to a standard (complete) one. Values greater than the Z size are ignored.- Parameters:
height
- double
-
getTruncationHeight
double getTruncationHeight()Gets the truncation height for this tetrahedron.- Returns:
- double The truncation height (Double.NaN if the tetrahedron is complete.)
- See Also:
-
#setTruncationHeight()
-
setClosedBottom
void setClosedBottom(boolean close) Whether the tetrahedron should be closed at its bottom.- Parameters:
close
- the desired value
-
isClosedBottom
boolean isClosedBottom()Whether the tetrahedron is closed at its bottom.- Returns:
- the value
-
setClosedTop
void setClosedTop(boolean close) Whether an incomplete tetrahedron element should be closed at its top.- Parameters:
closed
- the desired value
-
isClosedTop
boolean isClosedTop()Whether the tetrahedron is closed at its top.- Returns:
- the value
-