HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SIM_ForceReferenceFrame.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef __SIM_ForceReferenceFrame_h__
9 #define __SIM_ForceReferenceFrame_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_Force.h"
13 #include "SIM_OptionsUser.h"
14 
15 /// This is an implementation of the SIM_Force interface.
16 /// This implementation transforms the accerations of another object
17 /// into forces on this object, thereby allowing you to have an object
18 /// use another object as a reference frame.
20  public SIM_OptionsUser
21 {
22 public:
23  /// The object to get the new frame from.
24  GET_DATA_FUNC_S("newframeobject", NewFrameName);
25  /// The position data on the new frame object
26  GET_DATA_FUNC_S("newframeposition", NewFramePositionName);
27  // AMount to scale the effect.
28  GET_DATA_FUNC_F("forcescale", ForceScale);
29  /// Whether to sample by point, circle, or sphere.
31 
32 protected:
33  explicit SIM_ForceReferenceFrame(const SIM_DataFactory *factory);
34  virtual ~SIM_ForceReferenceFrame();
35 
36  /// Computes the acceleration of the frame object and uses
37  /// that to determine fictitious forces that would generate
38  /// that acceleration. These become the returned force.
39  virtual void getForceSubclass(const SIM_Object &object,
40  const UT_Vector3 &position,
41  const UT_Vector3 &velocity,
42  const UT_Vector3 &angvel,
43  const fpreal mass,
44  UT_Vector3 &force,
45  UT_Vector3 &torque) const;
46  virtual SIM_ForceResolver *getForceResolverSubclass(const SIM_Object &object) const;
47 
49 
50 private:
51  static const SIM_DopDescription *getForceReferenceFrameDopDescription();
52 
55  SIM_Force,
56  "Reference Frame Force",
57  getForceReferenceFrameDopDescription());
58 };
59 
60 #endif
61 
virtual void getForceSubclass(const SIM_Object &object, const UT_Vector3 &position, const UT_Vector3 &velocity, const UT_Vector3 &angvel, const fpreal mass, UT_Vector3 &force, UT_Vector3 &torque) const
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
SIM_ForceSample
Definition: SIM_Force.h:49
#define SIM_NAME_SAMPLEMODE
Definition: SIM_Names.h:180
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
virtual SIM_ForceSample getOptimalForceSamplingSubclass() const
virtual SIM_ForceResolver * getForceResolverSubclass(const SIM_Object &object) const
#define GETSET_DATA_FUNCS_I(DataName, FuncName)
GA_API const UT_StringHolder mass
double fpreal
Definition: SYS_Types.h:269
#define GET_DATA_FUNC_F(DataName, FuncName)
#define SIM_API
Definition: SIM_API.h:10
#define GET_DATA_FUNC_S(DataName, FuncName)