Revision: 46541
          http://brlcad.svn.sourceforge.net/brlcad/?rev=46541&view=rev
Author:   abhi2011
Date:     2011-09-01 20:32:45 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Added new header file to declare structures for passing sim parameters

Added Paths:
-----------
    brlcad/trunk/src/libged/simulate/simulate.h

Added: brlcad/trunk/src/libged/simulate/simulate.h
===================================================================
--- brlcad/trunk/src/libged/simulate/simulate.h                         (rev 0)
+++ brlcad/trunk/src/libged/simulate/simulate.h 2011-09-01 20:32:45 UTC (rev 
46541)
@@ -0,0 +1,67 @@
+/*                         S I M U L A T E . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2008-2011 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file libged/simulate.c
+ *
+ * The simulate command.
+ *
+ * Routines related to performing physics on passed objects only
+ *
+ *
+ */
+
+#ifndef SIMULATE_H_
+#define SIMULATE_H_
+
+/* Contains information about a single rigid body constructed from BRL-CAD 
geometry.
+ * This structure is the node of a linked list containing the geometry to be 
added to the sim
+ * Only the bb is currently present, but physical properties like elasticity, 
custom forces
+ * will be added later: TODO
+ */
+struct rigid_body {
+    char * rb_namep;                /**< @brief pointer to name string */
+    point_t bbmin, bbmax;               /**< @brief body bb bounds */
+    mat_t t;                                    /**< @brief current 
transformation matrix */
+    struct rigid_body *next;     /**< @brief link to next body */
+};
+
+/* Contains the simulation parameters, such as number of rigid bodies,
+ * the head node of the linked list containing the bodies and time/steps for
+ * which the simulation will be run.
+ */
+struct simulation_params {
+    int duration;                                /**< @brief contains either 
the number of steps or the time */
+    int num_bodies;                              /**< @brief number of rigid 
bodies participating in the sim */
+    struct ged *gedp;                    /**< @brief handle to the libged 
object to access geometry info */
+    struct rigid_body *head_node; /**< @brief link to first rigid body node */
+};
+
+
+#endif /* SIMULATE_H_ */
+
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


Property changes on: brlcad/trunk/src/libged/simulate/simulate.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

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


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to