javax.media.j3d
Class PolygonAttributesRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeComponentRetained
              extended by javax.media.j3d.PolygonAttributesRetained
All Implemented Interfaces:
java.lang.Cloneable

 class PolygonAttributesRetained
extends NodeComponentRetained

The PolygonAttributes object defines all rendering state that can be set as a component object of a Shape3D node.


Field Summary
(package private)  boolean backFaceNormalFlip
           
(package private)  int cullFace
           
(package private) static int POLYGON_BACKFACENORMALFLIP_CHANGED
           
(package private) static int POLYGON_CULL_CHANGED
           
(package private) static int POLYGON_MODE_CHANGED
           
(package private) static int POLYGON_OFFSET_CHANGED
           
(package private) static int POLYGON_OFFSETFACTOR_CHANGED
           
(package private)  int polygonMode
           
(package private)  float polygonOffset
           
(package private)  float polygonOffsetFactor
           
 
Fields inherited from class javax.media.j3d.NodeComponentRetained
changedFrequent, compChanged, duplicateOnCloneTree, mirror, refCnt, refCount, users
 
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source
 
Fields inherited from class javax.media.j3d.IndexedObject
listIdx
 
Constructor Summary
PolygonAttributesRetained()
           
 
Method Summary
(package private)  void createMirrorObject()
          Creates and initializes a mirror object, point the mirror object to the retained object if the object is not editable
(package private)  boolean equivalent(PolygonAttributesRetained pr)
           
(package private)  boolean getBackFaceNormalFlip()
          Gets the back face normal flip flag.
(package private)  int getCullFace()
          Gets the face culling for this appearance component object.
(package private)  int getPolygonMode()
          Gets the polygon rasterization mode for this appearance component object.
(package private)  float getPolygonOffset()
          Gets the polygon offset.
(package private)  float getPolygonOffsetFactor()
          Gets the polygon offset factor.
(package private)  void handleFrequencyChange(int bit)
           
(package private)  void initBackFaceNormalFlip(boolean backFaceNormalFlip)
          Sets the back face normal flip flag to the specified value This flag indicates whether vertex normals of back facing polygons should be flipped (negated) prior to lighting.
(package private)  void initCullFace(int cullFace)
          Sets the face culling for this appearance component object,
(package private)  void initMirrorObject()
          Initializes a mirror object, point the mirror object to the retained object if the object is not editable
(package private)  void initPolygonMode(int polygonMode)
          Sets the polygon rasterization mode for this appearance component object.
(package private)  void initPolygonOffset(float polygonOffset)
          Sets the polygon offset to the specified value and sends a message notifying the interested structures of the change.
(package private)  void initPolygonOffsetFactor(float polygonOffsetFactor)
          Sets the polygon offset factor to the specified value and sends a message notifying the interested structures of the change.
(package private)  void sendMessage(int attrMask, java.lang.Object attr)
           
protected  void set(PolygonAttributesRetained pr)
           
(package private)  void setBackFaceNormalFlip(boolean backFaceNormalFlip)
          Sets the back face normal flip flag to the specified value and sends a message notifying the interested structures of the change.
(package private)  void setCullFace(int cullFace)
          Sets the face culling for this appearance component object and sends a message notifying the interested structures of the change.
(package private)  void setPolygonMode(int polygonMode)
          Sets the polygon rasterization mode for this appearance component object and sends a message notifying the interested structures of the change.
(package private)  void setPolygonOffset(float polygonOffset)
          Sets the polygon offset to the specified value and sends a message notifying the interested structures of the change.
(package private)  void setPolygonOffsetFactor(float polygonOffsetFactor)
          Sets the polygon offset factor to the specified value and sends a message notifying the interested structures of the change.
(package private)  void updateMirrorObject(int component, java.lang.Object value)
          Update the "component" field of the mirror object with the given "value"
(package private)  void updateNative(Context ctx)
          Updates the native context
 
Methods inherited from class javax.media.j3d.NodeComponentRetained
addAMirrorUser, addUser, clearLive, clone, copyMirrorUsers, decRefCnt, doSetLive, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, notifyUsers, removeAMirrorUser, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, setFrequencyChangeMask, setInImmCtx, setLive
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, compile, doSetLive, doSetLive, getSource, getVirtualUniverse, isInSetLive, isStatic, markAsLive, merge, mergeTransform, setCompiled, setLive, setLive, setSource, traverse
 
Methods inherited from class javax.media.j3d.IndexedObject
getIdxUsed, incIdxUsed
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLYGON_MODE_CHANGED

static final int POLYGON_MODE_CHANGED
See Also:
Constant Field Values

POLYGON_CULL_CHANGED

static final int POLYGON_CULL_CHANGED
See Also:
Constant Field Values

POLYGON_OFFSET_CHANGED

static final int POLYGON_OFFSET_CHANGED
See Also:
Constant Field Values

POLYGON_BACKFACENORMALFLIP_CHANGED

static final int POLYGON_BACKFACENORMALFLIP_CHANGED
See Also:
Constant Field Values

POLYGON_OFFSETFACTOR_CHANGED

static final int POLYGON_OFFSETFACTOR_CHANGED
See Also:
Constant Field Values

polygonMode

int polygonMode

cullFace

int cullFace

backFaceNormalFlip

boolean backFaceNormalFlip

polygonOffset

float polygonOffset

polygonOffsetFactor

float polygonOffsetFactor
Constructor Detail

PolygonAttributesRetained

PolygonAttributesRetained()
Method Detail

initCullFace

final void initCullFace(int cullFace)
Sets the face culling for this appearance component object,

Parameters:
cullFace - the face to be culled, one of: CULL_NONE, CULL_FRONT, or CULL_BACK

setCullFace

final void setCullFace(int cullFace)
Sets the face culling for this appearance component object and sends a message notifying the interested structures of the change.

Parameters:
cullFace - the face to be culled, one of: CULL_NONE, CULL_FRONT, or CULL_BACK

getCullFace

final int getCullFace()
Gets the face culling for this appearance component object.

Returns:
the face to be culled

initBackFaceNormalFlip

final void initBackFaceNormalFlip(boolean backFaceNormalFlip)
Sets the back face normal flip flag to the specified value This flag indicates whether vertex normals of back facing polygons should be flipped (negated) prior to lighting. When this flag is set to true and back face culling is disabled, polygons are rendered as if the polygon had two sides with opposing normals. This feature is disabled by default

Parameters:
backFaceNormalFlip - the back face normal flip flag

setBackFaceNormalFlip

final void setBackFaceNormalFlip(boolean backFaceNormalFlip)
Sets the back face normal flip flag to the specified value and sends a message notifying the interested structures of the change. This flag indicates whether vertex normals of back facing polygons should be flipped (negated) prior to lighting. When this flag is set to true and back face culling is disabled, polygons are rendered as if the polygon had two sides with opposing normals. This feature is disabled by default

Parameters:
backFaceNormalFlip - the back face normal flip flag

getBackFaceNormalFlip

final boolean getBackFaceNormalFlip()
Gets the back face normal flip flag.

Returns:
the back face normal flip flag

initPolygonMode

final void initPolygonMode(int polygonMode)
Sets the polygon rasterization mode for this appearance component object.

Parameters:
polygonMode - the polygon rasterization mode to be used; one of POLYGON_FILL, POLYGON_LINE, or POLYGON_POINT

setPolygonMode

final void setPolygonMode(int polygonMode)
Sets the polygon rasterization mode for this appearance component object and sends a message notifying the interested structures of the change.

Parameters:
polygonMode - the polygon rasterization mode to be used; one of POLYGON_FILL, POLYGON_LINE, or POLYGON_POINT

getPolygonMode

final int getPolygonMode()
Gets the polygon rasterization mode for this appearance component object.

Returns:
polygonMode the polygon rasterization mode

initPolygonOffset

final void initPolygonOffset(float polygonOffset)
Sets the polygon offset to the specified value and sends a message notifying the interested structures of the change. This screen space offset is added to the final, device coordinate Z value of polygon primitives.

Parameters:
polygonOffset - the polygon offset

setPolygonOffset

final void setPolygonOffset(float polygonOffset)
Sets the polygon offset to the specified value and sends a message notifying the interested structures of the change. This screen space offset is added to the final, device coordinate Z value of polygon primitives.

Parameters:
polygonOffset - the polygon offset

getPolygonOffset

final float getPolygonOffset()
Gets the polygon offset.

Returns:
polygonOffset the polygon offset

initPolygonOffsetFactor

final void initPolygonOffsetFactor(float polygonOffsetFactor)
Sets the polygon offset factor to the specified value and sends a message notifying the interested structures of the change. This factor is multiplied by the slope of the polygon, and then added to the final, device coordinate Z value of polygon primitives.

Parameters:
polygonOffsetFactor - the polygon offset factor

setPolygonOffsetFactor

final void setPolygonOffsetFactor(float polygonOffsetFactor)
Sets the polygon offset factor to the specified value and sends a message notifying the interested structures of the change. This factor is multiplied by the slope of the polygon, and then added to the final, device coordinate Z value of polygon primitives.

Parameters:
polygonOffsetFactor - the polygon offset

getPolygonOffsetFactor

final float getPolygonOffsetFactor()
Gets the polygon offset factor.

Returns:
polygonOffset the polygon offset factor

createMirrorObject

void createMirrorObject()
Creates and initializes a mirror object, point the mirror object to the retained object if the object is not editable

Overrides:
createMirrorObject in class NodeComponentRetained

updateNative

void updateNative(Context ctx)
Updates the native context


initMirrorObject

void initMirrorObject()
Initializes a mirror object, point the mirror object to the retained object if the object is not editable

Overrides:
initMirrorObject in class NodeComponentRetained

updateMirrorObject

void updateMirrorObject(int component,
                        java.lang.Object value)
Update the "component" field of the mirror object with the given "value"

Overrides:
updateMirrorObject in class NodeComponentRetained

equivalent

boolean equivalent(PolygonAttributesRetained pr)

set

protected void set(PolygonAttributesRetained pr)

sendMessage

final void sendMessage(int attrMask,
                       java.lang.Object attr)

handleFrequencyChange

void handleFrequencyChange(int bit)
Overrides:
handleFrequencyChange in class SceneGraphObjectRetained


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.