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_ConAnchorAlignAxis_h__ 00016 #define __SIM_ConAnchorAlignAxis_h__ 00017 00018 #include "SIM_API.h" 00019 #include "SIM_ConAnchorRotational.h" 00020 00021 class SIM_ConAnchorSpatial; 00022 00023 /// A concrete constraint source: the "lookat" constraint, set to 00024 /// track the orientation from one spatial anchor to another. 00025 class SIM_API SIM_ConAnchorAlignAxis : public SIM_ConAnchorRotational 00026 { 00027 public: 00028 GETSET_DATA_FUNCS_V3(SIM_NAME_OBJECTAXIS, ObjectAxis); 00029 00030 protected: 00031 explicit SIM_ConAnchorAlignAxis(const SIM_DataFactory *factory); 00032 virtual ~SIM_ConAnchorAlignAxis(); 00033 00034 virtual bool getNeedsInitSubclass() const; 00035 virtual void initConstraintSubclass(const SIM_Relationship *rel); 00036 00037 virtual UT_Quaternion getOrientationSubclass( 00038 const SIM_Time &time) const; 00039 virtual UT_Vector3 getAngularVelocitySubclass( 00040 const SIM_Time &time) const; 00041 00042 private: 00043 void getPositions( 00044 SIM_ConAnchorSpatial *&goalfrom, 00045 SIM_ConAnchorSpatial *&goalto); 00046 void getConstPositions( 00047 const SIM_ConAnchorSpatial *&goalfrom, 00048 const SIM_ConAnchorSpatial *&goalto) const; 00049 00050 static const SIM_DopDescription *getDopDescription(); 00051 00052 DECLARE_STANDARD_GETCASTTOTYPE(); 00053 DECLARE_DATAFACTORY(SIM_ConAnchorAlignAxis, 00054 SIM_ConAnchorRotational, 00055 "Anchor: Align Axis", 00056 getDopDescription()); 00057 }; 00058 00059 #endif 00060
1.5.9