home *** CD-ROM | disk | FTP | other *** search
- // Threed: Three dimentional viewer.
-
- #ifndef THREEDH
- #define THREEDH
-
- #include "vector.h"
- #include "array.h"
-
- #define EM_FILEOPENERROR -100
- #define EM_FILETOOBIG -101
- #define NUMCONNECTIONS 65535
- #define NUMVERTICES 65535
-
- #define VL 0
- #define VR 2000
- #define VT 0
- #define VB 2000
-
-
- // Three dimentional viewing class
- class TThreeD {
- public:
- double A, B, C, D, DVal;
- VECTOR From, At, Up;
- double Angle;
- VECTOR A1, A2, A3;
- ARRAY<WORD> Connect;
- ARRAY<VECTOR> Points;
- int Vl, Vt, Vr, Vb;
- WORD Length;
- WORD Vertices;
- double ObjMinx,ObjMaxx;
- double ObjMiny,ObjMaxy;
- double ObjMinz,ObjMaxz;
-
- double Offsx, Offsy, Offsz;
-
- VECTOR Dist; // the FROM->AT vector
-
- TThreeD();
- void Display(HDC DC, RECT& rect);
- virtual int Get3dObject();
- virtual int Read3DObject(char* filename);
- void MinMax();
- void WORLDtoPC(double xw,double yw, POINT& pc);
- int Code(double x, double y, double z);
- void SetAt();
- virtual void SetFrom();
- void SetEye();
- virtual void View(HDC DC);
- void TransformSeg(HDC DC, VECTOR& v1, VECTOR& v2,
- POINT& pc1, POINT& pc2);
- virtual void Clip3D(HDC DC, double x1, double y1, double z1,
- double x2, double y2, double z2, POINT& pc1, POINT& pc2);
- };
-
- #endif THREEDH