HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SIM_SolverSop.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_SolverSop_h__
9 #define __SIM_SolverSop_h__
10 
11 #include "SIMZ_API.h"
12 #include <SIM/SIM_OptionsUser.h>
13 #include <SIM/SIM_SingleSolver.h>
14 #include "SIMZ_Utils.h"
15 
16 #include <SOP/SOP_Compiled.h>
17 
18 class SIM_GeometryCopy;
19 
21  public SIM_OptionsUser
22 {
23 public:
24  // Access functions for our specific data.
25  GETSET_DATA_FUNCS_B("usesoppath", UseSopPath);
28  GETSET_DATA_FUNCS_B("doinvoke", DoInvoke);
29  GETSET_DATA_FUNCS_I("numinputs", NumInputs);
30 
31  void getInputName(UT_String &value, int inputno) const
32  { UT_WorkBuffer buf; buf.sprintf("inputname%d", inputno); return getOptions().getOptionS(buf.buffer(), value); }
33  exint getInputSource(int inputno) const
34  { UT_WorkBuffer buf; buf.sprintf("inputsource%d", inputno); return getOptions().getOptionI(buf.buffer()); }
35  void getInputDataName(UT_String &value, int inputno) const
36  { UT_WorkBuffer buf; buf.sprintf("inputdataname%d", inputno); return getOptions().getOptionS(buf.buffer(), value); }
37  void getInputObjectName(UT_String &value, int inputno) const
38  { UT_WorkBuffer buf; buf.sprintf("inputobjectname%d", inputno); return getOptions().getOptionS(buf.buffer(), value); }
39  void getInputRelationship(UT_String &value, int inputno) const
40  { UT_WorkBuffer buf; buf.sprintf("inputrel%d", inputno); return getOptions().getOptionS(buf.buffer(), value); }
41  exint getInputTimeMode(int inputno) const
42  { UT_WorkBuffer buf; buf.sprintf("inputtimemode%d", inputno); return getOptions().getOptionI(buf.buffer()); }
43 
46  GETSET_DATA_FUNCS_B("usetimestep", UseTimeStep);
47  GETSET_DATA_FUNCS_F("timescale", TimeScale);
48 
49  static PRM_Template myTemplateList[];
50  static PRM_Template myTemplateList2[];
51 
52 protected:
53  explicit SIM_SolverSop(const SIM_DataFactory *factory);
54  virtual ~SIM_SolverSop();
55 
57  SIM_Object &object,
58  SIM_ObjectArray &feedbacktoobjects,
59  const SIM_Time &timestep,
60  bool newobject);
62  SIM_Relationship &relation,
63  const SIM_Time &timestep);
64 
65 
66 private:
67  SIM_Result solveRootObject(SIM_Engine &engine,
68  SIM_RootData &rootdata,
69  const SIM_Time &timestep,
70  bool newobject);
71 
72  static const SIM_DopDescription *getSolverSopDopDescription();
73 
77  "SOP Solver",
78  getSolverSopDopDescription());
79 
80  // These should all be bundled into a single structure to represent
81  // a compiled chunk of nodes.
82  SOP_Compiled *myCompiled;
83  SOP_Compiled::TaskStateArray myTaskStates;
84 };
85 
86 #endif
87 
#define SIMZ_API
Definition: SIMZ_API.h:10
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
exint getInputSource(int inputno) const
Definition: SIM_SolverSop.h:33
void getInputRelationship(UT_String &value, int inputno) const
Definition: SIM_SolverSop.h:39
#define GETSET_DATA_FUNCS_B(DataName, FuncName)
#define GETSET_DATA_FUNCS_S(DataName, FuncName)
void getInputObjectName(UT_String &value, int inputno) const
Definition: SIM_SolverSop.h:37
int64 getOptionI(const UT_StringRef &name) const
#define GETSET_DATA_FUNCS_F(DataName, FuncName)
void getInputName(UT_String &value, int inputno) const
Definition: SIM_SolverSop.h:31
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
exint getInputTimeMode(int inputno) const
Definition: SIM_SolverSop.h:41
int64 exint
Definition: SYS_Types.h:109
Holds pointers to a number of SIM_Object objects.
#define GETSET_DATA_FUNCS_I(DataName, FuncName)
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
const SIM_Options & getOptions() const
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
GLsizei const GLfloat * value
Definition: glcorearb.h:823
#define SIM_NAME_DATAPATH
Definition: SIMZ_Utils.h:16
virtual SIM_Result solveSingleObjectSubclass(SIM_Engine &engine, SIM_Object &object, SIM_ObjectArray &feedbacktoobjects, const SIM_Time &timestep, bool newobject)=0
void getInputDataName(UT_String &value, int inputno) const
Definition: SIM_SolverSop.h:35
virtual SIM_Result solveRelationshipSubclass(SIM_Engine &engine, SIM_Relationship &relationship, const SIM_Time &timestep)
Definition: SIM_Solver.h:182
const char * buffer() const
#define SIM_NAME_TRANSFORMSOPOUTPUT
Definition: SIMZ_Utils.h:33
#define SIM_NAME_SOLVEINITFRAME
Definition: SIMZ_Utils.h:36
#define SIM_NAME_SOPPATH
Definition: SIMZ_Utils.h:31
This implements a SIM_Geometry that copies the source geometry.
const UT_StringHolder & getOptionS(const UT_StringRef &name) const