00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __GAS_AdjustParticleCoordinates__
00023 #define __GAS_AdjustParticleCoordinates__
00024
00025 #include "GAS_API.h"
00026
00027 #include "GAS_SubSolver.h"
00028 #include "GAS_Utils.h"
00029
00030 class GEO_AttributeHandle;
00031 class GU_Detail;
00032 class UT_BoundingBox;
00033
00034 class GAS_API GAS_AdjustParticleCoordinates : public GAS_SubSolver
00035 {
00036 public:
00037 GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
00038
00039 protected:
00040 explicit GAS_AdjustParticleCoordinates(const SIM_DataFactory *factory);
00041 virtual ~GAS_AdjustParticleCoordinates();
00042
00043
00044
00045 virtual bool solveGasSubclass(SIM_Engine &engine,
00046 SIM_Object *obj,
00047 SIM_Time time,
00048 SIM_Time timestep);
00049
00050 private:
00051
00052
00053 bool getAttributes(GU_Detail *gdp,
00054 GEO_AttributeHandle &bboxMinGah,
00055 GEO_AttributeHandle &bboxMaxGah,
00056 GEO_AttributeHandle &coordinateScaleGah,
00057 GEO_AttributeHandle &transitionStateGah,
00058 GEO_AttributeHandle &periodGah,
00059 GEO_AttributeHandle &transitionLengthGah,
00060 GEO_AttributeHandle &coordinate1Gah,
00061 GEO_AttributeHandle &coordinate2Gah,
00062 GEO_AttributeHandle &lastAdjustGah);
00063
00064
00065 void initNewCoordinates(GU_Detail *gdp,
00066 const UT_BoundingBox &bbox,
00067 const UT_Vector3 &coordinateScales,
00068 GEO_AttributeHandle &coordinateGah);
00069
00070
00071 void swapCoordinates(GU_Detail *gdp,
00072 GEO_AttributeHandle &coordinate1Gah,
00073 GEO_AttributeHandle &coordinate2Gah);
00074
00075 static const SIM_DopDescription *getDopDescription();
00076
00077 DECLARE_STANDARD_GETCASTTOTYPE();
00078 DECLARE_DATAFACTORY(GAS_AdjustParticleCoordinates,
00079 GAS_SubSolver,
00080 "Gas Adjust Particle Coordinates",
00081 getDopDescription());
00082 };
00083
00084 #endif