00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc. 00008 * 477 Richmond Street West, Suite 1001 00009 * Toronto, Ontario 00010 * Canada M5V 3E7 00011 * 416-504-9876 00012 */ 00013 00014 #ifndef __SIM_GeometryCopy_h__ 00015 #define __SIM_GeometryCopy_h__ 00016 00017 #include "SIM_API.h" 00018 #include <UT/UT_DMatrix4.h> 00019 #include "SIM_Geometry.h" 00020 00021 /// This implements a SIM_Geometry that copies the source geometry. 00022 class SIM_API SIM_GeometryCopy : public SIM_Geometry 00023 { 00024 public: 00025 /// This method provides access to the internal geometry so that it 00026 /// can be modified. For each call to lockGeometry(), there must be a 00027 /// corresponding call to releaseGeometry(). Calls to lockGeomtry() 00028 /// can be nested. 00029 GU_DetailHandle lockGeometry(); 00030 /// This function releases the lock on our internal geometry. This 00031 /// function must be called once for each call to lockGeometry(). Also, 00032 /// once this function has been called, no more modifications should be 00033 /// made to the geometry returned by lockGeometry() or the result will 00034 /// be undefined. 00035 void releaseGeometry(); 00036 /// This method provides access to the internal transform so that it 00037 /// can be modified. For each call to lockTransform(), there must be a 00038 /// corresponding call to releaseTransform(). Calls to lockTransform() 00039 /// can be nested. 00040 UT_DMatrix4 &lockTransform(); 00041 /// This function releases the lock on our internal transform. This 00042 /// function must be called once for each call to lockTransform(). Also, 00043 /// once this function has been called, no more modifications should be 00044 /// made to the transform returned by lockTransform() or the result will 00045 /// be undefined. 00046 void releaseTransform(); 00047 00048 protected: 00049 explicit SIM_GeometryCopy(const SIM_DataFactory *factory); 00050 virtual ~SIM_GeometryCopy(); 00051 00052 /// Initializes this data by clearing our internal geometry and transform. 00053 virtual void initializeSubclass(); 00054 /// This function creates an internal copy of any SIM_Geometry data 00055 /// passed to it. 00056 virtual void makeEqualSubclass(const SIM_Data *source); 00057 /// Respond to setting our parameters by adjusting our transform. 00058 /// The parameters will be in the standard t, r, s style which we 00059 /// convert in to a matrix and multiply by our current transform. 00060 virtual void setParametersSubclass(const SIM_Options &options); 00061 00062 private: 00063 static const SIM_DopDescription *getGeometryCopyDopDescription(); 00064 00065 int myDetailLockCount; 00066 int myTransformLockCount; 00067 00068 DECLARE_STANDARD_GETCASTTOTYPE(); 00069 DECLARE_DATAFACTORY(SIM_GeometryCopy, 00070 SIM_Geometry, 00071 "Geometry Copy", 00072 getGeometryCopyDopDescription()); 00073 }; 00074 00075 #endif 00076
1.5.9