gimp/plug-ins/map-object/arcball.h

51 lines
908 B
C
Raw Normal View History

#ifndef __ARCBALL_H__
#define __ARCBALL_H__
typedef struct
{
double x, y, z, w;
} Quat;
enum QuatPart
{
X,
Y,
Z,
W,
QuatLen
};
typedef Quat HVect;
typedef double HMatrix[QuatLen][QuatLen];
typedef enum AxisSet
{
NoAxes,
CameraAxes,
BodyAxes,
OtherAxes,
NSets
} AxisSet;
typedef double *ConstraintSet;
extern Quat qOne;
void ArcBall_Init (void);
void ArcBall_Place (HVect Center,
2011-02-20 22:23:22 +08:00
double Radius);
void ArcBall_UseSet (AxisSet axis_Set);
void ArcBall_Update (void);
void ArcBall_Value (HMatrix m_Now);
void ArcBall_Values (double *alpha,
2011-02-20 22:23:22 +08:00
double *beta,
double *gamma);
void ArcBall_BeginDrag (void);
void ArcBall_EndDrag (void);
void ArcBall_Mouse (HVect v_Now);
void ArcBall_CopyMat (HMatrix inm,
2011-02-20 22:23:22 +08:00
HMatrix outm);
#endif /* __ARCBALL_H__ */