]> granicus.if.org Git - graphviz/commitdiff
Fix warning; make sure static functions defined in arcball.h are available.
authorerg <devnull@localhost>
Thu, 8 Oct 2009 21:11:53 +0000 (21:11 +0000)
committererg <devnull@localhost>
Thu, 8 Oct 2009 21:11:53 +0000 (21:11 +0000)
cmd/smyrna/arcball.c
cmd/smyrna/arcball.h

index 8f6a927fd74c7891c30934a888082256e23f551c..d37e2a7f15b8ecf7d3f8e80ede5b946a5bb351f6 100644 (file)
@@ -1,15 +1,9 @@
 
 #include "glcompdefs.h"
+#define ARCBALL_C
 #include "arcball.h"
 #include "smyrnadefs.h"
 
-
-
-
-
-
-
-
 void setBounds(ArcBall_t* a,GLfloat NewWidth, GLfloat NewHeight)
 {
        assert((NewWidth > 1.0f) && (NewHeight > 1.0f));
@@ -66,24 +60,22 @@ void _mapToSphere(ArcBall_t* a,const Point2fT* NewPt, Vector3fT* NewVec)
     }
 }
 
-//Create/Destroy
-void init_arcBall(ArcBall_t* a,GLfloat NewWidth, GLfloat NewHeight)
-{
-
-       Matrix4fT   Transform   = {  1.0f,  0.0f,  0.0f,  0.0f,                         // NEW: Final Transform
+static Matrix4fT Transform   = {{  1.0f,  0.0f,  0.0f,  0.0f,                          // NEW: Final Transform
                              0.0f,  1.0f,  0.0f,  0.0f,
                              0.0f,  0.0f,  1.0f,  0.0f,
-                             0.0f,  0.0f,  0.0f,  1.0f };
+                             0.0f,  0.0f,  0.0f,  1.0f }};
 
-       Matrix3fT   LastRot     = {  1.0f,  0.0f,  0.0f,                                        // NEW: Last Rotation
+static Matrix3fT   LastRot     = {{  1.0f,  0.0f,  0.0f,                                       // NEW: Last Rotation
                              0.0f,  1.0f,  0.0f,
-                             0.0f,  0.0f,  1.0f };
+                             0.0f,  0.0f,  1.0f }};
 
-       Matrix3fT   ThisRot     = {  1.0f,  0.0f,  0.0f,                                        // NEW: This Rotation
+static Matrix3fT   ThisRot     = {{  1.0f,  0.0f,  0.0f,                                       // NEW: This Rotation
                              0.0f,  1.0f,  0.0f,
-                             0.0f,  0.0f,  1.0f };
-       
-       
+                             0.0f,  0.0f,  1.0f }};
+
+//Create/Destroy
+void init_arcBall(ArcBall_t* a,GLfloat NewWidth, GLfloat NewHeight)
+{
        a->Transform=Transform;
        a->LastRot=LastRot;
        a->ThisRot=ThisRot;
index 9ff5dcd9034958a8bcbcb21d5369f0c72c5c1b1c..b281808a2efb913c45f3900c4e748b83f2541354 100644 (file)
@@ -60,6 +60,7 @@
 
     typedef union Matrix3f_t
     {
+            GLfloat M[9];
             struct
             {
                 //column major
                 union { GLfloat M12; GLfloat ZY;             };  //ZAxis.Y
                 union { GLfloat M22; GLfloat ZZ; GLfloat SZ; };  //ZAxis.Z and Scale Z
             } s;
-            GLfloat M[9];
     } Matrix3fT;     //A single precision floating point 3 by 3 matrix. 
 
     typedef union Matrix4f_t
     {
+            GLfloat M[16];
             struct
             {
                 //column major
@@ -98,7 +99,6 @@
                 union { GLfloat M23; GLfloat TZ;             };  //Trans.Z
                 union { GLfloat M33; GLfloat TW; GLfloat SW; };  //Trans.W and Scale W
             } s;
-            GLfloat M[16];
     } Matrix4fT;     //A single precision floating point 4 by 4 matrix.