|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsim.portrayal3d.SimplePortrayal3D
sim.portrayal3d.simple.PrimitivePortrayal3D
sim.portrayal3d.simple.Shape3DPortrayal3D
public class Shape3DPortrayal3D
A simple portrayal for displaying Shape3D objects. You can find Shape3D objects, or CompressedGeometry objects (which you can make into a Shape3D in its constructor) all over the web.
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.*;)
Field Summary |
---|
Fields inherited from class sim.portrayal3d.simple.PrimitivePortrayal3D |
---|
group |
Fields inherited from class sim.portrayal3d.SimplePortrayal3D |
---|
DEFAULT_APPEARANCE |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class sim.portrayal3d.simple.PrimitivePortrayal3D |
---|
getAppearance, getModel, setAppearance, setPickable, setScale, setShape3DFlags, setTransform |
Methods inherited from class sim.portrayal3d.SimplePortrayal3D |
---|
appearanceForColor, appearanceForColors, appearanceForImage, clearPickableFlags, getCurrentDisplay, getCurrentFieldPortrayal, getCurrentGUIState, getInspector, getName, getStatus, isSelected, polygonAttributes, setAppearanceFlags, setCurrentDisplay, setCurrentFieldPortrayal, setPickableFlags, setPickableFlags, setSelected |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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)
Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |