Revision: 41315
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41315&view=rev
Author:   brlcad
Date:     2010-11-10 19:24:35 +0000 (Wed, 10 Nov 2010)

Log Message:
-----------
ws consistency cleanup

Modified Paths:
--------------
    brlcad/trunk/src/libdm/dm-rtgl.c

Modified: brlcad/trunk/src/libdm/dm-rtgl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-rtgl.c    2010-11-10 19:23:29 UTC (rev 41314)
+++ brlcad/trunk/src/libdm/dm-rtgl.c    2010-11-10 19:24:35 UTC (rev 41315)
@@ -61,14 +61,14 @@
 #include "dm_xvars.h"
 #include "solid.h"
 
-#define VIEWFACTOR      (1.0/(*dmp->dm_vp))
-#define VIEWSIZE        (2.0*(*dmp->dm_vp))
+#define VIEWFACTOR (1.0/(*dmp->dm_vp))
+#define VIEWSIZE (2.0*(*dmp->dm_vp))
 
 /* these are from /usr/include/gl.h could be device dependent */
-#define XMAXSCREEN     1279
-#define YMAXSCREEN     1023
-#define YSTEREO                491     /* subfield height, in scanlines */
-#define YOFFSET_LEFT   532     /* YSTEREO + YBLANK ? */
+#define XMAXSCREEN 1279
+#define YMAXSCREEN 1023
+#define YSTEREO 491    /* subfield height, in scanlines */
+#define YOFFSET_LEFT 532       /* YSTEREO + YBLANK ? */
 
 #define USE_VECTOR_THRESHHOLD 0
 #if USE_VECTOR_THRESHHOLD
@@ -87,7 +87,7 @@
 
 HIDDEN_DM_FUNCTION_PROTOTYPES(rtgl)
 
-struct dm dm_rtgl = {
+    struct dm dm_rtgl = {
     rtgl_close,
     rtgl_drawBegin,
     rtgl_drawEnd,
@@ -149,6 +149,7 @@
     0                          /* Tcl interpreter */
 };
 
+
 static fastf_t default_viewscale = 1000.0;
 static double xlim_view = 1.0; /* args for glOrtho*/
 static double ylim_view = 1.0;
@@ -178,6 +179,7 @@
     0
 };
 
+
 /* ray trace vars */
 struct application app;
 struct rt_i *rtip;
@@ -198,6 +200,7 @@
     }
 }
 
+
 void
 rtgl_fogHint(struct dm *dmp, int fastfog)
 {
@@ -205,6 +208,7 @@
     glHint(GL_FOG_HINT, fastfog ? GL_FASTEST : GL_NICEST);
 }
 
+
 /*
  * R T G L _ O P E N
  *
@@ -467,7 +471,7 @@
 
     /* IRIX 4.0.5 bug workaround */
     if (list == (XDeviceInfoPtr)NULL ||
-       list == (XDeviceInfoPtr)1)  goto Done;
+       list == (XDeviceInfoPtr)1) goto Done;
 
     for (j = 0; j < ndevices; ++j, list++) {
        if (list->use == IsXExtensionDevice) {
@@ -573,6 +577,7 @@
     return dmp;
 }
 
+
 /*
  */
 int
@@ -740,6 +745,7 @@
     return TCL_OK;
 }
 
+
 /*
  * O G L _ C L O S E
  *
@@ -878,6 +884,7 @@
     return TCL_OK;
 }
 
+
 /*
  * O G L _ D R A W E N D
  */
@@ -932,6 +939,7 @@
     return TCL_OK;
 }
 
+
 double startScale = 1;
 
 /*
@@ -1087,6 +1095,7 @@
     return TCL_OK;
 }
 
+
 /* convert color vector to unsigned char array */
 unsigned char* getColorKey(float *color) {
     int i, value;
@@ -1100,6 +1109,7 @@
     return key;
 }
 
+
 /* calculate and add hit-point info to info list */
 void addInfo(struct application *app, struct hit *hit, struct soltab *soltab, 
char flip, float *partColor) {
     point_t point;
@@ -1194,6 +1204,7 @@
     rtgljob.currItem->used += 3;
 }
 
+
 /* add all hit point info to info list */
 int recordHit(struct application *app, struct partition *partH, struct seg 
*segs)
 {
@@ -1222,11 +1233,13 @@
     return 1;
 }
 
+
 /* don't care about misses */
 int ignoreMiss(struct application *app) {
     return 0;
 }
 
+
 double jitter(double range) {
     if (rand() % 2)
        return fmod(rand(), range);
@@ -1234,6 +1247,7 @@
     return (-1 *(fmod(rand(), range)));
 }
 
+
 void randShots(fastf_t *center, fastf_t radius, int flag) {
     int i, j;
     vect_t view, dir;
@@ -1263,8 +1277,8 @@
            VADD2(pt, pt, jit);
 #endif
            VMOVE(app.a_ray.r_dir, pt);
-           
-           
+
+
            if (RT_BADVEC(app.a_ray.r_dir)) {
                VPRINT("bad dir:", app.a_ray.r_dir);
            }
@@ -1299,6 +1313,7 @@
     glEnable(GL_LIGHTING);
 }
 
+
 void swapItems(struct bu_list *a, struct bu_list *b) {
     struct bu_list temp;
 
@@ -1378,6 +1393,7 @@
     return &(rtgljob.currJob->jobs[index]);
 }
 
+
 /* Fisher-Yates shuffle */
 void shuffleJobs(void) {
     int i;
@@ -1395,6 +1411,7 @@
     }
 }
 
+
 /* add jobs for an even grid of parallel rays in a principle direction */
 void shootGrid(struct jobList *jobs, vect_t min, vect_t max, double maxSpan, 
int pixels, int uAxis, int vAxis, int iAxis) {
     int i, j;
@@ -1459,6 +1476,7 @@
     }
 }
 
+
 int numShot = 0;
 
 /* return 1 if all jobs done, 0 if not */
@@ -1513,6 +1531,7 @@
     return 1;
 }
 
+
 void drawPoints(float *view, int pointSize) {
     int i, used;
     float *point, *normal, dot;
@@ -1733,8 +1752,8 @@
        maxSpan = 0.0;
        numShot = rtgljob.numJobs = 0;
     }
- 
-    
+
+
     for (i = 0; i < numVisible; i++) {
         currTree = visibleTrees[i];
         new = 1;
@@ -1920,7 +1939,6 @@
 }
 
 
-
 /*
  * R T G L _ D R A W
  *
@@ -1930,21 +1948,21 @@
 {
     struct bn_vlist *vp;
     if (!callback_function) {
-         if (data) {
-             vp = (struct bn_vlist *)data;
-            rtgl_drawVList(dmp,vp);
-         }
-     } else {
-         if (!data) {
-             return TCL_ERROR;
-         } else {    
-             vp = callback_function(data);
-         }
-     }
-     return TCL_OK;
+       if (data) {
+           vp = (struct bn_vlist *)data;
+           rtgl_drawVList(dmp, vp);
+       }
+    } else {
+       if (!data) {
+           return TCL_ERROR;
+       } else {    
+           vp = callback_function(data);
+       }
+    }
+    return TCL_OK;
 }
-       
 
+
 /*
  * O G L _ N O R M A L
  *
@@ -1975,6 +1993,7 @@
     return TCL_OK;
 }
 
+
 /*
  * O G L _ D R A W S T R I N G 2 D
  *
@@ -2035,6 +2054,7 @@
     return TCL_OK;
 }
 
+
 /*
  * O G L _ D R A W L I N E 3 D
  *
@@ -2045,6 +2065,7 @@
     return TCL_OK;
 }
 
+
 /*
  * O G L _ D R A W L I N E S 3 D
  *
@@ -2055,6 +2076,7 @@
     return TCL_OK;
 }
 
+
 HIDDEN int
 rtgl_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y)
 {
@@ -2121,6 +2143,7 @@
     return TCL_OK;
 }
 
+
 HIDDEN int
 rtgl_setBGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned 
char b)
 {
@@ -2155,6 +2178,7 @@
     return TCL_OK;
 }
 
+
 HIDDEN int
 rtgl_setLineAttr(struct dm *dmp, int width, int style)
 {
@@ -2174,6 +2198,7 @@
     return TCL_OK;
 }
 
+
 /* ARGSUSED */
 HIDDEN int
 rtgl_debug(struct dm *dmp, int lvl)
@@ -2183,6 +2208,7 @@
     return TCL_OK;
 }
 
+
 HIDDEN int
 rtgl_setWinBounds(struct dm *dmp, int *w)
 {
@@ -2204,6 +2230,7 @@
     return TCL_OK;
 }
 
+
 #define RTGL_DO_STEREO 1
 /* currently, get a double buffered rgba visual that works with Tk and
  * OpenGL
@@ -2496,12 +2523,14 @@
     return TCL_OK;
 }
 
+
 HIDDEN int
 rtgl_configureWin(struct dm *dmp)
 {
     return rtgl_configureWin_guts(dmp, 0);
 }
 
+
 HIDDEN int
 rtgl_setLight(struct dm *dmp, int lighting_on)
 {
@@ -2538,6 +2567,7 @@
     return TCL_OK;
 }
 
+
 HIDDEN int
 rtgl_setTransparency(struct dm *dmp,
                     int transparency_on)
@@ -2567,6 +2597,7 @@
     return TCL_OK;
 }
 
+
 HIDDEN int
 rtgl_setDepthMask(struct dm *dmp,
                  int enable) {
@@ -2590,6 +2621,7 @@
     return TCL_OK;
 }
 
+
 HIDDEN int
 rtgl_setZBuffer(struct dm *dmp, int zbuffer_on)
 {
@@ -2621,6 +2653,7 @@
     return TCL_OK;
 }
 
+
 int
 rtgl_beginDList(struct dm *dmp, unsigned int list)
 {
@@ -2638,6 +2671,7 @@
     return TCL_OK;
 }
 
+
 int
 rtgl_endDList(struct dm *dmp)
 {
@@ -2648,6 +2682,7 @@
     return TCL_OK;
 }
 
+
 int
 rtgl_drawDList(struct dm *dmp, unsigned int list)
 {
@@ -2658,6 +2693,7 @@
     return TCL_OK;
 }
 
+
 int
 rtgl_freeDLists(struct dm *dmp, unsigned int list, int range)
 {
@@ -2675,6 +2711,7 @@
     return TCL_OK;
 }
 
+
 #endif /* DM_RTGL */
 
 /*


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to