org.xith3d.scenegraph
Class PointAttributes

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.NodeComponent
          extended by org.xith3d.scenegraph.PointAttributes
All Implemented Interfaces:
java.lang.Comparable<PointAttributes>, org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, StateTrackable<PointAttributes>

public class PointAttributes
extends NodeComponent
implements StateTrackable<PointAttributes>

PointAttributes defines attributes that apply to .


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
PointAttributes()
          Constructs a new PointAttributes object.
PointAttributes(float pointSize, boolean antialiasing)
          Constructs a new PointAttributes object with the specified color.
 
Method Summary
 PointAttributes cloneNodeComponent(boolean forceDuplicate)
          
 int compareTo(PointAttributes o)
          
protected  void duplicateNodeComponent(NodeComponent original, boolean forceDuplicate)
          
 boolean equals(java.lang.Object o)
          
 void freeOpenGLResources(CanvasPeer canvasPeer)
          This method frees OpenGL resources (names) for all this NodeComponent and all child-components.
 PointAttributes getCopy()
           
 float getPointSize()
          Get the point size.
 long getStateId()
           
 StateNode getStateNode()
           
 boolean isPointAntialiasingEnabled()
          Get antialiasing.
 boolean isSortEnabled()
           
 void setPointAntialiasingEnabled(boolean state)
          Set antialiasing .
 void setPointSize(float pointSize)
          Set the point size.
 void setSortEnabled(boolean sortEnabled)
          Enables or disables transaprency sorting for this shape.
 void setStateNode(StateNode node)
          Used by the render engine to set the state id for the node.
 
Methods inherited from class org.xith3d.scenegraph.NodeComponent
freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PointAttributes

public PointAttributes()
Constructs a new PointAttributes object.


PointAttributes

public PointAttributes(float pointSize,
                       boolean antialiasing)
Constructs a new PointAttributes object with the specified color.

Method Detail

setPointSize

public final void setPointSize(float pointSize)
Set the point size.


getPointSize

public final float getPointSize()
Get the point size.


setPointAntialiasingEnabled

public final void setPointAntialiasingEnabled(boolean state)
Set antialiasing .


isPointAntialiasingEnabled

public final boolean isPointAntialiasingEnabled()
Get antialiasing.


setSortEnabled

public void setSortEnabled(boolean sortEnabled)
Enables or disables transaprency sorting for this shape. Point can be classified as transparent if it has antialiasing enabled.

Transparency attributes can be marked to disable sorting transparent shapes by calling of setSortEnabled(false). When this is done, transparent shape it will not be drawn during the transparent rendering pass, but will be drawn with the solids (in the opaque rendering pass), i.e. this transparent shape will be treated just like regular opaque shape.

By default, sorting is enabled.

See Also:
OrderedGroup, TransparencyAttributes.setSortEnabled(boolean)

isSortEnabled

public final boolean isSortEnabled()

freeOpenGLResources

public void freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all this NodeComponent and all child-components.

Specified by:
freeOpenGLResources in class NodeComponent

duplicateNodeComponent

protected void duplicateNodeComponent(NodeComponent original,
                                      boolean forceDuplicate)

Overrides:
duplicateNodeComponent in class NodeComponent

cloneNodeComponent

public PointAttributes cloneNodeComponent(boolean forceDuplicate)

Specified by:
cloneNodeComponent in class NodeComponent

setStateNode

public final void setStateNode(StateNode node)
Description copied from interface: StateTrackable
Used by the render engine to set the state id for the node.

Specified by:
setStateNode in interface StateTrackable<PointAttributes>

getStateNode

public final StateNode getStateNode()
Specified by:
getStateNode in interface StateTrackable<PointAttributes>
Returns:
the id of the object. This should return -1 if there is no assigned id.

getStateId

public final long getStateId()

getCopy

public PointAttributes getCopy()
Specified by:
getCopy in interface StateTrackable<PointAttributes>
Returns:
a copy of the state of the referenced trackable object.

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(PointAttributes o)

Specified by:
compareTo in interface java.lang.Comparable<PointAttributes>