public static class GeomSSBatch.PublicScene extends java.lang.Object implements GeomSSScene
Constructor and Description |
---|
PublicScene() |
Modifier and Type | Method and Description |
---|---|
void |
center()
Centers the geometry in the display.
|
void |
centerAndZoom()
Centers the geometry in the display and zooms until the geometry fills the
display.
|
void |
draw(GeomElement newGeom)
Draws the specified geometry element into the 3D scene without erasing the existing
geometry.
|
void |
draw(GeomElement newGeom,
boolean erase)
Draws the specified geometry element in the 3D scene.
|
void |
erase()
Erases all the geometry from the 3D scene.
|
void |
erase(GeomElement geometry)
Erases the specified geometry from the 3D scene (if possible).
|
Parameter<Length> |
getDrawTolerance()
Return the tolerance used when drawing parametric objects such as curves and
surfaces.
|
java.awt.Color |
getLineColor()
Returns the color used when rendering curves and lines.
|
int |
getLineWidth()
Return the width that line/curve objects are rendered in pixels.
|
java.awt.Color |
getPointColor()
Returns the color used when rendering points.
|
int |
getPointSize()
Return the size that Point objects are rendered in pixels.
|
ProjectionPolicy |
getProjectionPolicy()
Retrieves the current projection policy for this scene.
|
RenderType |
getRenderType()
Returns the
rendering type for the 1st item in
the scene. |
float |
getSurfaceAlpha()
Get the alpha or transparency used when rendering surfaces or point-arrays.
|
java.awt.Color |
getSurfaceColor(SurfaceColorType colorType)
Get the color (of the specified type) used to render surfaces and point-arrays.
|
float |
getSurfaceShininess()
Get the shininess used when rendering surfaces and point-arrays.
|
boolean |
isMirrored()
Returns a flag indicating if the geometry display is currently mirrored about
the XZ plane of symmetry or not.
|
GeomList |
pick()
Pick items from the scene by control-clicking with the mouse.
|
void |
setDrawTolerance(Parameter<Length> tol)
Set the tolerance used when drawing parametric objects such as curves and
surfaces.
|
void |
setLineColor(java.awt.Color color)
Sets the color used when rendering curves and lines.
|
void |
setLineWidth(int pixels)
Set the width that line/curve objects are rendered in pixels.
|
void |
setMirrored(boolean mirrored)
Sets a flag indicating that the geometry is mirrored about the XZ plane of
symmetry.
|
void |
setPointColor(java.awt.Color color)
Sets the color used when rendering points.
|
void |
setPointSize(int pixels)
Set the size that Point objects are rendered in pixels.
|
void |
setProjectionPolicy(ProjectionPolicy policy)
Sets the projection policy for this scene.
|
void |
setRenderType(RenderType type)
Sets
rendering type for all the objects currently
displayed in the entire scene. |
void |
setSurfaceAlpha(float alpha)
Set the alpha or transparency used to render surfaces and point-arrays.
|
void |
setSurfaceColor(SurfaceColorType colorType,
java.awt.Color color)
Set the color (of the specified type) used to render surfaces and point-arrays.
|
void |
setSurfaceShininess(float shininess)
Set the shininess used when rendering surfaces and point-arrays.
|
public PublicScene()
public void draw(GeomElement newGeom)
GeomSSScene
draw(newGeom, false);
.draw
in interface GeomSSScene
newGeom
- The new geometry to be displayed on the 3D canvas.public void draw(GeomElement newGeom, boolean erase)
GeomSSScene
draw
in interface GeomSSScene
newGeom
- The new geometry to be displayed on the 3D canvas.erase
- Set to true
to erase the geometry currently displayed.
Set to false
to add the new geometry to the existing
display.public void erase()
GeomSSScene
erase
in interface GeomSSScene
public void erase(GeomElement geometry)
erase
in interface GeomSSScene
geometry
- The specific geometry to be erased from the 3D scene.public void center()
center
in interface GeomSSScene
public void centerAndZoom()
centerAndZoom
in interface GeomSSScene
public GeomList pick()
pick
in interface GeomSSScene
public void setMirrored(boolean mirrored)
setMirrored
in interface GeomSSScene
mirrored
- Set to true
to turn on mirroring.public boolean isMirrored()
isMirrored
in interface GeomSSScene
public void setRenderType(RenderType type)
rendering type
for all the objects currently
displayed in the entire scene.setRenderType
in interface GeomSSScene
type
- The render type to set.public RenderType getRenderType()
rendering type
for the 1st item in
the scene.getRenderType
in interface GeomSSScene
rendering type
for the 1st item in the
scene.public void setPointColor(java.awt.Color color)
setPointColor
in interface GeomSSScene
color
- The color to use for points drawn in the future.public java.awt.Color getPointColor()
getPointColor
in interface GeomSSScene
public void setPointSize(int pixels)
setPointSize
in interface GeomSSScene
pixels
- The number of pixels to use when displaying points.public int getPointSize()
getPointSize
in interface GeomSSScene
public void setLineColor(java.awt.Color color)
setLineColor
in interface GeomSSScene
color
- The color to use when rendering lines in the future.public java.awt.Color getLineColor()
getLineColor
in interface GeomSSScene
public void setLineWidth(int pixels)
setLineWidth
in interface GeomSSScene
pixels
- The number of pixels line-width to use when rendering lines.public int getLineWidth()
getLineWidth
in interface GeomSSScene
public void setDrawTolerance(Parameter<Length> tol)
null
or equal to
0
, it will be silently ignored.setDrawTolerance
in interface GeomSSScene
tol
- The tolerance used when drawing parametric objects such as curves and
surfaces.public Parameter<Length> getDrawTolerance()
getDrawTolerance
in interface GeomSSScene
public ProjectionPolicy getProjectionPolicy()
getProjectionPolicy
in interface GeomSSScene
public void setProjectionPolicy(ProjectionPolicy policy)
setProjectionPolicy
in interface GeomSSScene
policy
- The new projection policy, one of PARALLEL_PROJECTION or
PERSPECTIVE_PROJECTION.public void setSurfaceColor(SurfaceColorType colorType, java.awt.Color color)
setSurfaceColor
in interface GeomSSScene
colorType
- The aspect or type of the surface color that is being set.color
- The color to use for the specified type of surface color. The
alpha is ignored.setSurfaceAlpha(float)
public java.awt.Color getSurfaceColor(SurfaceColorType colorType)
getSurfaceColor
in interface GeomSSScene
colorType
- The aspect or type of the surface color that is being set. If
AMBIENT_AND_DIFFUSE is passed in, then only the ambient color
is returned!getSurfaceAlpha()
public void setSurfaceAlpha(float alpha)
setSurfaceAlpha
in interface GeomSSScene
alpha
- The alpha value to use (0.0=completely transparent, 1.0=completely
opaque).public float getSurfaceAlpha()
getSurfaceAlpha
in interface GeomSSScene
public void setSurfaceShininess(float shininess)
setSurfaceShininess
in interface GeomSSScene
shininess
- The shininess to use in the range [0.0, 1.0] where 0.0 is not
shiny and 1.0 is very shiny. Values outside this range are
clamped.public float getSurfaceShininess()
getSurfaceShininess
in interface GeomSSScene