|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--javax.media.j3d.SceneGraphObject
|
+--javax.media.j3d.NodeComponent
|
+--javax.media.j3d.ColoringAttributes
The ColoringAttributes object defines attributes used in color selection and shading.
| Field Summary | |
static int |
ALLOW_COLOR_READ
Specifies that this ColoringAttributes object allows reading its color component information. |
static int |
ALLOW_COLOR_WRITE
Specifies that this ColoringAttributes object allows writing its color component information. |
static int |
ALLOW_SHADE_MODEL_READ
Specifies that this ColoringAttributes object allows reading its shade model component information. |
static int |
ALLOW_SHADE_MODEL_WRITE
Specifies that this ColoringAttributes object allows writing its shade model component information. |
static int |
FASTEST
Use the fastest available method for shading. |
static int |
NICEST
Use the nicest available method for shading. |
static int |
SHADE_FLAT
Do not interpolate color across the primitive. |
static int |
SHADE_GOURAUD
Smoothly interpolate the color at each vertex across the primitive. |
| Constructor Summary | |
ColoringAttributes()
Constructs a ColoringAttributes node with default parameters. |
|
ColoringAttributes(Color3f color,
int shadeModel)
Construct ColoringAttributes object with specified values. |
|
ColoringAttributes(float red,
float green,
float blue,
int shadeModel)
Construct ColoringAttributes object with specified values. |
|
| Method Summary | |
NodeComponent |
cloneNodeComponent()
Creates a new ColoringAttributes object. |
void |
duplicateNodeComponent(NodeComponent originalNodeComponent)
Copies the information found in originalNodeComponent to
the current node. |
void |
getColor(Color3f color)
Gets the intrinsic color of this ColoringAttributes component object. |
int |
getShadeModel()
Gets the shade mode for this ColoringAttributes component object. |
void |
setColor(Color3f color)
Sets the intrinsic color of this ColoringAttributes component object. |
void |
setColor(float r,
float g,
float b)
Sets the intrinsic color of this ColoringAttributes component object. |
void |
setShadeModel(int shadeModel)
Sets the shade mode for this ColoringAttributes component object. |
java.lang.String |
toString()
Returns a String representation of this ColoringAttributes object. |
| Methods inherited from class javax.media.j3d.NodeComponent |
getDuplicateOnCloneTree,
setDuplicateOnCloneTree |
| Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability,
duplicateSceneGraphObject,
getCapability,
getUserData,
isCompiled,
isLive,
setCapability,
setUserData |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final int ALLOW_COLOR_READ
public static final int ALLOW_COLOR_WRITE
public static final int ALLOW_SHADE_MODEL_READ
public static final int ALLOW_SHADE_MODEL_WRITE
public static final int FASTEST
public static final int NICEST
public static final int SHADE_FLAT
public static final int SHADE_GOURAUD
| Constructor Detail |
public ColoringAttributes()
public ColoringAttributes(Color3f color,
int shadeModel)
color - the intrisic color.shadeModel - the shade model used.
public ColoringAttributes(float red,
float green,
float blue,
int shadeModel)
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.| Method Detail |
public final void setColor(Color3f color)
color - the color that is used when lighting is disabled
or when material is null
public final void setColor(float r,
float g,
float b)
r - the red component of the colorg - the green component of the colorb - the blue component of the colorpublic final void getColor(Color3f color)
color - the vector that will receive colorpublic final void setShadeModel(int shadeModel)
shadeModel - the shade mode to be used; one of FASTEST,
NICEST, SHADE_FLAT, or SHADE_GOURAUDpublic final int getShadeModel()
public NodeComponent cloneNodeComponent()
duplicateNode method.Node.duplicateNode(javax.media.j3d.Node, boolean),
Node.cloneTree(),
NodeComponent.setDuplicateOnCloneTree(boolean)public void duplicateNodeComponent(NodeComponent originalNodeComponent)
originalNodeComponent to
the current node. This routine is called as part of the
cloneNodeComponent operation.originalNodeComponent - the node to duplicate.Node.cloneTree(),
Node.cloneNode(boolean),
NodeComponent.duplicateNodeComponent(javax.media.j3d.NodeComponent),
NodeComponent.setDuplicateOnCloneTree(boolean)public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||