00001 00002 // 00003 // Title : ModelingObject.h 00004 // Project : D&D Demos 00005 // Created : Dec 16, 1996 00006 // Author : Troy Harden 00007 // Platforms : All 00008 // Copyright : Copyright© The University of Texas at Austin, 2002. All rights reserved. 00009 // 00010 // This software and documentation constitute an unpublished work 00011 // and contain valuable trade secrets and proprietary information 00012 // belonging to the University. None of the foregoing material may be 00013 // copied or duplicated or disclosed without the express, written 00014 // permission of University. THE UNIVERSITY EXPRESSLY DISCLAIMS ANY 00015 // AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION, 00016 // INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 00017 // PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY 00018 // THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE. 00019 // NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF 00020 // THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall the 00021 // University be liable for incidental, special, indirect, direct or 00022 // consequential damages or loss of profits, interruption of business, 00023 // or related expenses which may arise from use of software or documentation, 00024 // including but not limited to those resulting from defects in software 00025 // and/or documentation, or loss or inaccuracy of data of any kind. 00026 // Purpose : Abstract obstacle . Defines the obstacle 00027 // interface for the various obstacles. 00028 // 00029 //---------------------------------------------------------------------------- 00030 // 00031 // $Log: ModelingObject.hpp,v $ 00032 // Revision 1.8 2005/06/15 15:51:39 aspencer 00033 // Eliminated warning in Update method. 00034 // 00035 // Revision 1.7 2005/06/10 17:02:41 josh 00036 // Declare destructor virtual. 00037 // 00038 // Revision 1.6 2005/06/07 23:07:59 aspencer 00039 // Added a virtual update function to ModelingObject. Made all inheriting, implemented Update functions virtual as well. 00040 // 00041 // Revision 1.5 2005/06/06 20:16:02 aspencer 00042 // operator= was not calling base class operator= 00043 // 00044 // Revision 1.4 2005/06/02 16:38:57 aspencer 00045 // Moved the protected attribute localToGlobal Xform from BoxOb.hpp, ConeOb.hpp, and SkeletalPrimitive.hpp to the abstract base class ModelingObject.hpp 00046 // 00047 // Revision 1.3 2005/06/01 22:27:30 chetan 00048 // Made changes to copyright headers 00049 // 00050 // Revision 1.2 2005/05/27 15:56:49 aspencer 00051 // Changed "Reference" enumeration to "ReferenceFrame" 00052 // 00053 // Revision 1.1 2005/05/26 21:02:43 aspencer 00054 // Changed "obstacle" to "primitive" in both the obstacle and the skeletalobstacle class. Inserted "modeling object" abstract class, which primitive (was obstacle) now inherits from. Updated the rest of OSCAR to reflect this/Initial Commit 00055 // 00056 // 00058 #ifndef ModelingObject_h 00059 #define ModelingObject_h 00060 00061 //Includes go here 00062 #include "Base/Base.h" 00063 #include "Math/Xform.h" 00064 00065 namespace OSCAR { 00066 00071 class ModelingObject : public Base 00072 { 00073 public: 00074 00075 /* \brief Enumerated type identifies the reference frame for several methods in 00076 derived classes. 00077 */ 00078 enum ReferenceFrame {Local, Global}; 00079 virtual ~ModelingObject() {}; 00080 ModelingObject& operator=(const ModelingObject& rhs) { 00081 if(this == &rhs) 00082 return *this; 00083 Base::operator=(rhs); 00084 localToGlobal = rhs.localToGlobal; 00085 return *this; 00086 } 00087 00093 virtual bool Update(const Xform& transform){transform.at(0,0); return false;}; 00094 00095 00096 00097 protected: 00098 Xform localToGlobal; //Specifies the last user set transformation from the local frame to the global frame 00099 ModelingObject(const String& name= String(), OSCARError& err=DUMMY_ERROR(noError)) 00100 :Base(name,err) {} 00101 ModelingObject(const ModelingObject& arg) : Base(arg) { localToGlobal = arg.localToGlobal; } 00102 }; 00103 00104 } //namespace OSCAR 00105 #endif //ModelingObject_h
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |