Commit 995544f1 authored by Edward Vigmond's avatar Edward Vigmond
Browse files

Changed Polygon to PolyGon to avoid name conflict under Cygwin.

parent a2d6b0eb
......@@ -4,6 +4,8 @@
*/
#include "DrawingObjects.h"
#define USE_QUADRIC_OBJS
/** draw many Points
*
* \param p0 first connection of region
......@@ -16,6 +18,7 @@ void Connection::draw( int p0, int p1, GLfloat *colour, Colourscale* cs,
DATA_TYPE* data, int stride, dataOpac* dataopac )
{
if( p0>=_n || p1>=_n ) return;
glBegin(GL_LINES);
for( int i=p0; i<=p1; i+=stride ) {
if( !_pt->vis(_node[i*2]) || !_pt->vis(_node[i*2+1]) )
......
......@@ -283,7 +283,7 @@ VolElement::planecut( char *pd, GLfloat* cp,
if( num_int==3 )
se = new Triangle( pt );
else
se = new Polygon( pt, num_int );
se = new PolyGon( pt, num_int );
int nl[num_int];
for( int i=0; i<num_int; i++ ) nl[i]=i;
se->add( nl );
......
......@@ -115,9 +115,9 @@ class SurfaceElement : public MultiPoint {
GLfloat* _ptnrml;
};
class Polygon : public SurfaceElement {
class PolyGon : public SurfaceElement {
public:
Polygon( Point *p, int n ):SurfaceElement(p,n) {}
PolyGon( Point *p, int n ):SurfaceElement(p,n) {}
virtual void compute_normals( int a, int b );
virtual void draw( int, GLfloat*, float size=1 );
virtual void draw( int, int, GLfloat*, Colourscale*, DATA_TYPE*,
......
......@@ -4,7 +4,7 @@ HOSTMACHINE := $(shell uname)
FLTK_INC := $(shell fltk-config --use-gl --cxxflags)
FLTK_LD_FLAGS := $(shell fltk-config --use-gl --ldflags)
COMMON_LIBS = -lpng -lpthread -lm -lz
COMMON_INC = -I. -g -pg -DOBJ_CLASS
COMMON_INC = -I. -g -DOBJ_CLASS
ifeq ($(HOSTMACHINE),Linux)
LIBS = $(FLTK_LD_FLAGS) $(COMMON_LIBS)
......@@ -43,7 +43,7 @@ OBJS = Fl_Gl_Tb_Window.o\
Myslider.o\
MyValueInput.o\
Point.o\
Polygon.o\
PolyGon.o\
PNGwrite.o\
Prism.o\
Pyramid.o\
......
......@@ -10,7 +10,7 @@
* \param stride draw every n'th point
* \param dataopac data opacity
*/
void Polygon::draw( int p0, int p1, GLfloat *colour, Colourscale* cs,
void PolyGon::draw( int p0, int p1, GLfloat *colour, Colourscale* cs,
DATA_TYPE* data, int stride, dataOpac* dataopac )
{
draw( p0, p1, colour, cs, data, stride, dataopac, NULL );
......@@ -28,7 +28,7 @@ void Polygon::draw( int p0, int p1, GLfloat *colour, Colourscale* cs,
* \param dataopac data opacity
* \param ptnrml vertex normals (NULL for none)
*/
void Polygon::draw( int p0, int p1, GLfloat *colour, Colourscale* cs,
void PolyGon::draw( int p0, int p1, GLfloat *colour, Colourscale* cs,
DATA_TYPE* data, int stride, dataOpac* dataopac,
const GLfloat* ptnrml )
{
......@@ -76,7 +76,7 @@ void Polygon::draw( int p0, int p1, GLfloat *colour, Colourscale* cs,
* \param colour colour to use
* \param size size of element
*/
void Polygon :: draw( int e, GLfloat *colour, float size )
void PolyGon :: draw( int e, GLfloat *colour, float size )
{
if( e<_n ) {
......@@ -104,7 +104,7 @@ void Polygon :: draw( int e, GLfloat *colour, float size )
* \param e0 first element
* \param e1 last element
*/
void Polygon::compute_normals(int e0, int e1)
void PolyGon::compute_normals(int e0, int e1)
{
int e, n;
......
......@@ -419,9 +419,13 @@ T* ThreadedData<T>::slice( int tm )
}
// fill in the look ahead locations
for( int j=-READ_BEHIND; j<=READ_AHEAD; j++ ){
for( int j=READ_AHEAD; j>=-READ_BEHIND; j-- ){
int read_time = tm + j*incrementation;
int read_time;
if( j<0 )
read_time = tm + j*incrementation;
else
read_time = tm + ((READ_AHEAD)-j+1)*incrementation;
if( !j || read_time<0 || read_time>maxtm ) continue;
......@@ -473,7 +477,7 @@ void* ThreadedData<T>::ThreadCaller( void* _sthread )
template<class T>
void ThreadedData<T>::time_series( int offset, T* buffer )
{
while ( !maxmin->read ) {}
while ( !maxmin->read ) {nanosleep( &sleepwait, NULL);}
stmsr->unlock = offset;
stmsr->data = buffer;
sem_post( &stmsr->start );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment