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 * Jeff Lait 00008 * Side Effects Software Inc 00009 * 123 Front Street West, Suite 1401 00010 * Toronto, Ontario 00011 * Canada M5J 2M2 00012 * 416-504-9876 00013 */ 00014 00015 #ifndef __SIM_ConAnchorObjRotational_h__ 00016 #define __SIM_ConAnchorObjRotational_h__ 00017 00018 #include "SIM_API.h" 00019 #include "SIM_ConAnchorRotational.h" 00020 00021 /// Base class for constraint anchors that specify a rotation in the space 00022 /// of a particular object. 00023 class SIM_API SIM_ConAnchorObjRotational : public SIM_ConAnchorRotational 00024 { 00025 public: 00026 GETSET_DATA_FUNCS_S(SIM_NAME_OBJECT, ObjectName); 00027 00028 /// This value must be true to force the constraint to initialize 00029 /// itself from the provided world space position. Otherwise the 00030 /// constraint-specific parameters are used directly. 00031 GETSET_DATA_FUNCS_B(SIM_NAME_USEWORLDSPACEPOS, UseWorldSpacePosition); 00032 00033 /// Retrieve the world-space position for the guide geometry 00034 GETSET_DATA_FUNCS_V3(SIM_NAME_WORLDSPACEPOS, WorldSpacePosition); 00035 00036 00037 protected: 00038 explicit SIM_ConAnchorObjRotational(const SIM_DataFactory *f); 00039 virtual ~SIM_ConAnchorObjRotational(); 00040 00041 virtual bool getNeedsInitSubclass() const; 00042 virtual void initAnchorSubclass(const SIM_Object *object); 00043 virtual bool getObjectSpecificationSubclass(UT_String &str) const; 00044 00045 void initParmsFromWorldSpacePosition( 00046 const UT_Vector3 &worldspacepos, 00047 const SIM_Object *object); 00048 virtual void initParmsFromWorldSpacePositionSubclass( 00049 const UT_Vector3 &worldspacepos, 00050 const SIM_Object *object) = 0; 00051 00052 virtual UT_Quaternion getOrientationSubclass(const SIM_Time &time) const; 00053 virtual UT_Vector3 getAngularVelocitySubclass(const SIM_Time &time) const; 00054 00055 private: 00056 DECLARE_STANDARD_GETCASTTOTYPE(); 00057 DECLARE_CLASSNAME(SIM_ConAnchorObjRotational, SIM_ConAnchorRotational); 00058 }; 00059 00060 #endif 00061
1.5.9