#ifndef MESH_H #define MESH_H #include #include #include #include #include #include "point3d.h" #include "vector3d.h" using namespace std; class Mesh { public: Mesh(); Mesh(string fname); Mesh(const Mesh& m); ~Mesh(); Mesh& operator=(const Mesh& m); void readMesh(string fname); void writeMesh(string fname); void createMesh(Point3D (*f)(double, double), Vector3D(*dfds)(double, double), Vector3D (*dfdt)(double, double), double smin, double smax, double tmin, double tmax, int nS, int nT); void drawMesh(int mode = GL_FILL, bool normals = true); bool isEmpty(); void makeEmpty(); void translate(float dx, float dy, float dz); void rotate(float angle, float ux, float uy, float yz); void scale(float sx, float sy, float sz); private: void copy(const Mesh& m); private: int numS; int numT; int numVerts; int numNorms; Point3D* pt; Vector3D* norm; }; #endif