HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_Feedback.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  * NAME: GAS_Feedback.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_Feedback__
12 #define __GAS_Feedback__
13 
14 #include "GAS_API.h"
15 
16 #include "GAS_SubSolver.h"
17 #include "GAS_Utils.h"
18 
19 class SIM_RawField;
20 class SIM_ScalarField;
21 class SIM_IndexField;
22 
24 {
25 public:
26  GET_DATA_FUNC_S(GAS_NAME_PRESSURE, PressureName);
27  GET_DATA_FUNC_S(GAS_NAME_COLLISION, CollisionName);
28  GET_DATA_FUNC_S(GAS_NAME_INDEX, IndexName);
29 
30  GET_DATA_FUNC_F("feedbackscale", FeedbackScale);
31 
32 protected:
33  explicit GAS_Feedback(const SIM_DataFactory *factory);
34  ~GAS_Feedback() override;
35 
36  /// Moves the fields given by FieldName by the given velocity
37  /// field. Moves the points given by GeometryName likewise.
38  bool solveGasSubclass(SIM_Engine &engine,
39  SIM_Object *obj,
40  SIM_Time time,
41  SIM_Time timestep) override;
42 
43  /// Calculates the appropriate feedback on the objects given
44  /// the calculated pressure field. This will add the appropraite
45  /// SIM_FEEDBACK impacts.
46  void addPressureFeedback(SIM_Engine &engine,
47  const SIM_ScalarField *collisionmask,
48  SIM_Object *fluidobj,
49  const SIM_IndexField *collideindex,
50  const SIM_RawField *pressure,
51  UT_DMatrix4 toworld,
52  const SIM_Time &time) const;
53 
54  /// Calculates the appropriate feedback on the objects given
55  /// the calculated pressure field and collision weights. This will add the
56  /// appropraite SIM_FEEDBACK impacts.
57  void addPressureFeedbackWeighted(SIM_Engine &engine,
58  const SIM_VectorField *colweights,
59  int axis,
60  SIM_Object *fluidobj,
61  const SIM_IndexField *collideindex,
62  const SIM_RawField *pressure,
63  UT_DMatrix4 toworld,
64  const SIM_Time &time) const;
65 
66 private:
67  static const SIM_DopDescription *getDopDescription();
68 
72  "Gas Feedback",
73  getDopDescription());
74 };
75 
76 #endif
77 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
GT_API const UT_StringHolder time
#define GAS_API
Definition: GAS_API.h:10
#define GAS_NAME_COLLISION
Definition: GAS_Utils.h:21
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
This class holds a three dimensional scalar field.
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define GET_DATA_FUNC_F(DataName, FuncName)
This class holds a three dimensional scalar field.
#define GAS_NAME_PRESSURE
Definition: GAS_Utils.h:33
This class holds a three dimensional vector field.
#define GET_DATA_FUNC_S(DataName, FuncName)
#define GAS_NAME_INDEX
Definition: GAS_Utils.h:31