「lmolvie(API)」の版間の差分
提供: Eospedia
| 行23: | 行23: | ||
== 構造体 == | == 構造体 == | ||
| + | === 入力・出力・コンフィグ === | ||
typedef struct molvieInfo { | typedef struct molvieInfo { | ||
long flagRedirect; | long flagRedirect; | ||
| 行43: | 行44: | ||
} molvieInfo; | } molvieInfo; | ||
| + | === カメラ設定 === | ||
typedef struct cameraInfo { | typedef struct cameraInfo { | ||
GLdouble Fovy; | GLdouble Fovy; | ||
| 行53: | 行55: | ||
} cameraInfo; | } cameraInfo; | ||
| + | === 座標情報 === | ||
typedef struct Coord { | typedef struct Coord { | ||
GLfloat x; | GLfloat x; | ||
| 行69: | 行72: | ||
extern void lmolvieReshapeNormal(int width, int height); | extern void lmolvieReshapeNormal(int width, int height); | ||
| − | |||
extern void lmolvieMouse(int button, int state, int x, int y); | extern void lmolvieMouse(int button, int state, int x, int y); | ||
extern void lmolvieMouseMotion(int x, int y); | extern void lmolvieMouseMotion(int x, int y); | ||
| 行94: | 行96: | ||
extern operationMode operationModeGet(void); | extern operationMode operationModeGet(void); | ||
extern void operationModeSet(operationMode); | extern void operationModeSet(operationMode); | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
extern void lmolvieLightSet(void); | extern void lmolvieLightSet(void); | ||
| 行154: | 行142: | ||
extern void lmolvieTest(void); | extern void lmolvieTest(void); | ||
extern GLboolean myDisplayListMakeAtom(void); | extern GLboolean myDisplayListMakeAtom(void); | ||
| + | |||
| + | ===カメラ設定=== | ||
| + | extern void myCameraRotateX(GLdouble angle); | ||
| + | extern void myCameraRotateY(GLdouble angle); | ||
| + | extern void myCameraRotateZ(GLdouble angle); | ||
| + | extern void myCameraEyeRotateX(GLdouble angle); | ||
| + | extern void myCameraEyeRotateY(GLdouble angle); | ||
| + | extern void myCameraTranslateX(GLdouble pan); | ||
| + | extern void myCameraTranslateY(GLdouble pan); | ||
| + | extern void myCameraTranslateZ(GLdouble pan); | ||
| + | |||
| + | extern void resetMyCamera(); | ||
| + | extern cameraInfo* getMyCamera(void); | ||
| + | extern void upCalc(); | ||
| + | |||
| + | ==== 移動 ==== | ||
| + | カメラ位置を移動します。 | ||
| + | extern void moveMyCamera(double movedistance); | ||
| + | movedistanceにより移動方向を選択できます。<br> | ||
| + | <table border=1> | ||
| + | <tr> | ||
| + | <th>movedistance</th> | ||
| + | <th>移動方向</th> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>1.0</td> | ||
| + | <td>中心に近づく</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>それ以外</td> | ||
| + | <td>中心から離れる</td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | <br> | ||
extern void setDriveMyCamera(); | extern void setDriveMyCamera(); | ||
extern void resetDriveMyCamera(); | extern void resetDriveMyCamera(); | ||
extern void setCameraCentreTag(int tag); | extern void setCameraCentreTag(int tag); | ||
2015年3月18日 (水) 07:58時点における版
DataExpress/eosOpenGL/src/lmolvieはAPI です。
目次
定数
typedef enum displayMode{
none=0,
atom=1,
stick=2,
serial=3,
residue=4,
temp=5,
sticktemp=6,
stickresidue=7
}displayMode;
typedef enum operationMode {
normal=0,
drive=1,
parallel=2,
surface=3,
multi=4,
coaster=5
} operationMode;
構造体
入力・出力・コンフィグ
typedef struct molvieInfo {
long flagRedirect;
long flagIn;
char* In;
FILE* fptIn;
long flagOut;
char* Out;
FILE* fptOut;
long flagconfigFile;
char* configFile;
FILE* fptconfigFile;
long flagmode;
long mode;
} molvieInfo;
カメラ設定
typedef struct cameraInfo {
GLdouble Fovy;
GLdouble Aspect;
GLdouble ClipNear;
GLdouble ClipFar;
GLdouble Eye[3];
GLdouble Centre[3];
GLdouble Up[3];
} cameraInfo;
座標情報
typedef struct Coord {
GLfloat x;
GLfloat y;
GLfloat z;
} Coord;
API
extern void lmolviePDBread(FILE* fptIn); extern pdbFile* get_pdb(void); extern void lmolvieInitNormal(void); extern void lmolvieIdleTest(void); extern void lmolvieIdleNormal(void); extern void lmolvieDisplayTest(void); extern void lmolvieDisplayNormal(void);
extern void lmolvieReshapeNormal(int width, int height); extern void lmolvieMouse(int button, int state, int x, int y); extern void lmolvieMouseMotion(int x, int y); extern void lmolvieMousePassiveMotion(int x, int y); extern void lmolvieMouseDrive(int button, int state, int x, int y); extern void lmolvieMouseMotionDrive(int x, int y); extern void lmolvieMousePassiveMotionDrive(int x, int y); extern void lmolvieMouseParallel(int button, int state, int x, int y); extern void lmolvieMouseMotionParallel(int x, int y); extern void lmolvieMousePassiveMotionParallel(int x, int y); extern void lmolvieMouseMulti(int button, int state, int x, int y); extern void lmolvieMouseMotionMulti(int x, int y); extern void lmolvieMousePassiveMotionMulti(int x, int y); extern void lmolvieKeyboard(unsigned char pushkey, int x, int y); extern void lmolvieKeyboardNormal(unsigned char pushkey, int x, int y); extern void lmolvieKeyboardDrive(unsigned char pushkey, int x, int y); extern void lmolvieKeyboardParallel(unsigned char pushkey, int x, int y); extern void lmolvieKeyboardSurface(unsigned char pushkey, int x, int y);
extern void lmolvieInitParallel(void); extern void lmolvieDisplayParallel(void); extern void lmolvieReshapeParallel(int width, int height);
extern operationMode operationModeGet(void); extern void operationModeSet(operationMode);
extern void lmolvieLightSet(void); extern GLfloat* get_LightPos(int index);
extern void monoSound(float amplitude, float Hz); extern void lmolvieVoice(void);
extern void drawContour(contourLinesSet* contour);
extern void scaleBarSwitch();
molvieViewer
extern void lmolvieViewerIdle(void); extern void lmolvieViewerKeyboard(unsigned char pushkey, int x, int y); extern void lmolvieViewerSpecial(int pushkey, int x, int y); extern void lmolvieViewerMouse(int button, int state, int x, int y); extern void lmolvieViewerMouseMotion(int x, int y); extern void lmolvieViewerMousePassiveMotion(int x, int y); extern void lmolvieViewerDisplay(void);
molvieMrcViewer
extern void lmolvieMrcViewerKeyboard(unsigned char pushkey, int x, int y); extern void lmolvieMrcViewerMouse(int button, int state, int x, int y); extern void lmolvieMrcViewerMouseMotion(int x, int y); extern void lmolvieMrcViewerMousePassiveMotion(int x, int y); extern void lmolvieMrcViewerDisplay(void);
molvieProjection
extern void lmolvieProjectionKeyboard(unsigned char pushkey, int x, int y); extern void lmolvieProjectionMouse(int button, int state, int x, int y); extern void lmolvieProjectionMouseMotion(int x, int y); extern void lmolvieProjectionMousePassiveMotion(int x, int y);
molvieDock
extern void lmolvieDockKeyboard(unsigned char pushkey, int x, int y); extern void displayMultiPDB1(); extern void lmolvieDockDisplay(void);
molvieFlight
extern void lmolvieFlightKeyboard(unsigned char pushkey, int x, int y); extern void lmolvieFlightDisplay(void); extern void lmolvieFlightIdle(void);
molvieTest
extern void lmolvieTest(void); extern GLboolean myDisplayListMakeAtom(void);
カメラ設定
extern void myCameraRotateX(GLdouble angle); extern void myCameraRotateY(GLdouble angle); extern void myCameraRotateZ(GLdouble angle); extern void myCameraEyeRotateX(GLdouble angle); extern void myCameraEyeRotateY(GLdouble angle); extern void myCameraTranslateX(GLdouble pan); extern void myCameraTranslateY(GLdouble pan); extern void myCameraTranslateZ(GLdouble pan);
extern void resetMyCamera(); extern cameraInfo* getMyCamera(void); extern void upCalc();
移動
カメラ位置を移動します。
extern void moveMyCamera(double movedistance);
movedistanceにより移動方向を選択できます。
| movedistance | 移動方向 |
|---|---|
| 1.0 | 中心に近づく |
| それ以外 | 中心から離れる |
extern void setDriveMyCamera(); extern void resetDriveMyCamera(); extern void setCameraCentreTag(int tag);