All Packages Class Hierarchy This Package Previous Next Index
Class java.media.j3d.ColoringAttributes
java.lang.Object
|
+----java.media.j3d.SceneGraphObject
|
+----java.media.j3d.NodeComponent
|
+----java.media.j3d.ColoringAttributes
- public class ColoringAttributes
- extends NodeComponent
The ColoringAttributes object defines attributes that apply to
to coloring mapping.
-
ALLOW_COLOR_READ
- Specifies that this ColoringAttributes object allows
reading its color component information.
-
ALLOW_COLOR_WRITE
- Specifies that this ColoringAttributes object allows
writing its color component information.
-
ALLOW_SHADE_MODEL_READ
- Specifies that this ColoringAttributes object allows
reading its shade model component information.
-
ALLOW_SHADE_MODEL_WRITE
- Specifies that this ColoringAttributes object allows
writing its shade model component information.
-
FASTEST
- Use the fastest available method for shading.
-
NICEST
- Use the nicest available method for shading.
-
SHADE_FLAT
- Do not interpolate color across the primitive.
-
SHADE_GOURAUD
- Smoothly interpolate the color at each vertex across the primitive.
-
ColoringAttributes()
- Construct ColoringAttributes object with default values.
-
ColoringAttributes(Color3f, int)
- Construct ColoringAttributes object with specified values.
-
ColoringAttributes(float, float, float, int)
- Construct ColoringAttributes object with specified values.
-
cloneNodeComponent()
- Creates a new ColoringAttributes object.
-
duplicateNodeComponent(Node)
- Copies the information found in
originalNode
to
the current node.
-
getColor(Color3f)
- Gets the intrinsic color of this ColoringAttributes
component object.
-
getShadeModel()
- Gets the shade mode for this ColoringAttributes component object.
-
setColor(Color3f)
- Sets the intrinsic color of this ColoringAttributes
component object.
-
setColor(float, float, float)
- Sets the intrinsic color of this ColoringAttributes
component object.
-
setShadeModel(int)
- Sets the shade mode for this ColoringAttributes component object.
ALLOW_COLOR_READ
public static final int ALLOW_COLOR_READ
- Specifies that this ColoringAttributes object allows
reading its color component information.
ALLOW_COLOR_WRITE
public static final int ALLOW_COLOR_WRITE
- Specifies that this ColoringAttributes object allows
writing its color component information.
ALLOW_SHADE_MODEL_READ
public static final int ALLOW_SHADE_MODEL_READ
- Specifies that this ColoringAttributes object allows
reading its shade model component information.
ALLOW_SHADE_MODEL_WRITE
public static final int ALLOW_SHADE_MODEL_WRITE
- Specifies that this ColoringAttributes object allows
writing its shade model component information.
FASTEST
public static final int FASTEST
- Use the fastest available method for shading.
NICEST
public static final int NICEST
- Use the nicest available method for shading.
SHADE_FLAT
public static final int SHADE_FLAT
- Do not interpolate color across the primitive.
SHADE_GOURAUD
public static final int SHADE_GOURAUD
- Smoothly interpolate the color at each vertex across the primitive.
ColoringAttributes
public ColoringAttributes()
- Construct ColoringAttributes object with default values.
ColoringAttributes
public ColoringAttributes(Color3f color,
int shadeModel)
- Construct ColoringAttributes object with specified values.
- Parameters:
- color - the intrisic color.
- shadeModel - the shade model used.
ColoringAttributes
public ColoringAttributes(float red,
float green,
float blue,
int shadeModel)
- Construct ColoringAttributes object with specified values.
- Parameters:
- red - red component of the intrisic color.
- green - green component of the intrisic color.
- blue - blue component of the intrisic color.
- shadeModel - the shade model used.
setColor
public final void setColor(Color3f color)
- Sets the intrinsic color of this ColoringAttributes
component object.
- Parameters:
- color - the color that is used when lighting is disabled
or when material is null
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setColor
public final void setColor(float r,
float g,
float b)
- Sets the intrinsic color of this ColoringAttributes
component object. This color is used when lighting is disabled
or when material is null.
- Parameters:
- r - the red component of the color
- g - the green component of the color
- b - the blue component of the color
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getColor
public final void getColor(Color3f color)
- Gets the intrinsic color of this ColoringAttributes
component object.
- Parameters:
- color - the vector that will receive color
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setShadeModel
public final void setShadeModel(int shadeModel)
- Sets the shade mode for this ColoringAttributes component object.
- Parameters:
- shadeModel - the shade mode to be used; one of FASTEST,
NICEST, SHADE_FLAT, or SHADE_GOURAUD
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getShadeModel
public final int getShadeModel()
- Gets the shade mode for this ColoringAttributes component object.
- Returns:
- shadeModel the shade mode
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
cloneNodeComponent
public NodeComponent cloneNodeComponent()
- Creates a new ColoringAttributes object. Called from a Leaf
node's
duplicateNode
method.
- Returns:
- a duplicate of the ColoringAttributes object.
- Overrides:
- cloneNodeComponent in class NodeComponent
- See Also:
- duplicateNode, cloneTree, setDuplicateOnCloneTree
duplicateNodeComponent
public void duplicateNodeComponent(Node originalNode)
- Copies the information found in
originalNode
to
the current node. This routine is called as part of the
cloneTree
operation.
- Parameters:
- originalNode - the node to duplicate.
- See Also:
- cloneTree, duplicateNode, setDuplicateOnCloneTree
All Packages Class Hierarchy This Package Previous Next Index