public class Shape3DPortrayal3D extends PrimitivePortrayal3D
Important note: CompressedGeometry cannot have any appearances set: it ignores all of them and only uses what's defined in the geometry itself. That's Java3D for you.
Some examples (be sure to import javax.media.j3d.*; import com.sun.j3d.utils.geometry.*; import java.awt.Font.*;)
group
DEFAULT_APPEARANCE
Constructor and Description |
---|
Shape3DPortrayal3D(javax.media.j3d.Geometry geometry)
Constructs a Shape3DPortrayal3D with the given geometry and a default (flat opaque white) appearance.
|
Shape3DPortrayal3D(javax.media.j3d.Geometry geometry,
javax.media.j3d.Appearance appearance)
Constructs a Shape3DPortrayal3D with the given geometry and appearance.
|
Shape3DPortrayal3D(javax.media.j3d.Geometry geometry,
java.awt.Color color)
Constructs a Shape3DPortrayal3D with the given geometry and a flat opaque appearance of the given color.
|
Shape3DPortrayal3D(javax.media.j3d.Geometry geometry,
java.awt.Image image)
Constructs a Shape3DPortrayal3D with the given geometry and (opaque) image.
|
Shape3DPortrayal3D(javax.media.j3d.Shape3D shape)
Constructs a Shape3DPortrayal3D with the given shape and a default (flat opaque white) appearance.
|
Shape3DPortrayal3D(javax.media.j3d.Shape3D shape,
javax.media.j3d.Appearance appearance)
Constructs a Shape3DPortrayal3D with the given shape and appearance.
|
Shape3DPortrayal3D(javax.media.j3d.Shape3D shape,
java.awt.Color color)
Constructs a Shape3DPortrayal3D with the given shape and a flat opaque appearance of the given color.
|
Shape3DPortrayal3D(javax.media.j3d.Shape3D shape,
java.awt.Image image)
Constructs a Shape3DPortrayal3D with the given shape and (opaque) image.
|
Modifier and Type | Method and Description |
---|---|
protected javax.media.j3d.Shape3D |
getShape(javax.media.j3d.TransformGroup j3dModel,
int shapeNumber)
Returns the shape by the given index.
|
protected int |
numShapes()
Returns the number of shapes handled by this primitive or Shape3D.
|
getAppearance, getModel, setAppearance, setPickable, setScale, setShape3DFlags, setTransform
appearanceForColor, appearanceForColors, appearanceForImage, clearPickableFlags, getCurrentDisplay, getCurrentFieldPortrayal, getCurrentGUIState, getInspector, getName, getStatus, isSelected, polygonAttributes, setAppearanceFlags, setCurrentDisplay, setCurrentFieldPortrayal, setPickableFlags, setPickableFlags, setSelected
public Shape3DPortrayal3D(javax.media.j3d.Shape3D shape)
public Shape3DPortrayal3D(javax.media.j3d.Shape3D shape, java.awt.Color color)
public Shape3DPortrayal3D(javax.media.j3d.Shape3D shape, java.awt.Image image)
public Shape3DPortrayal3D(javax.media.j3d.Shape3D shape, javax.media.j3d.Appearance appearance)
public Shape3DPortrayal3D(javax.media.j3d.Geometry geometry)
public Shape3DPortrayal3D(javax.media.j3d.Geometry geometry, java.awt.Color color)
public Shape3DPortrayal3D(javax.media.j3d.Geometry geometry, java.awt.Image image)
public Shape3DPortrayal3D(javax.media.j3d.Geometry geometry, javax.media.j3d.Appearance appearance)
protected int numShapes()
PrimitivePortrayal3D
numShapes
in class PrimitivePortrayal3D
protected javax.media.j3d.Shape3D getShape(javax.media.j3d.TransformGroup j3dModel, int shapeNumber)
PrimitivePortrayal3D
getShape
in class PrimitivePortrayal3D