00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GAS_Rest__
00020 #define __GAS_Rest__
00021
00022 #include "GAS_API.h"
00023
00024 #include <UT/UT_ThreadedAlgorithm.h>
00025 #include <UT/UT_VoxelArray.h>
00026 #include <GU/GU_Detail.h>
00027
00028 #include <SIM/SIM_RawField.h>
00029
00030 #include "GAS_SubSolver.h"
00031 #include "GAS_Utils.h"
00032
00033 class GU_Detail;
00034 class UT_Vector4Array;
00035
00036 class GAS_API GAS_Rest : public GAS_SubSolver
00037 {
00038 public:
00039 GET_DATA_FUNC_S(GAS_NAME_FIELD, FieldName);
00040 GETSET_DATA_FUNCS_F("radius", Radius);
00041 GET_DATA_FUNC_I("filter", Filter);
00042 GET_DATA_FUNC_B("maskissdf", MaskIsSDF);
00043
00044 GET_DATA_FUNC_B(GAS_NAME_USETIMESTEP, UseTimeStep);
00045 GET_DATA_FUNC_F(GAS_NAME_TIMESCALE, TimeScale);
00046
00047 bool shouldMultiThread(SIM_RawField *field) const
00048 { return field->field()->numTiles() > 1; }
00049
00050 protected:
00051 explicit GAS_Rest(const SIM_DataFactory *factory);
00052 virtual ~GAS_Rest();
00053
00054
00055
00056 virtual bool solveGasSubclass(SIM_Engine &engine,
00057 SIM_Object *obj,
00058 SIM_Time time,
00059 SIM_Time timestep);
00060
00061
00062 THREADED_METHOD2_CONST(GAS_Rest, shouldMultiThread(dst),
00063 buildRest,
00064 SIM_RawField *, dst,
00065 int, axis);
00066 void buildRestPartial(SIM_RawField *field,
00067 int axis,
00068 const UT_JobInfo &info) const;
00069
00070 private:
00071 static const SIM_DopDescription *getDopDescription();
00072
00073 DECLARE_STANDARD_GETCASTTOTYPE();
00074 DECLARE_DATAFACTORY(GAS_Rest,
00075 GAS_SubSolver,
00076 "Gas Rest",
00077 getDopDescription());
00078 };
00079
00080 #endif