]> granicus.if.org Git - postgis/commitdiff
apply astyle
authorRegina Obe <lr@pcorp.us>
Fri, 13 May 2011 08:46:38 +0000 (08:46 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 13 May 2011 08:46:38 +0000 (08:46 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7143 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwout_x3d.c

index 9d3814e5f67c1205259ba6587678f0c130cb622c..f5598e1348534dabf7f82eabe2f30f392fa15417 100644 (file)
@@ -4,7 +4,7 @@
  * PostGIS - Spatial Types for PostgreSQL\r
  * http://www.postgis.org\r
  * adapted from lwout_asgml.c\r
- * Copyright 2011 Arrival 3D \r
+ * Copyright 2011 Arrival 3D\r
  *                             Regina Obe with input from Dave Arendash\r
  *\r
  * This is free software; you can redistribute and/or modify it under\r
@@ -46,7 +46,7 @@ static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision);
 \r
 /* takes a GEOMETRY and returns an X3D representation */\r
 extern char *\r
-       lwgeom_to_x3d3(const LWGEOM *geom, char *srs, int precision, int opts, const char *defid)\r
+lwgeom_to_x3d3(const LWGEOM *geom, char *srs, int precision, int opts, const char *defid)\r
 {\r
        int type = geom->type;\r
 \r
@@ -60,7 +60,7 @@ extern char *
 \r
        case POLYGONTYPE:\r
                /** We might change this later, but putting a polygon in an indexed face set\r
-               * seems like the simplest way to go so treat just like a mulitpolygon \r
+               * seems like the simplest way to go so treat just like a mulitpolygon\r
                */\r
                return asx3d3_multi((LWCOLLECTION*)lwgeom_as_multi(geom), srs, precision, opts, defid);\r
 \r
@@ -142,8 +142,8 @@ asx3d3_line_size(const LWLINE *line, char *srs, int precision, int opts, const c
        size = pointArray_X3Dsize(line->points, precision)*2;\r
 \r
        size += (\r
-                               sizeof("<LineSet vertexCount=''><Coordinate point='' /></LineSet>")  + defidlen\r
-                       ) * 2;\r
+                   sizeof("<LineSet vertexCount=''><Coordinate point='' /></LineSet>")  + defidlen\r
+               ) * 2;\r
 \r
        //if (srs)     size += strlen(srs) + sizeof(" srsName=..");\r
        return size;\r
@@ -199,7 +199,7 @@ asx3d3_mline_coordindex(const LWMLINE *mgeom, char *output)
                pa = geom->points;\r
                np = pa->npoints;\r
                si = j; //start index of first point of linestring\r
-               for(k=0; k < np ; k++)\r
+               for (k=0; k < np ; k++)\r
                {\r
                        if (k)\r
                        {\r
@@ -227,7 +227,7 @@ asx3d3_mline_coordindex(const LWMLINE *mgeom, char *output)
 }\r
 \r
 /* Calculate the coordIndex property of the IndexedLineSet for a multipolygon\r
-    This is not ideal -- would be really nice to just share this function with psurf, \r
+    This is not ideal -- would be really nice to just share this function with psurf,\r
     but I'm not smart enough to do that yet*/\r
 static size_t\r
 asx3d3_mpoly_coordindex(const LWMPOLY *psur, char *output)\r
@@ -240,9 +240,10 @@ asx3d3_mpoly_coordindex(const LWMPOLY *psur, char *output)
        for (i=0; i<psur->ngeoms; i++)\r
        {\r
                patch = (LWPOLY *) psur->geoms[i];\r
-               for (l=0; l < patch->nrings; l++){\r
+               for (l=0; l < patch->nrings; l++)\r
+               {\r
                        np = patch->rings[l]->npoints - 1;\r
-                       for(k=0; k < np ; k++)\r
+                       for (k=0; k < np ; k++)\r
                        {\r
                                if (k)\r
                                {\r
@@ -253,15 +254,15 @@ asx3d3_mpoly_coordindex(const LWMPOLY *psur, char *output)
                        j += k;\r
                        if (l < (patch->nrings - 1) )\r
                        {\r
-                           /** @todo TODO: Decide the best way to render holes\r
-                           *  Evidentally according to my X3D expert the X3D consortium doesn't really \r
-                           *  support holes and it's an issue of argument among many that feel it should. He thinks CAD x3d extensions to spec might.\r
-                           *  What he has done and others developing X3D exports to simulate a hole is to cut around it.\r
-                           *  So if you have a donut, you would cut it into half and have 2 solid polygons.  Not really sure the best way to handle this.\r
-                           *  For now will leave it as polygons stacked on top of each other -- which is what we are doing here and perhaps an option\r
-                           *  to color differently.  It's not ideal but the alternative sounds complicated.\r
-                           **/\r
-                               ptr += sprintf(ptr, " -1 "); //separator for each inner ring. Ideally we should probably triangulate and cut around as others do \r
+                               /** @todo TODO: Decide the best way to render holes\r
+                               *  Evidentally according to my X3D expert the X3D consortium doesn't really\r
+                               *  support holes and it's an issue of argument among many that feel it should. He thinks CAD x3d extensions to spec might.\r
+                               *  What he has done and others developing X3D exports to simulate a hole is to cut around it.\r
+                               *  So if you have a donut, you would cut it into half and have 2 solid polygons.  Not really sure the best way to handle this.\r
+                               *  For now will leave it as polygons stacked on top of each other -- which is what we are doing here and perhaps an option\r
+                               *  to color differently.  It's not ideal but the alternative sounds complicated.\r
+                               **/\r
+                               ptr += sprintf(ptr, " -1 "); //separator for each inner ring. Ideally we should probably triangulate and cut around as others do\r
                        }\r
                }\r
                if (i < (psur->ngeoms - 1) )\r
@@ -517,7 +518,7 @@ asx3d3_psurface_buf(const LWPSURFACE *psur, char *srs, char *output, int precisi
        {\r
                patch = (LWPOLY *) psur->geoms[i];\r
                np = patch->rings[0]->npoints - 1;\r
-               for(k=0; k < np ; k++)\r
+               for (k=0; k < np ; k++)\r
                {\r
                        if (k)\r
                        {\r
@@ -616,7 +617,7 @@ asx3d3_tin_buf(const LWTIN *tin, char *srs, char *output, int precision, int opt
        for (i=0; i<tin->ngeoms; i++)\r
        {\r
                ptr += asx3d3_triangle_buf(tin->geoms[i], 0, ptr, precision,\r
-                                                                  opts, defid);\r
+                                          opts, defid);\r
                if (i < (tin->ngeoms - 1) )\r
                {\r
                        ptr += sprintf(ptr, " ");\r
@@ -845,7 +846,7 @@ pointArray_X3Dsize(POINTARRAY *pa, int precision)
 {\r
        if (FLAGS_NDIMS(pa->flags) == 2)\r
                return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" "))\r
-                          * 2 * pa->npoints;\r
+                      * 2 * pa->npoints;\r
 \r
        return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" ")) * 3 * pa->npoints;\r
 }
\ No newline at end of file