HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_PBDSolve.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_PBDSolve.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_PBDSolve__
12 #define __GAS_PBDSolve__
13 
14 #include "GAS_API.h"
15 
16 #include <GU/GU_Detail.h>
17 
19 
20 #include "GAS_SubSolver.h"
21 #include "GAS_Utils.h"
22 
23 class GU_Detail;
24 class GAS_SPH;
25 
27 {
28 public:
29  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
30  GET_DATA_FUNC_F("repulsionstiffness", RepulsionStiffness);
31  GET_DATA_FUNC_F("repulsionweight", RepulsionWeight);
32  GET_DATA_FUNC_F("attractionstiffness", AttractionStiffness);
33  GET_DATA_FUNC_F("attractionweight", AttractionWeight);
34  GET_DATA_FUNC_I("iterations", Iterations);
35 
36 protected:
37  explicit GAS_PBDSolve(const SIM_DataFactory *factory);
38  ~GAS_PBDSolve() override;
39 
40  /// Moves the fields given by FieldName by the given velocity
41  /// field. Moves the points given by GeometryName likewise.
42  bool solveGasSubclass(SIM_Engine &engine,
43  SIM_Object *obj,
44  SIM_Time time,
45  SIM_Time timestep) override;
46 
47  bool shouldMultiThread() { return true; }
48 
49 protected:
50  THREADED_METHOD1(GAS_PBDSolve, shouldMultiThread(), solvePBD,
51  GU_Detail *, gdp)
52  void solvePBDPartial(GU_Detail *gdp,
53  const UT_JobInfo &info);
54 
55  void doSolvePBD(GU_Detail *gdp, GA_Range r);
56 
57 private:
58  static const SIM_DopDescription *getDopDescription();
59 
63  "Gas PBD Solve",
64  getDopDescription());
65 };
66 
67 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:30
void
Definition: png.h:1083
GT_API const UT_StringHolder time
#define GAS_API
Definition: GAS_API.h:10
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
THREADED_METHOD1(GAS_SubSolver, parms.mask->shouldMultiThread(), buildRelationshipFieldInternal, const RelationshipParms &, parms) void buildRelationshipFieldInternalPartial(const RelationshipParms &parms
Builds a relationship field after most stuff has been setup.
A range of elements in an index-map.
Definition: GA_Range.h:42
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define GET_DATA_FUNC_I(DataName, FuncName)
bool shouldMultiThread()
Definition: GAS_PBDSolve.h:47
#define GET_DATA_FUNC_F(DataName, FuncName)
GLboolean r
Definition: glcorearb.h:1222
#define GET_DATA_FUNC_S(DataName, FuncName)