Revision: 55812
          http://sourceforge.net/p/brlcad/code/55812
Author:   brlcad
Date:     2013-06-21 20:34:23 +0000 (Fri, 21 Jun 2013)
Log Message:
-----------
apply sf patch 172 (Moving LIBWBD comments) from Kesha Shah which moves 
comments from the implementation sources files to the public header.

Modified Paths:
--------------
    brlcad/trunk/include/wdb.h
    brlcad/trunk/src/libwdb/dynamic_geometry.c
    brlcad/trunk/src/libwdb/id.c
    brlcad/trunk/src/libwdb/reg.c
    brlcad/trunk/src/libwdb/submodel.c
    brlcad/trunk/src/libwdb/units.c
    brlcad/trunk/src/libwdb/vol.c

Modified: brlcad/trunk/include/wdb.h
===================================================================
--- brlcad/trunk/include/wdb.h  2013-06-21 13:36:29 UTC (rev 55811)
+++ brlcad/trunk/include/wdb.h  2013-06-21 20:34:23 UTC (rev 55812)
@@ -109,9 +109,43 @@
 #define WDB_METABALLPT_TYPE_LINE 0x1
 #define WDB_METABALLPT_NULL    ((struct wdb_metaballpt *)0)
 
+/**
+ *
+ * Make a database header (ID) record.
+ */
+WDB_EXPORT WDB_EXTERN(int mk_id, (struct rt_wdb *fp, const char *title) );
 
-WDB_EXPORT WDB_EXTERN(int mk_id, (struct rt_wdb *fp, const char *title) );
+/**
+ *
+ * Make a database header (ID) record, and note the user's preferred
+ * editing units (specified as a string).
+ *
+ * Returns -
+ * <0 error
+ * 0 success
+ */
 WDB_EXPORT WDB_EXTERN(int mk_id_units, (struct rt_wdb *fp, const char *title, 
const char *units) );
+
+
+/**
+ *
+ * Make a database header (ID) record, and note the user's preferred
+ * editing units (specified as a conversion factor).
+ *
+ * Note that the v4 database format offers only a limited number of
+ * choices for the preferred editing units.  If the user is editing in
+ * unusual units (like 2.5feet), don't fail to create the database
+ * header.
+ *
+ * In the v5 database, the conversion factor will be stored intact.
+ *
+ * Note that the database-layer header record will have already been
+ * written by db_create().  All we have to do here is update it.
+ *
+ * Returns -
+ * <0 error
+ * 0 success
+ */
 WDB_EXPORT int mk_id_editunits(
     struct rt_wdb *fp,
     const char *title,
@@ -749,10 +783,21 @@
 WDB_EXPORT WDB_EXTERN(int mk_ebm, (struct rt_wdb *fp, const char *name, const 
char *file,
                                   size_t xdim, size_t ydim, fastf_t tallness, 
const matp_t mat));
 
+/**
+ * M K _ V O L
+ */
 WDB_EXPORT WDB_EXTERN(int mk_vol, (struct rt_wdb *fp, const char *name, const 
char *file,
                                   size_t xdim, size_t ydim, size_t zdim, 
size_t lo, size_t hi,
                                   const vect_t cellsize, const matp_t mat));
 
+
+/**
+ *
+ * Create a submodel solid.  If file is NULL or "", the treetop refers
+ * to the current database.  Treetop is the name of a single database
+ * object in 'file'.  meth is 0 (RT_PART_NUBSPT) or 1
+ * (RT_PART_NUGRID).  method 0 is what is normally used.
+ */
 WDB_EXPORT WDB_EXTERN(int mk_submodel, (struct rt_wdb *fp, const char *name, 
const char *file,
                                        const char *treetop, int meth));
 
@@ -783,6 +828,19 @@
  *  First you build a list of nodes with mk_addmember,
  *  then you output the combination.
  */
+
+
+/**
+ *
+ * Obtain dynamic storage for a new wmember structure, fill in the
+ * name, default the operation and matrix, and add to doubly linked
+ * list.  In typical use, a one-line call is sufficient.  To change
+ * the defaults, catch the pointer that is returned, and adjust the
+ * structure to taste.
+ *
+ * The caller is responsible for initializing the header structures
+ * forward and backward links.
+ */
 WDB_EXPORT WDB_EXTERN (struct wmember *mk_addmember,
                       (const char      *name,
                        struct bu_list  *headp,
@@ -799,6 +857,19 @@
        mk_comb( fp, name, &((_headp)->l), region_flag, shadername, shaderargs, 
\
                rgb, id, air, material, los, inherit_flag, 0, 0 )
 
+
+/**
+ * Make a combination, where the members are described by a linked
+ * list of wmember structs.
+ *
+ * The linked list is freed when it has been output.
+ *
+ * Has many operating modes.
+ *
+ * Returns -
+ * -1 ERROR
+ * 0 OK
+ */
 WDB_EXPORT int mk_comb(
     struct rt_wdb      *wdbp,                  /**< database to write to */
     const char         *combname,              /**< name of the combination */
@@ -816,11 +887,22 @@
     int                        gift_semantics);        /**<  0 = pure, 1 = 
gift */
 
 /** Convenience routines for quickly making combinations */
+
+/**
+ *
+ * Convenience interface to make a combination with a single member.
+ */
 WDB_EXPORT int mk_comb1( struct rt_wdb *fp,
                         const char *combname,
                         const char *membname,
                         int regflag );
 
+
+/**
+ *
+ * Convenience routine to make a region with shader and rgb possibly
+ * set.
+ */
 WDB_EXPORT int mk_region1(
     struct rt_wdb *fp,
     const char *combname,
@@ -841,7 +923,27 @@
 /*
  *  Routines to establish conversion factors
  */
+
+ /**
+ *
+ * Given a string conversion value, find the appropriate factor, and
+ * establish it.
+ *
+ * Returns -
+ * -1 error
+ * 0 OK
+ */
 WDB_EXPORT WDB_EXTERN(int mk_conversion, (char *units_string) );
+
+
+/**
+ *
+ * Establish a new conversion factor for LIBWDB routines.
+ *
+ * Returns -
+ * -1 error
+ * 0 OK
+ */
 WDB_EXPORT WDB_EXTERN(int mk_set_conversion, (double val) );
 
 /**
@@ -859,6 +961,10 @@
 /*
  *  Internal routines
  */
+
+/**
+ * M K _ F R E E M E M B E R S
+ */
 WDB_EXPORT void mk_freemembers( struct bu_list *headp );
 
 #define mk_export_fwrite(wdbp, name, gp, id)   wdb_export(wdbp, name, gp, id, 
mk_conv2mm)
@@ -866,6 +972,39 @@
 /*
  *     Dynamic geometry routines
  */
+
+/**
+ * This routine is intended to be used to make a hole in some
+ * geometry.  The hole is described using the same parameters as an
+ * RCC, and the hole is represented as an RCC. The objects to be
+ * "holed" are passed in as a list of "struct directory" pointers. The
+ * objects pointed at by this list must be combinations. The "struct
+ * rt_wdb" pointer passed in indicates what model this hole should
+ * appear in.
+ *
+ * The end state after this routine runs is a modified model with a
+ * new RCC primitive having a name of the form "make_hole_X" (where X
+ * is some integer). The combinations specified in the list will be
+ * modified as follows:
+ *
+ *        before                          after
+ *      |                       -
+ *      |                          / \
+ *      |                         /   \
+ *  original combination tree                /     \
+ *                    original combination tree   make_hole_X
+ *
+ * The modified combination is written to the struct rt_wdb. Note that
+ * to do dynamic geometry a "wdb_dbopen" would normally be called on
+ * an already existing (and possibly prepped) model.  Using the
+ * RT_WDB_TYPE_DB_INMEM parameter in this call will result in geometry
+ * changes that only exist in memory and will not be permanently
+ * stored in the original database.
+ *
+ * This routine should be preceded by a call to "rt_unprep" and
+ * followed by a call to "rt_reprep".
+ */
+
 WDB_EXPORT WDB_EXTERN( int make_hole, ( struct rt_wdb *wdbp,
                                        point_t hole_start,
                                        vect_t hole_depth,
@@ -873,6 +1012,28 @@
                                        int num_objs,
                                        struct directory **dp ) );
 
+
+/**
+ *
+ * This routine provides a quick approach to simply adding a hole to
+ * existing prepped geometry.  The geometry must already be prepped
+ * prior to calling this routine. After calling this routine, the
+ * geometry is ready for raytracing (no other routine need to be
+ * called).
+ *
+ * A new RCC primitive is created and written to the database
+ * (wdbp). Note that this will be temporary if the wdbp pointer was
+ * created by a call to wdb_dbopen with the RT_WDB_TYPE_DB_INMEM flag.
+ *
+ * The "regions" parameter is a list of "struct region" pointers
+ * (prepped regions) to get holed.  The regions structures are
+ * modified, but the on disk region records are never modified, so the
+ * actual holes will never be permanent regardless of how "wdbp" was
+ * opened.
+ *
+ * There is no need to call "rt_unprep" nor "rt_reprep" with this
+ * routine.
+ */
 WDB_EXPORT WDB_EXTERN( int make_hole_in_prepped_regions, ( struct rt_wdb *wdbp,
                                                           struct rt_i *rtip,
                                                           point_t hole_start,

Modified: brlcad/trunk/src/libwdb/dynamic_geometry.c
===================================================================
--- brlcad/trunk/src/libwdb/dynamic_geometry.c  2013-06-21 13:36:29 UTC (rev 
55811)
+++ brlcad/trunk/src/libwdb/dynamic_geometry.c  2013-06-21 20:34:23 UTC (rev 
55812)
@@ -66,40 +66,6 @@
 #include "wdb.h"
 
 
-/**
- * M A K E _ H O L E
- *
- * This routine is intended to be used to make a hole in some
- * geometry.  The hole is described using the same parameters as an
- * RCC, and the hole is represented as an RCC. The objects to be
- * "holed" are passed in as a list of "struct directory" pointers. The
- * objects pointed at by this list must be combinations. The "struct
- * rt_wdb" pointer passed in indicates what model this hole should
- * appear in.
- *
- * The end state after this routine runs is a modified model with a
- * new RCC primitive having a name of the form "make_hole_X" (where X
- * is some integer). The combinations specified in the list will be
- * modified as follows:
- *
- *           before                                          after
- *             |                                               -
- *             |                                              / \
- *             |                                             /   \
- *     original combination tree                            /     \
- *                                   original combination tree   make_hole_X
- *
- * The modified combination is written to the struct rt_wdb. Note that
- * to do dynamic geometry a "wdb_dbopen" would normally be called on
- * an already existing (and possibly prepped) model.  Using the
- * RT_WDB_TYPE_DB_INMEM parameter in this call will result in geometry
- * changes that only exist in memory and will not be permanently
- * stored in the original database.
- *
- * This routine should be preceded by a call to "rt_unprep" and
- * followed by a call to "rt_reprep".
- */
-
 int
 make_hole(struct rt_wdb *wdbp,         /* database to be modified */
          point_t hole_start,           /* center of start of hole */
@@ -191,28 +157,6 @@
 }
 
 
-/**
- * M A K E _ H O L E _ I N _ P R E P P E D _ R E G I O N S
- *
- * This routine provides a quick approach to simply adding a hole to
- * existing prepped geometry.  The geometry must already be prepped
- * prior to calling this routine. After calling this routine, the
- * geometry is ready for raytracing (no other routine need to be
- * called).
- *
- * A new RCC primitive is created and written to the database
- * (wdbp). Note that this will be temporary if the wdbp pointer was
- * created by a call to wdb_dbopen with the RT_WDB_TYPE_DB_INMEM flag.
- *
- * The "regions" parameter is a list of "struct region" pointers
- * (prepped regions) to get holed.  The regions structures are
- * modified, but the on disk region records are never modified, so the
- * actual holes will never be permanent regardless of how "wdbp" was
- * opened.
- *
- * There is no need to call "rt_unprep" nor "rt_reprep" with this
- * routine.
- */
 int
 make_hole_in_prepped_regions(struct rt_wdb *wdbp,      /* database to be 
modified */
                             struct rt_i *rtip,         /* rt_i pointer for the 
same database */

Modified: brlcad/trunk/src/libwdb/id.c
===================================================================
--- brlcad/trunk/src/libwdb/id.c        2013-06-21 13:36:29 UTC (rev 55811)
+++ brlcad/trunk/src/libwdb/id.c        2013-06-21 20:34:23 UTC (rev 55812)
@@ -39,11 +39,7 @@
 #include "raytrace.h"
 #include "wdb.h"
 
-/**
- * M K _ I D
- *
- * Make a database header (ID) record.
- */
+
 int
 mk_id(struct rt_wdb *fp, const char *title)
 {
@@ -51,16 +47,6 @@
 }
 
 
-/**
- * M K _ I D _ U N I T S
- *
- * Make a database header (ID) record, and note the user's preferred
- * editing units (specified as a string).
- *
- * Returns -
- * <0 error
- * 0 success
- */
 int
 mk_id_units(struct rt_wdb *fp, const char *title, const char *units)
 {
@@ -68,26 +54,6 @@
 }
 
 
-/**
- * M K _ I D _ E D I T U N I T S
- *
- * Make a database header (ID) record, and note the user's preferred
- * editing units (specified as a conversion factor).
- *
- * Note that the v4 database format offers only a limited number of
- * choices for the preferred editing units.  If the user is editing in
- * unusual units (like 2.5feet), don't fail to create the database
- * header.
- *
- * In the v5 database, the conversion factor will be stored intact.
- *
- * Note that the database-layer header record will have already been
- * written by db_create().  All we have to do here is update it.
- *
- * Returns -
- * <0 error
- * 0 success
- */
 int
 mk_id_editunits(
     struct rt_wdb *wdbp,

Modified: brlcad/trunk/src/libwdb/reg.c
===================================================================
--- brlcad/trunk/src/libwdb/reg.c       2013-06-21 13:36:29 UTC (rev 55811)
+++ brlcad/trunk/src/libwdb/reg.c       2013-06-21 20:34:23 UTC (rev 55812)
@@ -183,18 +183,6 @@
 }
 
 
-/**
- * M K _ A D D M E M B E R
- *
- * Obtain dynamic storage for a new wmember structure, fill in the
- * name, default the operation and matrix, and add to doubly linked
- * list.  In typical use, a one-line call is sufficient.  To change
- * the defaults, catch the pointer that is returned, and adjust the
- * structure to taste.
- *
- * The caller is responsible for initializing the header structures
- * forward and backward links.
- */
 struct wmember *
 mk_addmember(
     const char *name,
@@ -230,10 +218,6 @@
     return wp;
 }
 
-
-/**
- * M K _ F R E E M E M B E R S
- */
 void
 mk_freemembers(struct bu_list *headp)
 {
@@ -248,20 +232,6 @@
 }
 
 
-/**
- * M K _ C O M B
- *
- * Make a combination, where the members are described by a linked
- * list of wmember structs.
- *
- * The linked list is freed when it has been output.
- *
- * Has many operating modes.
- *
- * Returns -
- * -1 ERROR
- * 0 OK
- */
 int
 mk_comb(
     struct rt_wdb *wdbp,
@@ -372,11 +342,6 @@
 }
 
 
-/**
- * M K _ C O M B 1
- *
- * Convenience interface to make a combination with a single member.
- */
 int
 mk_comb1(struct rt_wdb *wdbp,
         const char *combname,
@@ -394,13 +359,6 @@
                   0, 0, 0);
 }
 
-
-/**
- * M K _ R E G I O N 1
- *
- * Convenience routine to make a region with shader and rgb possibly
- * set.
- */
 int
 mk_region1(
     struct rt_wdb *wdbp,

Modified: brlcad/trunk/src/libwdb/submodel.c
===================================================================
--- brlcad/trunk/src/libwdb/submodel.c  2013-06-21 13:36:29 UTC (rev 55811)
+++ brlcad/trunk/src/libwdb/submodel.c  2013-06-21 20:34:23 UTC (rev 55812)
@@ -31,14 +31,6 @@
 #include "db.h"
 
 
-/**
- * M K _ S U B M O D E L
- *
- * Create a submodel solid.  If file is NULL or "", the treetop refers
- * to the current database.  Treetop is the name of a single database
- * object in 'file'.  meth is 0 (RT_PART_NUBSPT) or 1
- * (RT_PART_NUGRID).  method 0 is what is normally used.
- */
 int
 mk_submodel(struct rt_wdb *fp, const char *name, const char *file, const char 
*treetop, int meth)
 {

Modified: brlcad/trunk/src/libwdb/units.c
===================================================================
--- brlcad/trunk/src/libwdb/units.c     2013-06-21 13:36:29 UTC (rev 55811)
+++ brlcad/trunk/src/libwdb/units.c     2013-06-21 20:34:23 UTC (rev 55812)
@@ -38,16 +38,6 @@
 double mk_conv2mm = 1.0;               /* Conversion factor to mm */
 
 
-/**
- * M K _ C O N V E R S I O N
- *
- * Given a string conversion value, find the appropriate factor, and
- * establish it.
- *
- * Returns -
- * -1 error
- * 0 OK
- */
 int
 mk_conversion(char *str)
 {
@@ -58,15 +48,6 @@
 }
 
 
-/**
- * M K _ S E T _ C O N V E R S I O N
- *
- * Establish a new conversion factor for LIBWDB routines.
- *
- * Returns -
- * -1 error
- * 0 OK
- */
 int
 mk_set_conversion(double val)
 {

Modified: brlcad/trunk/src/libwdb/vol.c
===================================================================
--- brlcad/trunk/src/libwdb/vol.c       2013-06-21 13:36:29 UTC (rev 55811)
+++ brlcad/trunk/src/libwdb/vol.c       2013-06-21 20:34:23 UTC (rev 55812)
@@ -35,9 +35,6 @@
 #include "db.h"
 
 
-/**
- * M K _ V O L
- */
 int
 mk_vol(struct rt_wdb *fp, const char *name, const char *file, size_t xdim, 
size_t ydim, size_t zdim, size_t lo, size_t hi, const fastf_t *cellsize, const 
matp_t mat)
     /* name of file containing bitmap */

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


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to