|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.NodeComponent
org.j3d.aviatrix3d.LineAttributes
Describes attributes used when rendering a line.
Default size of a line is 1.0 pixels and is not antialiased. The predefined line types are taken from the ISO internation register of line styles. The definitions can be found at http://jitc.fhu.disa.mil/nitf/graph_reg/graph_reg.htm#LINETYPE.
Part of the optimisation we make is to only copy into the underlying structures the exact number of coordinates, normals etc that are needed. To know this number, we need to know how many coordinates exist before attempting to set anything else. When constructing, or updating, geometry, you should always make sure that you first set the vertex list, then the sizing information for the strip or fan counts, and then set normals as needed.
Field Summary | |
static short |
PATTERN_CENTER_LINE
Predefined line pattern that uses alternating long and short dashes where the beginning and end always end in a long segment. |
static short |
PATTERN_CHAIN_LINE
Predefined line pattern that uses alternating long and short dashes. |
static short |
PATTERN_DASH
Predefined line pattern that is a dashed line. |
static short |
PATTERN_DASH_DOT
Predefined line pattern that is a dash-dot line. |
static short |
PATTERN_DASH_DOT_DOT
Predefined line pattern that is a dash-dot line. |
static short |
PATTERN_DOT
Predefined line pattern that is a dotted line. |
static short |
PATTERN_PHANTOM_LINE
Predefined line pattern that is a long dash, short dash, short dash line with evenly space dashes and the beginning and the end of a line always ending in a dash of the same length. |
static short |
PATTERN_SOLID
Predefined line pattern that is the normal solid line. |
static short |
PATTERN_STITCH_LINE
Predefined line pattern that is equal sized dash and space. |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
lastParent, liveCount, parentList |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG |
Constructor Summary | |
LineAttributes()
Constructs a attribute set with default values. |
Method Summary | |
int |
compareTo(LineAttributes la)
Compares this object with the specified object for order. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
equals(LineAttributes la)
Compares this object with the specified object to check for equivalence. |
boolean |
equals(java.lang.Object o)
Compare this object for equality to the given object. |
float |
getLineWidth()
Get the current line size in use. |
short |
getStipplePattern()
Get the current line stipple pattern. |
int |
getStippleScaleFactor()
Get the current line stipple pattern. |
boolean |
isAntiAliased()
Check the state of the antialiased flag setting for this geometry. |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Restore all openGL state to the given drawable. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Issue ogl commands needed for this component |
void |
setAntiAliased(boolean state)
Set the antialiased flag state. |
void |
setLineWidth(float size)
Set the size in pixels of the line size. |
void |
setStipplePattern(short pattern)
Set the stipple pattern to be used on the line. |
void |
setStippleScaleFactor(int scale)
Set the scale to be applied to the pattern. |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
addParent, getParents, hasChanged, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short PATTERN_SOLID
public static final short PATTERN_DASH
public static final short PATTERN_DOT
public static final short PATTERN_DASH_DOT
public static final short PATTERN_DASH_DOT_DOT
public static final short PATTERN_STITCH_LINE
public static final short PATTERN_CHAIN_LINE
public static final short PATTERN_CENTER_LINE
public static final short PATTERN_PHANTOM_LINE
Constructor Detail |
public LineAttributes()
Method Detail |
public void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
render
in interface RenderableObject
gl
- The gl context to draw withglu
- The utility context to draw withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
postRender
in interface RenderableObject
gl
- The gl context to draw withglu
- The utility context to draw withpublic int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- The objec to be compared
java.lang.ClassCastException
- The specified object's type prevents it from
being compared to this Objectpublic boolean equals(java.lang.Object o)
o
- The object to be compared
public void setAntiAliased(boolean state) throws InvalidWriteTimingException
state
- True to use antialiasing, false to turn it off
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic boolean isAntiAliased()
public void setLineWidth(float size) throws InvalidWriteTimingException
size
- The size of the line in pixels
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback method
java.lang.IllegalArgumentException
- Line size was non-positivepublic float getLineWidth()
public void setStipplePattern(short pattern) throws InvalidWriteTimingException
pattern
- The bit pattern used to draw the line
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic short getStipplePattern()
public void setStippleScaleFactor(int scale) throws InvalidWriteTimingException
scale
- The scale factor to apply to the pattern
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic int getStippleScaleFactor()
public int compareTo(LineAttributes la)
la
- The attributes instance to be comlared
public boolean equals(LineAttributes la)
la
- The attributes instance to be compared
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |