⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 proj3d.h

📁 BCView - Bayes Classifier Visualization Download xbcview Linux executable (218 kb) wbcview.exe W
💻 H
字号:
/*----------------------------------------------------------------------  File    : proj3d.h  Contents: projection of 3D points to a 2D plane  Author  : Christian Borgelt  History : 19.10.2000 file created from file drawing.h            10.12.2000 function p3d_visib added            15.06.2001 complete redesign            09.07.2001 done some renaming for Windows (near/far)----------------------------------------------------------------------*/#ifndef __PROJ3D__#define __PROJ3D__/*----------------------------------------------------------------------  Preprocessor Definitions----------------------------------------------------------------------*/#define P3D_VIEW   0x01         /* rotate view */#define P3D_EYE    0x02         /* rotate eye  */#define P3D_BOTH   0x03         /* rotate both *//*----------------------------------------------------------------------  Type Definitions----------------------------------------------------------------------*/typedef struct {                /* --- view in 3D --- */  double eye[3];                /* eye (point to look from) */  double cx[3], cy[3], cz[3];   /* coordinate cross for view */  double dnear, dfar;           /* near/far plane of viewing frustrum */  double dpp;                   /* distance to projection plane */} VIEW3D;                       /* (view in 3D) */typedef struct {                /* --- 3D to 2D projection --- */  VIEW3D curr;                  /* current view */  VIEW3D save;                  /* saved view (p3d_save/p3d_restore) */} PROJ3D;                       /* (3D to 2D projection) *//*----------------------------------------------------------------------  Functions----------------------------------------------------------------------*/extern PROJ3D* p3d_create  (void);extern void    p3d_delete  (PROJ3D *p3d);extern void    p3d_eye     (PROJ3D *p3d, double x, double y, double z);extern void    p3d_view    (PROJ3D *p3d, double h, double p, double r);extern void    p3d_frust   (PROJ3D *p3d, double fov,                            double dnear, double dfar);extern void    p3d_save    (PROJ3D *p3d);extern void    p3d_restore (PROJ3D *p3d);extern void    p3d_move    (PROJ3D *p3d, double x, double y, double z);extern void    p3d_yaw     (PROJ3D *p3d, double phi, int mode);extern void    p3d_pitch   (PROJ3D *p3d, double phi, int mode);extern void    p3d_roll    (PROJ3D *p3d, double phi, int mode);extern int     p3d_proj    (PROJ3D *p3d, double x, double y, double z,                            double *px, double *py);extern int     p3d_visib   (PROJ3D *p3d, double x, double y, double z,                            double nx, double ny, double nz);/*----------------------------------------------------------------------  Preprocessor Definitions----------------------------------------------------------------------*/#define p3d_delete(p)      free(p)#define p3d_save(p)        ((p)->save = (p)->curr)#define p3d_restore(p)     ((p)->curr = (p)->save)#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -