public class HeatExchangerView extends PipeView
HeatExchanger
. This view provides a
standard pipe as its primary pipe, but it also provides a container
around the pipe and secondary input and output pipes that extend from the
container to their respective junctions.Constructor and Description |
---|
HeatExchangerView(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)
Overrides the default behavior, which returns the same vertices for
primary and secondary pipes, to return different vertices for the
secondary pipe.
|
com.jme3.math.Vector3f[] |
getTopVertices(boolean primary)
Overrides the default behavior, which returns the same vertices for
primary and secondary pipes, to return different vertices for the
secondary pipe.
|
void |
refreshMesh()
Applies any changes to the underlying mesh to
AbstractPlantView.geometry . |
void |
refreshSecondaryMesh(boolean input)
Applies any changes to the specified secondary pipe mesh to its geometry
and/or node.
|
void |
updateMesh(float radius,
float length,
int axialSamples)
Refreshes the primary pipe based on the specified values.
|
void |
updateSecondaryMesh(boolean input,
float radius,
com.jme3.math.Vector3f center)
Updates the secondary pipe's mesh with the required parameters.
|
setBaseColor, setWireFrame
dispose, setLocation, setParentNode, setRotation
public HeatExchangerView(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 com.jme3.math.Vector3f[] getBottomVertices(boolean primary)
getBottomVertices
in class PipeView
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)
getTopVertices
in class PipeView
primary
- Whether to get the outlet for the primary pipe or for the
secondary pipe associated with the view.public void updateMesh(float radius, float length, int axialSamples)
updateMesh
in class PipeView
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
. Augments the default behavior to
update the container that wraps the primary pipe.refreshMesh
in class PipeView
public void updateSecondaryMesh(boolean input, float radius, com.jme3.math.Vector3f center)
input
- Whether the secondary pipe is the input pipe or the output
pipe.radius
- The radius of the secondary pipe.center
- The center of the junction with the inverses of this view's
translation and rotation applied before calling this
method.public void refreshSecondaryMesh(boolean input)
input
- Whether the secondary pipe is the input pipe or the output
pipe.