From 5c1676dfe6d2f3c837a5e074117b45613fd29a72 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:30:19 +0200 Subject: Adding upstream version 2.10.34. Signed-off-by: Daniel Baumann --- plug-ins/map-object/arcball.h | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 plug-ins/map-object/arcball.h (limited to 'plug-ins/map-object/arcball.h') diff --git a/plug-ins/map-object/arcball.h b/plug-ins/map-object/arcball.h new file mode 100644 index 0000000..f0b56ce --- /dev/null +++ b/plug-ins/map-object/arcball.h @@ -0,0 +1,50 @@ +#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, + double Radius); +void ArcBall_UseSet (AxisSet axis_Set); +void ArcBall_Update (void); +void ArcBall_Value (HMatrix m_Now); +void ArcBall_Values (double *alpha, + double *beta, + double *gamma); +void ArcBall_BeginDrag (void); +void ArcBall_EndDrag (void); +void ArcBall_Mouse (HVect v_Now); +void ArcBall_CopyMat (HMatrix inm, + HMatrix outm); + +#endif /* __ARCBALL_H__ */ -- cgit v1.2.3