org.xith3d.scenegraph.primitives
Class Line

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.Node
          extended by org.xith3d.scenegraph.Leaf
              extended by org.xith3d.scenegraph.Shape3D
                  extended by org.xith3d.scenegraph.primitives.Line
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode

public class Line
extends Shape3D

This Shape represents a simple 3D-line.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, parent, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
Line(org.openmali.vecmath2.Tuple3f end, boolean antiAliasing, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line of 1 pixel width starting at (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f end, boolean antiAliasing, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new solid Line of 1 pixel width starting at (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f end, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line of 1 pixel width starting at (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f end, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new solid Line of 1 pixel width starting at (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f end, float width, boolean antiAliasing, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line starting at (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f end, float width, boolean antiAliasing, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new solid Line starting at (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f end, float width, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line starting at (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f end, float width, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new solid Line starting at (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f start, org.openmali.vecmath2.Tuple3f end, boolean antiAliasing, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line of 1 pixel width.
Line(org.openmali.vecmath2.Tuple3f start, org.openmali.vecmath2.Tuple3f end, boolean antiAliasing, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new solid Line of 1 pixel width.
Line(org.openmali.vecmath2.Tuple3f start, org.openmali.vecmath2.Tuple3f end, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line of 1 pixel width.
Line(org.openmali.vecmath2.Tuple3f start, org.openmali.vecmath2.Tuple3f end, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new solid Line of 1 pixel width.
Line(org.openmali.vecmath2.Tuple3f start, org.openmali.vecmath2.Tuple3f end, float width, boolean antiAliasing, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line.
Line(org.openmali.vecmath2.Tuple3f start, org.openmali.vecmath2.Tuple3f end, float width, boolean antiAliasing, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new Line.
Line(org.openmali.vecmath2.Tuple3f start, org.openmali.vecmath2.Tuple3f end, float width, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line.
 
Method Summary
 org.openmali.vecmath2.Colorf getColor()
           
 float[] getCoordinates()
           
 LineArray getGeometry()
          
 org.jagatoo.opengl.enums.LinePattern getPattern()
           
 float getWidth()
           
 boolean isAntialiasingEnabled()
           
 void setAntialiasingEnabled(boolean enabled)
          Sets the Line's antialiasing flag to enabled.
 void setColor(org.openmali.vecmath2.Colorf color)
          Sets the Line's color.
 void setCoordinates(float[] coords)
          Sets this Line's coordinates.
 void setCoordinates(float x1, float y1, float z1)
          Sets this Line's coordinates.
 void setCoordinates(float x0, float y0, float z0, float x1, float y1, float z1)
          Sets this Line's coordinates.
 void setCoordinates(org.openmali.vecmath2.Tuple3f end)
          Sets this Line's coordinates.
 void setCoordinates(org.openmali.vecmath2.Tuple3f start, org.openmali.vecmath2.Tuple3f end)
          Sets this Line's coordinates.
 void setPattern(org.jagatoo.opengl.enums.LinePattern pattern)
          Sets the Line's LinePattern.
 void setWidth(float width)
          Sets the Line's width in pixels.
 
Methods inherited from class org.xith3d.scenegraph.Shape3D
absorbDetails, freeOpenGLResources, getAppearance, getAppearance, isBumpMappingEnabled, isShadowReceiver, isVisible, newAppearance, setAppearance, setBounds, setBumpMappingEnabled, setBumpMappingEnabled, setGeometry, setIsShadowReceiver, setLive, setModListener, setVisible, sharedCopy, sharedCopy, traverse, updateBounds, updateBoundsCheap, updateWorldTransform, verifyAppChange
 
Methods inherited from class org.xith3d.scenegraph.Leaf
dump, getPickHost, setPickHost
 
Methods inherited from class org.xith3d.scenegraph.Node
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBoundsAutoCompute, setBoundsDirty, setBoundsDirtyUpward, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateOrderedChild, updateTransformGroup
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Line

public Line(org.openmali.vecmath2.Tuple3f start,
            org.openmali.vecmath2.Tuple3f end,
            float width,
            boolean antiAliasing,
            org.openmali.vecmath2.Colorf color,
            org.jagatoo.opengl.enums.LinePattern linePattern)
Creates a new Line.

Parameters:
start - start point coordinates
end - end point coordinates
width - the Line's width in pixels
antiAliasing - the value for the Line's antialiasing flag
color - the Line's color
linePattern - the pattern for how this line is to be rendered
See Also:
LineAttributes

Line

public Line(org.openmali.vecmath2.Tuple3f start,
            org.openmali.vecmath2.Tuple3f end,
            float width,
            boolean antiAliasing,
            org.openmali.vecmath2.Colorf color)
Creates a new solid Line.

Parameters:
start - start point coordinates
end - end point coordinates
width - the Line's width in pixels
antiAliasing - the value for the Line's antialiasing flag
color - the Line's color

Line

public Line(org.openmali.vecmath2.Tuple3f start,
            org.openmali.vecmath2.Tuple3f end,
            float width,
            org.openmali.vecmath2.Colorf color)
Creates a new solid Line.

Parameters:
start - start point coordinates
end - end point coordinates
width - the Line's width in pixels
color - the Line's color

Line

public Line(org.openmali.vecmath2.Tuple3f start,
            org.openmali.vecmath2.Tuple3f end,
            boolean antiAliasing,
            org.openmali.vecmath2.Colorf color,
            org.jagatoo.opengl.enums.LinePattern linePattern)
Creates a new solid Line of 1 pixel width.

Parameters:
start - start point coordinates
end - end point coordinates
antiAliasing - the value for the Line's antialiasing flag
color - the Line's color
linePattern - the pattern for how this line is to be rendered

Line

public Line(org.openmali.vecmath2.Tuple3f start,
            org.openmali.vecmath2.Tuple3f end,
            org.openmali.vecmath2.Colorf color,
            org.jagatoo.opengl.enums.LinePattern linePattern)
Creates a new solid Line of 1 pixel width.

Parameters:
start - start point coordinates
end - end point coordinates
color - the Line's color
linePattern - the pattern for how this line is to be rendered

Line

public Line(org.openmali.vecmath2.Tuple3f start,
            org.openmali.vecmath2.Tuple3f end,
            boolean antiAliasing,
            org.openmali.vecmath2.Colorf color)
Creates a new solid Line of 1 pixel width.

Parameters:
start - start point coordinates
end - end point coordinates
antiAliasing - the value for the Line's antialiasing flag
color - the Line's color

Line

public Line(org.openmali.vecmath2.Tuple3f start,
            org.openmali.vecmath2.Tuple3f end,
            org.openmali.vecmath2.Colorf color)
Creates a new solid Line of 1 pixel width.

Parameters:
start - start point coordinates
end - end point coordinates
color - the Line's color

Line

public Line(org.openmali.vecmath2.Tuple3f end,
            float width,
            boolean antiAliasing,
            org.openmali.vecmath2.Colorf color,
            org.jagatoo.opengl.enums.LinePattern linePattern)
Creates a new solid Line starting at (0, 0, 0).

Parameters:
end - end point coordinates
width - the Line's width in pixels
antiAliasing - the value for the Line's antialiasing flag
color - the Line's color
linePattern - the pattern for how this line is to be rendered

Line

public Line(org.openmali.vecmath2.Tuple3f end,
            float width,
            org.openmali.vecmath2.Colorf color,
            org.jagatoo.opengl.enums.LinePattern linePattern)
Creates a new solid Line starting at (0, 0, 0).

Parameters:
end - end point coordinates
width - the Line's width in pixels
color - the Line's color
linePattern - the pattern for how this line is to be rendered

Line

public Line(org.openmali.vecmath2.Tuple3f end,
            float width,
            boolean antiAliasing,
            org.openmali.vecmath2.Colorf color)
Creates a new solid Line starting at (0, 0, 0).

Parameters:
end - end point coordinates
width - the Line's width in pixels
antiAliasing - the value for the Line's antialiasing flag
color - the Line's color

Line

public Line(org.openmali.vecmath2.Tuple3f end,
            float width,
            org.openmali.vecmath2.Colorf color)
Creates a new solid Line starting at (0, 0, 0).

Parameters:
end - end point coordinates
width - the Line's width in pixels
color - the Line's color

Line

public Line(org.openmali.vecmath2.Tuple3f end,
            boolean antiAliasing,
            org.openmali.vecmath2.Colorf color,
            org.jagatoo.opengl.enums.LinePattern linePattern)
Creates a new solid Line of 1 pixel width starting at (0, 0, 0).

Parameters:
end - end point coordinates
antiAliasing - the value for the Line's antialiasing flag
color - the Line's color
linePattern - the pattern for how this line is to be rendered

Line

public Line(org.openmali.vecmath2.Tuple3f end,
            org.openmali.vecmath2.Colorf color,
            org.jagatoo.opengl.enums.LinePattern linePattern)
Creates a new solid Line of 1 pixel width starting at (0, 0, 0).

Parameters:
end - end point coordinates
color - the Line's color
linePattern - the pattern for how this line is to be rendered

Line

public Line(org.openmali.vecmath2.Tuple3f end,
            boolean antiAliasing,
            org.openmali.vecmath2.Colorf color)
Creates a new solid Line of 1 pixel width starting at (0, 0, 0).

Parameters:
end - end point coordinates
antiAliasing - the value for the Line's antialiasing flag
color - the Line's color

Line

public Line(org.openmali.vecmath2.Tuple3f end,
            org.openmali.vecmath2.Colorf color)
Creates a new solid Line of 1 pixel width starting at (0, 0, 0).

Parameters:
end - end point coordinates
color - the Line's color
Method Detail

getGeometry

public LineArray getGeometry()

Overrides:
getGeometry in class Shape3D
Returns:
the Geometry for this object.

setCoordinates

public void setCoordinates(float[] coords)
Sets this Line's coordinates.

Parameters:
coords - a 6 elemental array with start and end point coordinates

setCoordinates

public void setCoordinates(float x0,
                           float y0,
                           float z0,
                           float x1,
                           float y1,
                           float z1)
Sets this Line's coordinates.

Parameters:
x0 - start and end point coordinates
y0 - start and end point coordinates
z0 - start and end point coordinates
x1 - start and end point coordinates
y1 - start and end point coordinates
z1 - start and end point coordinates

setCoordinates

public void setCoordinates(float x1,
                           float y1,
                           float z1)
Sets this Line's coordinates.
This sets the start-position to (0, 0, 0).

Parameters:
x1 - start and end point coordinates
y1 - start and end point coordinates
z1 - start and end point coordinates

setCoordinates

public void setCoordinates(org.openmali.vecmath2.Tuple3f start,
                           org.openmali.vecmath2.Tuple3f end)
Sets this Line's coordinates.

Parameters:
start - start point coordinates
end - end point coordinates

setCoordinates

public void setCoordinates(org.openmali.vecmath2.Tuple3f end)
Sets this Line's coordinates.
This sets the start-point to (0, 0, 0).

Parameters:
end - end point coordinates

getCoordinates

public float[] getCoordinates()
Returns:
this Line's coordinates.

setColor

public void setColor(org.openmali.vecmath2.Colorf color)
Sets the Line's color.

Parameters:
color - the new color

getColor

public org.openmali.vecmath2.Colorf getColor()
Returns:
the Line's color.

setPattern

public void setPattern(org.jagatoo.opengl.enums.LinePattern pattern)
Sets the Line's LinePattern.

Parameters:
pattern - the new LinePattern

getPattern

public org.jagatoo.opengl.enums.LinePattern getPattern()
Returns:
the Line's LinePattern.

setWidth

public void setWidth(float width)
Sets the Line's width in pixels.

Parameters:
width - the new line-width in pixels

getWidth

public float getWidth()
Returns:
the Line's width in pixels.

setAntialiasingEnabled

public void setAntialiasingEnabled(boolean enabled)
Sets the Line's antialiasing flag to enabled.

Parameters:
enabled -

isAntialiasingEnabled

public boolean isAntialiasingEnabled()
Returns:
the value of the Line's antialiasing flag.