Biomechanical Joint Model
 Author: Anderson Maciel

RAPID.cpp

Go to the documentation of this file.
00001 /*************************************************************************\
00002 
00003   Copyright 1995 The University of North Carolina at Chapel Hill.
00004   All Rights Reserved.
00005 
00006   Permission to use, copy, modify and distribute this software and its
00007   documentation for educational, research and non-profit purposes, without
00008    fee, and without a written agreement is hereby granted, provided that the
00009   above copyright notice and the following three paragraphs appear in all
00010   copies.
00011 
00012   IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE
00013   LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
00014   CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE
00015   USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY
00016   OF NORTH CAROLINA HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
00017   DAMAGES.
00018 
00019   THE UNIVERSITY OF NORTH CAROLINA SPECIFICALLY DISCLAIM ANY
00020   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00021   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE
00022   PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
00023   NORTH CAROLINA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
00024   UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
00025 
00026   The authors may be contacted via:
00027 
00028   US Mail:             S. Gottschalk
00029                        Department of Computer Science
00030                        Sitterson Hall, CB #3175
00031                        University of N. Carolina
00032                        Chapel Hill, NC 27599-3175
00033 
00034   Phone:               (919)962-1749
00035 
00036   EMail:              {gottscha}@cs.unc.edu
00037 
00038 
00039 \**************************************************************************/
00040 
00041 #include "RAPID_version.H"
00042 
00043 static char rapidtag_data[] = "RAPIDTAG  file: "__FILE__"    date: "__DATE__"    time: "__TIME__;
00044 
00045 // to silence the compiler's complaints about unreferenced identifiers.
00046 static void r1(char *f){  r1(f);  r1(rapidtag_data);  r1(rapid_version);}
00047 
00048 #include "RAPID.H"
00049 #include <stdio.h>
00050 #include <stdlib.h>
00051 #include "matvec.H"
00052 #include "overlap.H"
00053 #include "obb.H"
00054 
00055 extern int RAPID_initialized;
00056 void RAPID_initialize();
00057 
00058 RAPID_model::RAPID_model() 
00059 {
00060   if (!RAPID_initialized) RAPID_initialize();
00061 
00062   b = 0;
00063   num_boxes_alloced = 0;
00064 
00065   tris = 0;
00066   num_tris = 0;
00067   num_tris_alloced = 0;
00068   build_state = RAPID_BUILD_STATE_CONST;  
00069 }
00070 
00071 RAPID_model::~RAPID_model()
00072 {
00073   if (!RAPID_initialized) RAPID_initialize();
00074 
00075   // the boxes pointed to should be deleted.
00076   delete [] b;
00077 
00078   // the triangles pointed to should be deleted.
00079   delete [] tris;
00080 }
00081 
00082 int RAPID_initialized = 0;
00083 
00084 void
00085 RAPID_initialize()
00086 {
00087   RAPID_num_box_tests = 0;
00088   RAPID_num_contacts = 0;
00089   RAPID_contact = 0;
00090 
00091   RAPID_initialized = 1;
00092 }             
00093 

Generated on Thu Dec 1 10:13:40 2005 for COME - Biomechanical Joint Model by  doxygen 1.4.5