cgma
BodySM.cpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Copyright Notice
00003 //
00004 // Copyright (c) 1996 
00005 // by Malcolm J. Panthaki, DBA, and the University of New Mexico.
00006 //-------------------------------------------------------------------------
00007 //
00008 //-------------------------------------------------------------------------
00009 // Filename      : BodySM.cc
00010 //
00011 // Purpose       : To implement the Body solid model class.
00012 //
00013 // Special Notes :
00014 //
00015 // Creator       : Stephen J. Verzi
00016 //
00017 // Creation Date : 02/26/97
00018 //
00019 // Owner         : Stephen J. Verzi
00020 //-------------------------------------------------------------------------
00021 
00022 // ********** BEGIN STANDARD INCLUDES      **********
00023 // ********** END STANDARD INCLUDES        **********
00024 
00025 // ********** BEGIN MOTIF INCLUDES         **********
00026 // ********** END MOTIF INCLUDES           **********
00027 
00028 // ********** BEGIN OPEN INVENTOR INCLUDES **********
00029 // ********** END OPEN INVENTOR INCLUDES   **********
00030 
00031 // ********** BEGIN CUBIT INCLUDES         **********
00032 
00033 #include "BodySM.hpp"
00034 #include "Body.hpp"
00035 // ********** END CUBIT INCLUDES           **********
00036 
00037 // ********** BEGIN STATIC DECLARATIONS    **********
00038 // ********** END STATIC DECLARATIONS      **********
00039 
00040 // ********** BEGIN PUBLIC FUNCTIONS       **********
00041 
00042 //-------------------------------------------------------------------------
00043 // Purpose       : The default constructor. Does not do anything right now.
00044 //
00045 // Special Notes :
00046 //
00047 // Creator       : Stephen J. Verzi
00048 //
00049 // Creation Date : 02/26/97
00050 //-------------------------------------------------------------------------
00051 BodySM::BodySM()
00052 {
00053 }
00054 
00055 //-------------------------------------------------------------------------
00056 // Purpose       : The destructor. Does not do anything right now.
00057 //
00058 // Special Notes :
00059 //
00060 // Creator       : Stephen J. Verzi
00061 //
00062 // Creation Date : 02/26/97
00063 //-------------------------------------------------------------------------
00064 BodySM::~BodySM()
00065 {
00066 }
00067 
00068 CubitBox BodySM::bounding_box()
00069 {
00070   DLIList<Lump*> body_lumps;
00071   this->lumps( body_lumps );
00072 
00073   CubitBox bbox;
00074   bbox = body_lumps.get_and_step()->bounding_box();
00075 
00076   int i;
00077   for( i=body_lumps.size()-1; i--; )
00078   {
00079     Lump *tmp_lump = body_lumps.get_and_step();
00080     bbox |= tmp_lump->bounding_box();
00081   }
00082 
00083   return bbox;
00084 }
00085 
00086 // ********** END PUBLIC FUNCTIONS         **********
00087 
00088 // ********** BEGIN PROTECTED FUNCTIONS    **********
00089 // ********** END PROTECTED FUNCTIONS      **********
00090 
00091 // ********** BEGIN PRIVATE FUNCTIONS      **********
00092 // ********** END PRIVATE FUNCTIONS        **********
00093 
00094 // ********** BEGIN HELPER CLASSES         **********
00095 // ********** END HELPER CLASSES           **********
00096 
00097 // ********** BEGIN EXTERN FUNCTIONS       **********
00098 // ********** END EXTERN FUNCTIONS         **********
00099 
00100 // ********** BEGIN STATIC FUNCTIONS       **********
00101 // ********** END STATIC FUNCTIONS         **********
00102 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines