public class BranchGroupPortrayal3D extends PrimitivePortrayal3D
You can also use other loaders for other scene file formats. NCSA Portfolio contains a large number of them, but it's not quite open source (free for academic, research, or internal business use). See the MASON website for a link to download and use the NCSA Portfolio library.
group
DEFAULT_APPEARANCE
Constructor and Description |
---|
BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene)
Constructs a BranchGroupPortrayal3D with the given scene file loader without changing its appearance, scale, or transform.
|
BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene,
javax.media.j3d.Appearance a)
Constructs a BranchGroupPortrayal3D with the given scene file loader without transforming it or scaling it, but changing its appearance (unless the appearance is null).
|
BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene,
double scale)
Constructs a BranchGroupPortrayal3D with the given scene file loader without changing its appearance, but scaling it.
|
BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene,
double scale,
javax.media.j3d.Appearance a)
Constructs a BranchGroupPortrayal3D with the given scene file loader by scaling it and changing its appearance (unless the appearance is null).
|
BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene,
javax.media.j3d.Transform3D transform)
Constructs a BranchGroupPortrayal3D with the given scene file loader without changing its appearance, but transforming it.
|
BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene,
javax.media.j3d.Transform3D transform,
javax.media.j3d.Appearance a)
Constructs a BranchGroupPortrayal3D with the given scene file loader by transforming it and changing its appearance (unless the appearance is null).
|
Modifier and Type | Method and Description |
---|---|
static javax.media.j3d.BranchGroup |
getBranchGroupForFile(java.lang.String filename) |
static javax.media.j3d.BranchGroup |
getBranchGroupForResource(java.lang.Class c,
java.lang.String resourceName) |
static javax.media.j3d.BranchGroup |
getBranchGroupForURL(java.net.URL url) |
javax.media.j3d.TransformGroup |
getModel(java.lang.Object obj,
javax.media.j3d.TransformGroup j3dModel)
We suggest that if you wish to override this to change the appearance or scale or transform
of the underlying model, do the changes first and THEN call super.getModel(obj, j3dModel).
|
protected int |
numShapes()
Unused: returns 0 always.
|
getAppearance, getShape, setAppearance, setPickable, setScale, setShape3DFlags, setTransform
appearanceForColor, appearanceForColors, appearanceForImage, clearPickableFlags, getCurrentDisplay, getCurrentFieldPortrayal, getCurrentGUIState, getInspector, getName, getStatus, isSelected, polygonAttributes, setAppearanceFlags, setCurrentDisplay, setCurrentFieldPortrayal, setPickableFlags, setPickableFlags, setSelected
public BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene)
public BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene, double scale)
public BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene, javax.media.j3d.Transform3D transform)
public BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene, javax.media.j3d.Appearance a)
public BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene, double scale, javax.media.j3d.Appearance a)
public BranchGroupPortrayal3D(javax.media.j3d.BranchGroup scene, javax.media.j3d.Transform3D transform, javax.media.j3d.Appearance a)
public static javax.media.j3d.BranchGroup getBranchGroupForResource(java.lang.Class c, java.lang.String resourceName) throws java.lang.IllegalArgumentException, java.io.FileNotFoundException
java.lang.IllegalArgumentException
java.io.FileNotFoundException
public static javax.media.j3d.BranchGroup getBranchGroupForURL(java.net.URL url) throws java.lang.IllegalArgumentException, java.io.FileNotFoundException
java.lang.IllegalArgumentException
java.io.FileNotFoundException
public static javax.media.j3d.BranchGroup getBranchGroupForFile(java.lang.String filename) throws java.lang.IllegalArgumentException, java.io.FileNotFoundException
java.lang.IllegalArgumentException
java.io.FileNotFoundException
public javax.media.j3d.TransformGroup getModel(java.lang.Object obj, javax.media.j3d.TransformGroup j3dModel)
PrimitivePortrayal3D
getModel
in interface Portrayal3D
getModel
in class PrimitivePortrayal3D
protected int numShapes()
numShapes
in class PrimitivePortrayal3D