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 * 123 Front Street West, Suite 1401 00009 * Toronto, Ontario 00010 * Canada M5J 2M2 00011 * 416-504-9876 00012 */ 00013 00014 #ifndef __SIM_ConAnchorObjSpatial_h__ 00015 #define __SIM_ConAnchorObjSpatial_h__ 00016 00017 #include "SIM_API.h" 00018 #include <UT/UT_Vector3.h> 00019 #include "SIM_ConAnchorSpatial.h" 00020 00021 class SIM_API SIM_ConAnchorObjSpatial : public SIM_ConAnchorSpatial 00022 { 00023 public: 00024 GETSET_DATA_FUNCS_S(SIM_NAME_OBJECT, ObjectName); 00025 /// Object-space offset. 00026 GETSET_DATA_FUNCS_V3(SIM_NAME_OFFSET, OffsetInput); 00027 00028 /// This value represents the desired world-space position of the 00029 /// constraint. Every spatial constraint must be able to initialize 00030 /// itself using this world space position. 00031 GETSET_DATA_FUNCS_V3(SIM_NAME_WORLDSPACEPOS, WorldSpacePosition); 00032 /// This value must be true to force the constraint to initialize 00033 /// itself from the provided world space position. Otherwise the 00034 /// constraint-specific parameters are used directly. 00035 GETSET_DATA_FUNCS_B(SIM_NAME_USEWORLDSPACEPOS, UseWorldSpacePosition); 00036 00037 /// Overridable get/set for Offset 00038 const UT_Vector3 getOffset() const; 00039 void setOffset(const UT_Vector3 &vector); 00040 00041 protected: 00042 explicit SIM_ConAnchorObjSpatial(const SIM_DataFactory *f); 00043 virtual ~SIM_ConAnchorObjSpatial(); 00044 00045 virtual bool getNeedsInitSubclass() const; 00046 virtual void initAnchorSubclass(const SIM_Object *object); 00047 virtual bool getObjectSpecificationSubclass(UT_String &str) const; 00048 00049 void initParmsFromWorldSpacePosition( 00050 const UT_Vector3 &worldspacepos, 00051 const SIM_Object *object); 00052 00053 virtual void initParmsFromWorldSpacePositionSubclass( 00054 const UT_Vector3 &worldspacepos, 00055 const SIM_Object *object) = 0; 00056 00057 virtual const UT_Vector3 getOffsetSubclass() const; 00058 00059 private: 00060 DECLARE_STANDARD_GETCASTTOTYPE(); 00061 DECLARE_CLASSNAME(SIM_ConAnchorObjSpatial, SIM_ConAnchorSpatial); 00062 }; 00063 00064 #endif
1.5.9