public abstract class Object3DBranch
extends javax.media.j3d.BranchGroup
Modifier and Type | Field and Description |
---|---|
protected static java.lang.Integer |
DEFAULT_AMBIENT_COLOR |
protected static java.lang.Integer |
DEFAULT_COLOR |
protected static javax.media.j3d.Material |
DEFAULT_MATERIAL |
protected static float |
LINE_WIDTH_SCALE_FACTOR |
protected static javax.media.j3d.ColoringAttributes |
OUTLINE_COLORING_ATTRIBUTES |
protected static javax.media.j3d.LineAttributes |
OUTLINE_LINE_ATTRIBUTES |
protected static javax.media.j3d.PolygonAttributes |
OUTLINE_POLYGON_ATTRIBUTES |
protected static javax.media.j3d.ColoringAttributes |
SELECTION_COLORING_ATTRIBUTES |
protected static javax.media.j3d.LineAttributes |
SELECTION_LINE_ATTRIBUTES |
protected static javax.media.j3d.PolygonAttributes |
SELECTION_POLYGON_ATTRIBUTES |
protected static javax.media.j3d.TransparencyAttributes |
SELECTION_TRANSPARENCY_ATTRIBUTES |
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
Constructor and Description |
---|
Object3DBranch() |
Object3DBranch(java.lang.Object item,
Home home,
UserPreferences preferences,
java.lang.Object context) |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<float[][]> |
getAreaPoints(java.awt.geom.Area area,
float flatness,
boolean reversed)
Returns the list of polygons points matching the given
area . |
protected java.util.List<float[][]> |
getAreaPoints(java.awt.geom.Area area,
java.util.List<float[][]> areaPoints,
java.util.List<float[][]> areaHoles,
float flatness,
boolean reversed)
Returns the list of polygons points matching the given
area with detailed information in
areaPoints and areaHoles . |
java.lang.Object |
getContext()
Returns the context in which this object is used.
|
protected javax.media.j3d.Texture |
getContextTexture(javax.media.j3d.Texture texture,
java.lang.Object context)
Returns a cloned instance of texture shared per
context or
the texture itself if context is null . |
Home |
getHome()
Returns home instance or
null . |
protected javax.media.j3d.Texture |
getHomeTextureClone(javax.media.j3d.Texture texture,
Home home)
Deprecated.
Use
getContextTexture(Texture, Object) which context
parameter may be equal to different contexts for a given home |
protected javax.media.j3d.Material |
getMaterial(java.lang.Integer diffuseColor,
java.lang.Integer ambientColor,
float shininess)
Returns a shared material instance matching the given color.
|
protected javax.media.j3d.Appearance |
getSelectionAppearance()
Returns an appearance for selection shapes.
|
protected java.awt.Shape |
getShape(float[][] points)
Returns the closed shape matching the coordinates in
points array. |
protected javax.media.j3d.TextureAttributes |
getTextureAttributes(HomeTexture texture)
Returns shared texture attributes matching transformation applied to the given texture.
|
protected javax.media.j3d.TextureAttributes |
getTextureAttributes(HomeTexture texture,
boolean scaled)
Returns shared texture attributes matching transformation applied to the given texture
and scaled if required.
|
protected javax.media.j3d.TextureAttributes |
getTextureAttributesFittingArea(HomeTexture texture,
float[][] areaPoints,
boolean invertY)
Returns texture attributes with a transformation scaled to fit the surface matching
areaPoints . |
UserPreferences |
getUserPreferences()
Returns user preferences.
|
abstract void |
update()
Updates this branch from the home object.
|
cloneNode, compile, detach, pickAll, pickAll, pickAllSorted, pickAllSorted, pickAny, pickAny, pickClosest, pickClosest
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
protected static final float LINE_WIDTH_SCALE_FACTOR
protected static final javax.media.j3d.ColoringAttributes OUTLINE_COLORING_ATTRIBUTES
protected static final javax.media.j3d.PolygonAttributes OUTLINE_POLYGON_ATTRIBUTES
protected static final javax.media.j3d.LineAttributes OUTLINE_LINE_ATTRIBUTES
protected static final javax.media.j3d.ColoringAttributes SELECTION_COLORING_ATTRIBUTES
protected static final javax.media.j3d.PolygonAttributes SELECTION_POLYGON_ATTRIBUTES
protected static final javax.media.j3d.LineAttributes SELECTION_LINE_ATTRIBUTES
protected static final javax.media.j3d.TransparencyAttributes SELECTION_TRANSPARENCY_ATTRIBUTES
protected static final java.lang.Integer DEFAULT_COLOR
protected static final java.lang.Integer DEFAULT_AMBIENT_COLOR
protected static final javax.media.j3d.Material DEFAULT_MATERIAL
public Object3DBranch()
public Object3DBranch(java.lang.Object item, Home home, UserPreferences preferences, java.lang.Object context)
public Home getHome()
null
.public UserPreferences getUserPreferences()
public java.lang.Object getContext()
public abstract void update()
protected javax.media.j3d.Texture getHomeTextureClone(javax.media.j3d.Texture texture, Home home)
getContextTexture(Texture, Object)
which context
parameter may be equal to different contexts for a given homehome
or
the texture itself if home
is null
.
As sharing textures across universes might cause some problems,
it's safer to handle a copy of textures for a given home.protected javax.media.j3d.Texture getContextTexture(javax.media.j3d.Texture texture, java.lang.Object context)
context
or
the texture itself if context
is null
.
As sharing textures across universes might cause some problems,
it's safer to handle a copy of textures for a given context.protected java.awt.Shape getShape(float[][] points)
points
array.protected javax.media.j3d.Material getMaterial(java.lang.Integer diffuseColor, java.lang.Integer ambientColor, float shininess)
protected javax.media.j3d.TextureAttributes getTextureAttributes(HomeTexture texture)
protected javax.media.j3d.TextureAttributes getTextureAttributes(HomeTexture texture, boolean scaled)
protected javax.media.j3d.TextureAttributes getTextureAttributesFittingArea(HomeTexture texture, float[][] areaPoints, boolean invertY)
areaPoints
.protected javax.media.j3d.Appearance getSelectionAppearance()
protected java.util.List<float[][]> getAreaPoints(java.awt.geom.Area area, float flatness, boolean reversed)
area
.protected java.util.List<float[][]> getAreaPoints(java.awt.geom.Area area, java.util.List<float[][]> areaPoints, java.util.List<float[][]> areaHoles, float flatness, boolean reversed)
area
with detailed information in
areaPoints
and areaHoles
.
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License