HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_ForceVex.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_ForceVex_h__
9 #define __SIM_ForceVex_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_Force.h"
13 #include "SIM_OptionsUser.h"
14 
15 /// A simple drag force that opposes velocities in the normal direction.
17  public SIM_OptionsUser
18 {
19 public:
20  GETSET_DATA_FUNCS_S("vexscript", VexScript);
21  /// Whether to sample by point, circle, or sphere.
23 
24 protected:
25  explicit SIM_ForceVex(const SIM_DataFactory *factory);
26  ~SIM_ForceVex() override;
27 
28  /// Override the surface force calculation. The drag force opposes
29  /// velocities.
30  void getForceSubclass(const SIM_Object &object,
31  const UT_Vector3 &position,
32  const UT_Vector3 &velocity,
33  const UT_Vector3 &angvel,
34  const fpreal mass,
36  UT_Vector3 &torque) const override;
37  bool getForceSetSubclass(const SIM_Object &object,
38  const UT_Vector3Array &positions,
39  const UT_Vector3Array &velocities,
40  const UT_Vector3Array &angvelocities,
41  const UT_FloatArray &masses,
42  UT_Vector3Array &forces,
43  UT_Vector3Array &torques) const override;
44 
46 
47 private:
48  /// Get the Automatic DOP description for creating a drag dop.
49  static const SIM_DopDescription *getForceVexDopDescription();
50 
53  SIM_Force,
54  "Vex Force",
55  getForceVexDopDescription());
56 };
57 
58 #endif
59 
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:50
#define GETSET_DATA_FUNCS_S(DataName, FuncName)
SIM_API const UT_StringHolder torque
SIM_ForceSample
Definition: SIM_Force.h:49
#define SIM_NAME_SAMPLEMODE
Definition: SIM_Names.h:181
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
virtual SIM_ForceSample getOptimalForceSamplingSubclass() const
#define GETSET_DATA_FUNCS_I(DataName, FuncName)
A simple drag force that opposes velocities in the normal direction.
Definition: SIM_ForceVex.h:16
GA_API const UT_StringHolder mass
SIM_API const UT_StringHolder force
fpreal64 fpreal
Definition: SYS_Types.h:277
SIM_API const UT_StringHolder position
#define SIM_API
Definition: SIM_API.h:12
virtual bool getForceSetSubclass(const SIM_Object &object, const UT_Vector3Array &positions, const UT_Vector3Array &velocities, const UT_Vector3Array &angvelocities, const UT_FloatArray &masses, UT_Vector3Array &forces, UT_Vector3Array &torque) const