T
- The type of GeomElement represented by this object.public abstract class J3DGeomGroup<T extends GeomElement> extends BranchGroup
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
USERDATA_KEY
The key used to store this instance in the user data of the supplied GeomElement
object.
|
Constructor and Description |
---|
J3DGeomGroup(GeomSSCanvas3D canvas,
T geometry)
Construct a J3DGeomGroup using the specified GeomElement as a reference.
|
Modifier and Type | Method and Description |
---|---|
static J3DRenderingPrefs |
getDefaultRenderingPrefs() |
T |
getGeomElement() |
J3DRenderingPrefs |
getRenderingPrefs() |
RenderType |
getRenderType()
Return the render type used for this group.
|
boolean |
isDisplayed()
Returns the display setting of this geometry group.
|
boolean |
isMirrored()
Returns a flag indicating if the geometry display is currently mirrored about the
XZ plane of symmetry or not.
|
static void |
setDefaultRenderingPrefs(J3DRenderingPrefs prefs)
Set the currently active rendering preferences that will be used to render future
objects.
|
void |
setDisplayed(boolean visible)
Sets the display of this geometry group to either displayed (true) or not displayed
(false).
|
static void |
setDrawTolerance(Parameter<Length> tol)
Set the tolerance used when drawing parametric objects such as curves and surfaces.
|
static void |
setLineColor(java.awt.Color color)
Set the color to use when rendering curves and lines.
|
static void |
setLineWidth(int pixels)
Set the width that line/curve objects are rendered in pixels.
|
void |
setMirrored(boolean mirrored)
Set the display of a copy of this geometry mirrored across the XZ plane to either
DISPLAYED (true) or NOT_DISPLAYED (false).
|
static void |
setPointColor(java.awt.Color color)
Set the color to use when rendering points.
|
static void |
setPointSize(int pixels)
Set the size that Point objects are rendered in pixels.
|
void |
setRenderType(RenderType type)
Set the render type used for this group.
|
public static final java.lang.String USERDATA_KEY
public J3DGeomGroup(GeomSSCanvas3D canvas, T geometry)
canvas
- The canvas that the geometry is being rendered into.geometry
- The GeomSS geometry to be turned into a Java3D node.public T getGeomElement()
GeomElement
that this group represents in the scene graph.public boolean isDisplayed()
public void setDisplayed(boolean visible)
visible
- Flag indicating if the geometry is displayed or not.public void setMirrored(boolean mirrored)
mirrored
- Flag indicating if the mirrored geometry should be displayed or
not.isMirrored()
,
internalSetMirrored(boolean)
public boolean isMirrored()
setMirrored(boolean)
public void setRenderType(RenderType type)
type
- Value indicating the way that some objects should be rendered.getRenderType()
public RenderType getRenderType()
setRenderType(geomss.j3d.RenderType)
public static J3DRenderingPrefs getDefaultRenderingPrefs()
public static void setDefaultRenderingPrefs(J3DRenderingPrefs prefs)
prefs
- The rendering preferences to make current.public J3DRenderingPrefs getRenderingPrefs()
public static void setPointColor(java.awt.Color color)
J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changePointColor(color))
.color
- The Color to use for rending Point objects in the future.public static void setLineColor(java.awt.Color color)
J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changeLineColor(color))
.color
- The Color to use for rending lines and curves objects in the future.public static void setPointSize(int pixels)
J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changePointSize(pixels))
.pixels
- The size, in pixels, to use when rendering points in the future.java.lang.IllegalArgumentException
- if the point size provided is < 1 pixel.public static void setLineWidth(int pixels)
J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changeLineWidth(pixels))
.pixels
- The width, in pixels, to use when rendering lines/curves in the
future.java.lang.IllegalArgumentException
- if the line size provided is < 1 pixel.public static void setDrawTolerance(Parameter<Length> tol)
null
or equal to 0
, it
will be silently ignored. This is a convenience method for
J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changeDrawTolerance(tol))
.tol
- The geometric tolerance to use when rendering parametric objects.