View3D.h
上传用户:whjcdz88
上传日期:2011-09-07
资源大小:121k
文件大小:1k
- #include <windows.h>
- #include <math.h>
- #include "resource.h"
- struct Vector
- {
- float x , y , z ;
- };
- struct point
- {
- float x ,y , z ;
- };
- struct Point
- {
- point wc; // in the world;
- point vc ; // in the view
- point pc; // in the project
- };
- struct Line
- {
- short int p[2];
- int flag;
- };
- struct Surface
- {
- short int L[4];
- };
- extern Surface s[6] ;
- extern Line L[12] ;
- extern Point p[8] ;
- extern Point Mid;
- void Init( );
- void Clear( int lnum );
- void CalWc2Vc( Vector N , Vector V );
- point Wc2Vc( point P );
- point Vc2Pc( point pp , point p );
- void IsVisible( Surface s );
- void Adjust( int pnum , int cx , int cy );
- point Rotate3D( point p);
- void CalRotation( point p1 , point p2 , int degree);