igeo.gui
Class IGLElement

java.lang.Object
  extended by igeo.gui.IGLElement
Direct Known Subclasses:
IGLLineLoop, IGLLineStrip, IGLPolygon, IGLQuadMatrix, IGLQuadStrip, IGLTriangles

public abstract class IGLElement
extends java.lang.Object

Base class of OpenGL graphic vertex data collection

Author:
Satoru Sugihara

Field Summary
 IVec[] normal
           
 IVec[] pts
           
 java.util.ArrayList<IVec> tmpNormal
           
 java.util.ArrayList<IVec> tmpPts
           
 
Constructor Summary
IGLElement()
           
IGLElement(int size)
           
IGLElement(IVec[] pts)
           
IGLElement(IVec[] pts, IVec[] nrm)
           
 
Method Summary
 void addPoint(IVec p)
          addPoint(IVec p) and addPoint(IVec p, IVec n) cannot be used together.
 void addPoint(IVec p, IVec n)
           
abstract  void draw(GL2 gl)
           
 void drawPoints(GL2 gl)
           
 void finalizePoint()
           
 int getNum()
           
 int num()
           
 void setNormal(int i, IVec n)
           
 void setNormal(IVec[] n)
           
 void setNormalNum(int len)
           
 void setPoint(int i, IVec pt)
           
 void setPoint(IVec[] pts)
           
 void setPointNum(int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pts

public IVec[] pts

normal

public IVec[] normal

tmpPts

public java.util.ArrayList<IVec> tmpPts

tmpNormal

public java.util.ArrayList<IVec> tmpNormal
Constructor Detail

IGLElement

public IGLElement()

IGLElement

public IGLElement(int size)

IGLElement

public IGLElement(IVec[] pts)

IGLElement

public IGLElement(IVec[] pts,
                  IVec[] nrm)
Method Detail

setPoint

public void setPoint(IVec[] pts)

setNormal

public void setNormal(IVec[] n)

setPointNum

public void setPointNum(int len)

setNormalNum

public void setNormalNum(int len)

setPoint

public void setPoint(int i,
                     IVec pt)

setNormal

public void setNormal(int i,
                      IVec n)

getNum

public int getNum()

num

public int num()

addPoint

public void addPoint(IVec p)
addPoint(IVec p) and addPoint(IVec p, IVec n) cannot be used together. points needs to be set in either of them consistently. Or the number of normal doesn't match with points.


addPoint

public void addPoint(IVec p,
                     IVec n)

finalizePoint

public void finalizePoint()

drawPoints

public void drawPoints(GL2 gl)

draw

public abstract void draw(GL2 gl)