This is Vertex.h in view mode; [Download] [Up]
// convert lines from a Diagram document into sinusoids.
//
// Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu>
// Creation Date: Wed Jun 25 15:33:07 GMT-0800 1997
// Last Modified: Mon Jun 30 09:44:52 GMT-0800 1997
// Filename: .../sig/examples/line2sine/Vertex.h
// Syntax: C++
// $Smake: cc -Wall -g -c %b.cc -I../../include && rm -f %b.o
//
#ifndef _VERTEX_H_INCLUDED
#define _VERTEX_H_INCLUDED
#include "Collection.h"
class doubleXY {
public:
double x;
double y;
doubleXY(double a = 0, double b = 0) { x = a; y = b; };
};
class Vertex {
public:
int tag;
double x;
double y;
Vertex(int a = -1, double b = 0, double c = 0) { tag = a; x = b; y = c; }
};
class Vertices {
public:
Vertices (void);
void add (Vertex aVertex);
void add (int aTag, double xValue, double yValue);
void add (int aTag, doubleXY coords);
doubleXY get (int aTag);
void print (void);
void sort (void);
protected:
Collection<Vertex> vertices; // stored vertices
int sortedQ; // true if sorted, false otherwise
};
int vertexComp(const void* v1, const void* v2);
#endif _VERTEX_H_INCLUDED
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.