public class PipeView extends AbstractPlantView
Pipe
. A pipe is a hollow cylinder
with the input being the bottom end and the output being the top end.Constructor and Description |
---|
PipeView(java.lang.String name,
com.jme3.material.Material material)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
com.jme3.math.Vector3f[] |
getBottomVertices(boolean primary)
Gets the vertices of the bottom (inlet) of the PipeView's mesh.
|
com.jme3.math.Vector3f[] |
getTopVertices(boolean primary)
Gets the vertices of the top (outlet) of the PipeView's mesh.
|
void |
refreshMesh()
Applies any changes to the underlying mesh to
AbstractPlantView.geometry . |
void |
updateMesh(float radius,
float length,
int axialSamples)
Updates the mesh for the pipe view.
|
setBaseColor, setWireFrame
dispose, setLocation, setParentNode, setRotation
public PipeView(java.lang.String name, com.jme3.material.Material material)
AbstractPlantView.geometry
.name
- The name of the view's root node.material
- The jME3 Material that should be used for the view's geometry.
Must not be null.public void updateMesh(float radius, float length, int axialSamples)
radius
- The radius of the pipe in jME3 world units.length
- The length of the pipe in jME3 world units.axialSamples
- The number of axial samples used to render the pipe. For
instance, a value of 2 should mean that there are 2 rows of
triangles forming the pipe along its length, i.e. there are 2
sections of the pipe.public void refreshMesh()
AbstractPlantView.geometry
.public com.jme3.math.Vector3f[] getBottomVertices(boolean primary)
primary
- Whether to get the inlet for the primary pipe or for the
secondary pipe associated with the view.public com.jme3.math.Vector3f[] getTopVertices(boolean primary)
primary
- Whether to get the outlet for the primary pipe or for the
secondary pipe associated with the view.