HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_GeometryVex.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_GeometryVex.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_GeometryVex__
12 #define __GAS_GeometryVex__
13 
14 #include "SIMZ_API.h"
15 
16 #include <UT/UT_WeakPtr.h>
17 #include <UT/UT_SharedPtr.h>
18 
19 #include <GU/GU_Detail.h>
20 
21 #include <SIM/SIM_RawField.h>
22 #include <SIM/SIM_RawIndexField.h>
23 #include <SIM/SIM_PhysicalParms.h>
24 
25 #include <GAS/GAS_SubSolver.h>
26 
27 #include <SIM/SIM_Query.h>
28 #include <SIM/SIM_QueryCombine.h>
30 
31 class SIM_GeometryCopy;
32 
33 class GU_VexGeoInputs;
34 class GA_ElementGroup;
35 
36 class OP_Caller;
37 
38 class gas_SimpleGroupCache;
39 
40 class gas_GeometryVexCache;
41 
43 {
44 public:
45  GAS_GeometryVexParms &param() { return myParms; }
46  const GAS_GeometryVexParms &param() const { return myParms; }
47 
48  OP_VERSION versionParms() const { return myVersion; }
49  void setVersionParms(OP_VERSION version) { myVersion = version; }
50 
51 protected:
52  explicit GAS_GeometryVex(const SIM_DataFactory *factory);
53  ~GAS_GeometryVex() override;
54 
55  /// Creates a SIM_QueryArrays object to treat impact as a record
57  {
58  return new SIM_QueryCombine(BaseClass::createQueryObjectSubclass(), param().createQueryObject(this));
59  }
60  void makeEqualSubclass(const SIM_Data *source) override;
61  void saveSubclass(std::ostream &os) const override
62  {
63  BaseClass::saveSubclass(os);
64  myParms.save(os);
65  }
66  bool loadSubclass(UT_IStream &is) override
67  {
68  if (!BaseClass::loadSubclass(is))
69  return false;
70  if (!myParms.load(is))
71  return false;
72  return true;
73  }
74 
75  bool solveGasSubclass(SIM_Engine &engine,
76  SIM_Object *obj,
77  SIM_Time time,
78  SIM_Time timestep) override;
79 
80  bool runVexOnGeometry(SIM_Engine &engine, SIM_Object *obj, SIM_GeometryCopy *geo, const char *geoname);
81 
82 
83 private:
84  static const SIM_DopDescription *getDopDescription();
85 
86  fpreal myTime, mySopTime, myTimeInc;
87  fpreal mySimTime, mySimFrame;
88 
89  GAS_GeometryVexParms myParms;
90  gas_GeometryVexCache *myCache;
91  OP_VERSION myVersion;
92 
96  "Gas Geometry Vex",
97  getDopDescription());
98 };
99 
100 #endif
virtual void makeEqualSubclass(const SIM_Data *source)
const GAS_GeometryVexParms & param() const
#define SIMZ_API
Definition: SIMZ_API.h:10
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
SIM_Query * createQueryObjectSubclass() const override
Creates a SIM_QueryArrays object to treat impact as a record.
uint64 OP_VERSION
Definition: OP_Version.h:6
GT_API const UT_StringHolder time
OP_VERSION versionParms() const
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
void saveSubclass(std::ostream &os) const override
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:803
GT_API const UT_StringHolder version
GLenum GLfloat param
Definition: glcorearb.h:104
fpreal64 fpreal
Definition: SYS_Types.h:277
void setVersionParms(OP_VERSION version)
GAS_GeometryVexParms & param()
bool loadSubclass(UT_IStream &is) override
This implements a SIM_Geometry that copies the source geometry.