grinliz::LineLoop Class Reference

#include <glgeometry.h>

List of all members.


Detailed Description

A representation of a closed 2D polygon as a series of points. The "loop" is a true circular list - there are no nulls or sentinels. The next pointer is positive (counter-clock) and the prev pointer is negative (clock).


Public Member Functions

 LineLoop ()
 Construct an empty loop.
void Clear ()
 Clear the loop and free the memory for the lines.
void Delete (LineNode *del)
 Delete a point.
void AddAtEnd (LineNode *node)
void AddAfter (LineNode *me, LineNode *add)
 Add a pointer after the point specified.
LineNodeFirst ()
 Return the first point - null if empty.
const LineNodeFirst () const
 Return the first point - null if empty.
void SortToTop ()
void Bounds (grinliz::Rectangle2F *bounds)
 Compute the bounds of the loop.
void Render (float *surface, int width, int height, bool fill=false)


Member Function Documentation

void grinliz::LineLoop::AddAtEnd ( LineNode node  ) 

Add a point at the end of the loop. Normally a loop is created by:

		frustum2D.Clear();
		frustum2D.AddAtEnd( new LineNode( 0.0f, 0.0f ) );
		frustum2D.AddAtEnd( new LineNode( (float)(VERTEXSIZE-1), 0.0f ) );
		frustum2D.AddAtEnd( new LineNode( (float)(VERTEXSIZE-1), (float)(VERTEXSIZE-1) ) );
		frustum2D.AddAtEnd( new LineNode( 0.0f, (float)(VERTEXSIZE-1) ) );
		

void grinliz::LineLoop::SortToTop (  ) 

Sort so the positive direction will the left edge, and the negitive direction the right. First() will point to the first left edge.

void grinliz::LineLoop::Render ( float *  surface,
int  width,
int  height,
bool  fill = false 
)

Draw the lineloop to a floating point surface, using 'value' in the line node. Note that only fully included points will be drawn.


The documentation for this class was generated from the following file:
Generated on Fri Mar 23 19:36:25 2007 for Lilith3D by  doxygen 1.5.1-p1