View3D.h
上传用户:whjcdz88
上传日期:2011-09-07
资源大小:121k
文件大小:1k
源码类别:

图形图象

开发平台:

WINDOWS

  1. #include <windows.h>
  2. #include <math.h>
  3. #include "resource.h"
  4. struct Vector
  5. {
  6. float x , y , z ;
  7. };
  8. struct point
  9. {
  10. float x ,y , z ; 
  11. };
  12. struct Point
  13. {
  14. point wc; // in the world;
  15. point vc ; // in the view
  16. point pc; // in the project
  17. };
  18. struct Line
  19. {
  20. short int p[2];
  21. int flag;
  22. };
  23. struct Surface
  24. {
  25. short int L[4];
  26. };
  27. extern Surface s[6] ;
  28. extern Line L[12] ;
  29. extern Point p[8] ;
  30. extern Point Mid;
  31. void Init( );
  32. void Clear( int lnum );
  33. void CalWc2Vc( Vector N , Vector V );
  34. point Wc2Vc( point P );
  35. point Vc2Pc( point pp , point p );
  36. void IsVisible( Surface s );
  37. void Adjust( int pnum , int cx , int cy );
  38. point Rotate3D( point p);
  39. void CalRotation( point p1 , point p2 , int degree);