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 primitive Shape represents a simple 3D-line.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, 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 the origin (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 Line of 1 pixel width starting at the origin (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 the origin (0, 0, 0) without antialiasing.
Line(org.openmali.vecmath2.Tuple3f end, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new Line of 1 pixel width starting at the origin (0, 0, 0) without antialiasing.
Line(org.openmali.vecmath2.Tuple3f end, float width, boolean antiAliasing, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line starting at the origin (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 Line starting at the origin (0, 0, 0).
Line(org.openmali.vecmath2.Tuple3f end, float width, org.openmali.vecmath2.Colorf color)
          Creates a new solid Line starting at the origin (0, 0, 0) without antialiasing.
Line(org.openmali.vecmath2.Tuple3f end, float width, org.openmali.vecmath2.Colorf color, org.jagatoo.opengl.enums.LinePattern linePattern)
          Creates a new Line starting at the origin (0, 0, 0) without antialiasing.
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 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 without antialiasing.
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 Line of 1 pixel width without antialiasing.
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 without antialiasing.
 
Method Summary
 org.openmali.vecmath2.Colorf getColor()
          Returns the Line's color.
 float[] getCoordinates()
          Returns this Line's coordinates.
 LineArray getGeometry()
          
 org.jagatoo.opengl.enums.LinePattern getPattern()
          Returns the Line's pattern.
 float getWidth()
          Return the Line's width in pixels.
 boolean isAntialiasingEnabled()
          Returns the current antialiasing flag for this line.
 void setAntialiasingEnabled(boolean enabled)
          Sets the Line's antialiasing flag.
 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 the pattern for how this line is to be rendered.
 void setWidth(float width)
          Sets the Line's width in pixels.
 
Methods inherited from class org.xith3d.scenegraph.Shape3D
absorbDetails, copy, freeOpenGLResources, getAppearance, getAppearance, getCustomComparable, isBumpMappingEnabled, isShadowReceiver, isVisible, newAppearance, newInstance, setAppearance, setBounds, setBumpMappingEnabled, setBumpMappingEnabled, setCustomComparable, setGeometry, setIsShadowReceiver, 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, setLive, 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 - starting point coordinates
end - ending point coordinates
width - this Line's width in pixels
antiAliasing - flag to indicate whether to turn on antialiasing for this Line
color - this Line's color
linePattern - the pattern for how this line is to be rendered
See Also:
LinePattern

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 - starting point coordinates
end - ending point coordinates
width - the Line's width in pixels
antiAliasing - flag to indicate whether to turn on antialiasing for this Line
color - this 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 without antialiasing.

Parameters:
start - starting point coordinates
end - ending point coordinates
width - the Line's width in pixels
color - this 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 Line of 1 pixel width.

Parameters:
start - starting point coordinates
end - ending point coordinates
antiAliasing - flag to indicate whether to turn on antialiasing for this Line
color - this Line's color
linePattern - the pattern for how this line is to be rendered
See Also:
LinePattern

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 Line of 1 pixel width without antialiasing.

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

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 - starting point coordinates
end - ending point coordinates
antiAliasing - flag to indicate whether to turn on antialiasing for this Line
color - this 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 without antialiasing.

Parameters:
start - starting point coordinates
end - ending point coordinates
color - this 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 Line starting at the origin (0, 0, 0).

Parameters:
end - ending point coordinates
width - the Line's width in pixels
antiAliasing - flag to indicate whether to turn on antialiasing for this Line
color - this Line's color
linePattern - the pattern for how this line is to be rendered
See Also:
LinePattern

Line

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

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

Line

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

Parameters:
end - ending point coordinates
width - the Line's width in pixels
antiAliasing - flag to indicate whether to turn on antialiasing for this Line
color - this 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 the origin (0, 0, 0) without antialiasing.

Parameters:
end - ending point coordinates
width - the Line's width in pixels
color - this 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 Line of 1 pixel width starting at the origin (0, 0, 0).

Parameters:
end - ending point coordinates
antiAliasing - flag to indicate whether to turn on antialiasing for this Line
color - this Line's color
linePattern - the pattern for how this line is to be rendered
See Also:
LinePattern

Line

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

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

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 the origin (0, 0, 0).

Parameters:
end - ending point coordinates
antiAliasing - flag to indicate whether to turn on antialiasing for this Line
color - this 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 the origin (0, 0, 0) without antialiasing.

Parameters:
end - ending point coordinates
color - this 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-element array with starting and ending point coordinates with this format {x0,y0,z0,x1,y1,z1}

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 starting position to the origin (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 - starting point coordinates
end - ending point coordinates

setCoordinates

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

Parameters:
end - ending point coordinates

getCoordinates

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

Returns:
this Line's coordinates

setColor

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

Parameters:
color - the new color to set

getColor

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

Returns:
the Line's color

setPattern

public void setPattern(org.jagatoo.opengl.enums.LinePattern pattern)
Sets the the pattern for how this line is to be rendered.

Parameters:
pattern - the new pattern to set
See Also:
LinePattern

getPattern

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

Returns:
the Line's pattern
See Also:
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()
Return the Line's width in pixels.

Returns:
the Line's width in pixels

setAntialiasingEnabled

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

Parameters:
enabled - true to turn on antialiasing for this line; false otherwise

isAntialiasingEnabled

public boolean isAntialiasingEnabled()
Returns the current antialiasing flag for this line.

Returns:
true if antialiasing is on for this line; false otherwise