HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_SolverMulti.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_SolverMulti_h__
9 #define __SIM_SolverMulti_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_Solver.h"
13 #include "SIM_OptionsUser.h"
14 
15 /// This solver class passes the solve responsibility to one or more other
16 /// solvers. It searches for any SIM_Solver subdata attached to itself, and
17 /// calls each one in turn.
19  public SIM_OptionsUser
20 {
21 public:
23 
24 protected:
25  /// Basic SIM_SolverMulti constructor.
26  explicit SIM_SolverMulti(const SIM_DataFactory *factory);
27  /// Basic SIM_SolverMulti destructor.
28  ~SIM_SolverMulti() override;
29 
30  /// Override this function to pass this call along to our child solvers.
32  SIM_Engine &engine,
33  SIM_ObjectArray &objects,
34  SIM_ObjectArray &newobjects,
35  SIM_ObjectArray &feedbacktoobjects,
36  const SIM_Time &timestep) override;
38  SIM_Engine &engine,
39  SIM_Relationship &relationship,
40  const SIM_Time &timestep) override;
41  /// Override this function to get the requirements of our child solvers.
42  int getRequestedCacheSubclass() const override;
44  const SIM_Object &object,
45  const UT_Vector3 &impulseworldpos,
46  UT_DMatrix3 &immatrix) const override;
48  const SIM_Object &object,
49  int ptnum, UT_DMatrix3 &immatrix) const override;
51  const SIM_Object &object) const override;
53  const SIM_Object &object,
54  const UT_Vector3 &worldpos,
55  const SIM_Property &property) const override;
57  const SIM_Object &object,
58  int ptnum,
59  const SIM_Property &property) const override;
61  const SIM_Object &object,
62  UT_String &label) const override;
64  const SIM_Object &object,
65  const UT_String &colliderlabel,
66  UT_String &collidertype,
67  bool &colliderreverseobjectroles) const override;
68 
69 private:
70  /// Gets the solver to use for getting object properties.
71  const SIM_Solver *getCurrentSolver() const;
72 
73  static const SIM_DopDescription *getSolverMultiDopDescription();
74 
75  SIM_Solver *myCurrentSolver;
76 
79  SIM_Solver,
80  "Multiple Solver",
81  getSolverMultiDopDescription());
82 };
83 
84 #endif
85 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#define SIM_NAME_PRIMARYSOLVER
Definition: SIM_Names.h:170
virtual void getDefaultColliderSubclass(const SIM_Object &object, const UT_String &colliderlabel, UT_String &collidertype, bool &colliderreverseobjectroles) const
virtual int getRequestedCacheSubclass() const
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
Holds pointers to a number of SIM_Object objects.
INT property
Definition: wglew.h:145
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2544
virtual void getImpulseMassMatrixSubclass(const SIM_Object &object, const UT_Vector3 &impulseworldpos, UT_DMatrix3 &immatrix) const
#define GETSET_DATA_FUNCS_I(DataName, FuncName)
virtual SIM_PointImpulseMassMatrixResolver * getPointImpulseMassMatrixResolverSubclass(const SIM_Object &object) const
Builds a resolver for evaluating mass matrices swiftly.
virtual SIM_Result solveObjectsSubclass(SIM_Engine &engine, SIM_ObjectArray &objects, SIM_ObjectArray &newobjects, SIM_ObjectArray &feedbacktoobjects, const SIM_Time &timestep)=0
virtual fpreal getPropertyAtPositionSubclass(const SIM_Object &object, const UT_Vector3 &worldpos, const SIM_Property &property) const
virtual void getDefaultColliderLabelSubclass(const SIM_Object &object, UT_String &label) const
Gets the default collider label for an object using this solver.
fpreal64 fpreal
Definition: SYS_Types.h:277
#define SIM_API
Definition: SIM_API.h:10
virtual SIM_Result solveRelationshipSubclass(SIM_Engine &engine, SIM_Relationship &relationship, const SIM_Time &timestep)
Definition: SIM_Solver.h:182
virtual void getPointImpulseMassMatrixSubclass(const SIM_Object &object, int ptnum, UT_DMatrix3 &immatrix) const
SIM_Property
virtual fpreal getPropertyAtPointSubclass(const SIM_Object &object, int ptnum, const SIM_Property &property) const