edu.mines.jtk.sgl
Class PointState

java.lang.Object
  extended by edu.mines.jtk.sgl.PointState
All Implemented Interfaces:
State

public class PointState
extends java.lang.Object
implements State

OpenGL point state.

Version:
2005.05.31
Author:
Dave Hale, Colorado School of Mines

Constructor Summary
PointState()
          Constructs point state.
 
Method Summary
 void apply()
          Applies this OpenGL state.
 int getAttributeBits()
          Gets the OpenGL attribute bits for this state.
 float getSize()
          Gets the point size.
 boolean getSmooth()
          Gets the point smooth.
 boolean hasSize()
          Determines whether point size is set.
 boolean hasSmooth()
          Determines whether point smooth is set.
 void setSize(float size)
          Sets the point size.
 void setSmooth(boolean smooth)
          Sets the point smooth.
 void unsetSize()
          Unsets the point size.
 void unsetSmooth()
          Unsets the point smooth.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointState

public PointState()
Constructs point state.

Method Detail

hasSmooth

public boolean hasSmooth()
Determines whether point smooth is set.

Returns:
true, if set; false, otherwise.

getSmooth

public boolean getSmooth()
Gets the point smooth.

Returns:
the point smooth.

setSmooth

public void setSmooth(boolean smooth)
Sets the point smooth.

Parameters:
smooth - the smooth.

unsetSmooth

public void unsetSmooth()
Unsets the point smooth.


hasSize

public boolean hasSize()
Determines whether point size is set.

Returns:
true, if set; false, otherwise.

getSize

public float getSize()
Gets the point size.

Returns:
the point size.

setSize

public void setSize(float size)
Sets the point size.

Parameters:
size - the size.

unsetSize

public void unsetSize()
Unsets the point size.


apply

public void apply()
Description copied from interface: State
Applies this OpenGL state. This method makes OpenGL state consistent with any attribute fields in this state that are currently set.

Specified by:
apply in interface State

getAttributeBits

public int getAttributeBits()
Description copied from interface: State
Gets the OpenGL attribute bits for this state. These bits indicate what OpenGL state is changed by the method State.apply(). If these bits are passed to glPushAttrib before calling State.apply(), then glPopAttrib will restore any OpenGL state that is changed by that method.

Specified by:
getAttributeBits in interface State