| 1 | //------------------------------------------------------------------------- |
|---|
| 2 | // Copyright Notice |
|---|
| 3 | // |
|---|
| 4 | // Copyright (c) 1996 |
|---|
| 5 | // by Malcolm J. Panthaki, DBA, and the University of New Mexico. |
|---|
| 6 | //------------------------------------------------------------------------- |
|---|
| 7 | // |
|---|
| 8 | //------------------------------------------------------------------------- |
|---|
| 9 | // Filename : BodySM.cc |
|---|
| 10 | // |
|---|
| 11 | // Purpose : To implement the Body solid model class. |
|---|
| 12 | // |
|---|
| 13 | // Special Notes : |
|---|
| 14 | // |
|---|
| 15 | // Creator : Stephen J. Verzi |
|---|
| 16 | // |
|---|
| 17 | // Creation Date : 02/26/97 |
|---|
| 18 | // |
|---|
| 19 | // Owner : Stephen J. Verzi |
|---|
| 20 | //------------------------------------------------------------------------- |
|---|
| 21 | |
|---|
| 22 | // ********** BEGIN STANDARD INCLUDES ********** |
|---|
| 23 | // ********** END STANDARD INCLUDES ********** |
|---|
| 24 | |
|---|
| 25 | // ********** BEGIN MOTIF INCLUDES ********** |
|---|
| 26 | // ********** END MOTIF INCLUDES ********** |
|---|
| 27 | |
|---|
| 28 | // ********** BEGIN OPEN INVENTOR INCLUDES ********** |
|---|
| 29 | // ********** END OPEN INVENTOR INCLUDES ********** |
|---|
| 30 | |
|---|
| 31 | // ********** BEGIN ACIS INCLUDES ********** |
|---|
| 32 | // ********** END ACIS INCLUDES ********** |
|---|
| 33 | |
|---|
| 34 | // ********** BEGIN CUBIT INCLUDES ********** |
|---|
| 35 | |
|---|
| 36 | #include "BodySM.hpp" |
|---|
| 37 | #include "Body.hpp" |
|---|
| 38 | // ********** END CUBIT INCLUDES ********** |
|---|
| 39 | |
|---|
| 40 | // ********** BEGIN STATIC DECLARATIONS ********** |
|---|
| 41 | // ********** END STATIC DECLARATIONS ********** |
|---|
| 42 | |
|---|
| 43 | // ********** BEGIN PUBLIC FUNCTIONS ********** |
|---|
| 44 | |
|---|
| 45 | //------------------------------------------------------------------------- |
|---|
| 46 | // Purpose : The default constructor. Does not do anything right now. |
|---|
| 47 | // |
|---|
| 48 | // Special Notes : |
|---|
| 49 | // |
|---|
| 50 | // Creator : Stephen J. Verzi |
|---|
| 51 | // |
|---|
| 52 | // Creation Date : 02/26/97 |
|---|
| 53 | //------------------------------------------------------------------------- |
|---|
| 54 | BodySM::BodySM() |
|---|
| 55 | { |
|---|
| 56 | } |
|---|
| 57 | |
|---|
| 58 | //------------------------------------------------------------------------- |
|---|
| 59 | // Purpose : The destructor. Does not do anything right now. |
|---|
| 60 | // |
|---|
| 61 | // Special Notes : |
|---|
| 62 | // |
|---|
| 63 | // Creator : Stephen J. Verzi |
|---|
| 64 | // |
|---|
| 65 | // Creation Date : 02/26/97 |
|---|
| 66 | //------------------------------------------------------------------------- |
|---|
| 67 | BodySM::~BodySM() |
|---|
| 68 | { |
|---|
| 69 | } |
|---|
| 70 | |
|---|
| 71 | //------------------------------------------------------------------------- |
|---|
| 72 | // Purpose : Get type of TopologyEntity this GeometryEntity |
|---|
| 73 | // should be attached to. |
|---|
| 74 | // |
|---|
| 75 | // Special Notes : |
|---|
| 76 | // |
|---|
| 77 | // Creator : Jason Kraftcheck |
|---|
| 78 | // |
|---|
| 79 | // Creation Date : 06/14/01 |
|---|
| 80 | //------------------------------------------------------------------------- |
|---|
| 81 | const type_info& BodySM::topology_entity_type_info() const |
|---|
| 82 | { return typeid(Body); } |
|---|
| 83 | |
|---|
| 84 | CubitBox BodySM::bounding_box() |
|---|
| 85 | { |
|---|
| 86 | DLIList<Lump*> body_lumps; |
|---|
| 87 | this->lumps( body_lumps ); |
|---|
| 88 | |
|---|
| 89 | CubitBox bbox; |
|---|
| 90 | bbox = body_lumps.get_and_step()->bounding_box(); |
|---|
| 91 | |
|---|
| 92 | int i; |
|---|
| 93 | for( i=body_lumps.size()-1; i--; ) |
|---|
| 94 | { |
|---|
| 95 | Lump *tmp_lump = body_lumps.get_and_step(); |
|---|
| 96 | bbox |= tmp_lump->bounding_box(); |
|---|
| 97 | } |
|---|
| 98 | |
|---|
| 99 | return bbox; |
|---|
| 100 | } |
|---|
| 101 | |
|---|
| 102 | // ********** END PUBLIC FUNCTIONS ********** |
|---|
| 103 | |
|---|
| 104 | // ********** BEGIN PROTECTED FUNCTIONS ********** |
|---|
| 105 | // ********** END PROTECTED FUNCTIONS ********** |
|---|
| 106 | |
|---|
| 107 | // ********** BEGIN PRIVATE FUNCTIONS ********** |
|---|
| 108 | // ********** END PRIVATE FUNCTIONS ********** |
|---|
| 109 | |
|---|
| 110 | // ********** BEGIN HELPER CLASSES ********** |
|---|
| 111 | // ********** END HELPER CLASSES ********** |
|---|
| 112 | |
|---|
| 113 | // ********** BEGIN EXTERN FUNCTIONS ********** |
|---|
| 114 | // ********** END EXTERN FUNCTIONS ********** |
|---|
| 115 | |
|---|
| 116 | // ********** BEGIN STATIC FUNCTIONS ********** |
|---|
| 117 | // ********** END STATIC FUNCTIONS ********** |
|---|