HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_ParticleFieldVisualization.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: SIM_ParticleFieldVisualization.h ( SIM Library, C++)
7  *
8  * COMMENTS:
9  * Used to visualize a field of particles within DOPs
10  *
11  */
12 
13 #ifndef __SIM_ParticleFieldVisualization_H__
14 #define __SIM_ParticleFieldVisualization_H__
15 
16 #include "SIMZ_Utils.h"
17 
18 #include <SIM/SIM_OptionsUser.h>
19 #include <SIM/SIM_DataUtils.h>
20 #include <SIM/SIM_Data.h>
21 
22 #include <GA/GA_Handle.h>
23 
24 #include <UT/UT_Vector2.h>
25 #include <UT/UT_Vector3.h>
26 #include <UT/UT_Color.h>
27 
28 class SIM_Geometry;
29 
31 {
36 };
37 
38 /// This class holds a signed distance function representing a GU_Detail.
40  public SIM_OptionsUser
41 {
42 public:
43  GET_GUIDE_FUNC_B(SIM_NAME_SHOWGUIDE, ShowGuide, true);
45 
46  GET_GUIDE_FUNC_I("visprim", VisPrim, 0);
47 
48  GET_GUIDE_FUNC_F("scale", Scale, 1.0);
49  GET_GUIDE_FUNC_S("spriteshop", SpriteShop, "");
50  GET_GUIDE_FUNC_S("grainsoppath", GrainSopPath, "");
51 
52  GET_GUIDE_FUNC_S("guideattrib", GuideVisAttrib, "");
53  GET_GUIDE_FUNC_I("guidevistype", GuideVisType, 0);
54  GET_GUIDE_FUNC_I("guidevismode", GuideVisMode, 0);
55  GET_GUIDE_FUNC_F("guidevisscale", GuideVisScale, 1.0);
56  GET_GUIDE_FUNC_B("guidedetectrange", GuideDetectRange, true);
57  GET_GUIDE_FUNC_V2("guiderange", GuideRange, (0, 1));
58 
59  GET_GUIDE_FUNC_RAMP("guidevisramp", GuideVisRamp);
60 
61 protected:
62  explicit SIM_ParticleFieldVisualization(const SIM_DataFactory *factory);
64 
65  /// Overrides to properly implement this class as a SIM_Data.
66  void initializeSubclass() override;
67 
68  bool getIsAlternateRepresentationSubclass() const override;
70  const SIM_Data &) override;
71  SIM_Guide *createGuideObjectSubclass() const override;
73  const SIM_Options &options,
74  const GU_DetailHandle &gdh,
75  UT_DMatrix4 *xform,
76  const SIM_Time &t
77  ) const override;
78 
79 private:
80 
81  static UT_Vector2 detectRange(
82  const GU_Detail *igdp,
83  const GA_ROHandleF &vish,
84  bool forcescalar,
85  SIM_VisType vistype);
86 
87  static const SIM_DopDescription *getParticleFieldVisualizationDopDescription();
88 
89  const SIM_Geometry *myGeometry;
90 
92 
94  SIM_Data,
95  "ParticleFieldVisualization",
96  getParticleFieldVisualizationDopDescription());
97 };
98 
99 #endif
#define SIM_NAME_SHOWGUIDE
Definition: SIM_Names.h:186
#define SIMZ_API
Definition: SIMZ_API.h:10
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define GET_GUIDE_FUNC_I(DataName, FuncName, Default)
virtual bool getIsAlternateRepresentationSubclass() const
#define GET_GUIDE_FUNC_RAMP(DataName, FuncName)
#define GET_GUIDE_FUNC_V3(DataName, FuncName, Default)
#define GET_GUIDE_FUNC_F(DataName, FuncName, Default)
virtual void buildGuideGeometrySubclass(const SIM_RootData &root, const SIM_Options &options, const GU_DetailHandle &gdh, UT_DMatrix4 *xform, const SIM_Time &t) const
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define GET_GUIDE_FUNC_V2(DataName, FuncName, Default)
This class holds a signed distance function representing a GU_Detail.
GLdouble t
Definition: glad.h:2397
#define GET_GUIDE_FUNC_S(DataName, FuncName, Default)
virtual void initAlternateRepresentationSubclass(const SIM_Data &)
#define SIM_NAME_COLOR
Definition: SIM_Names.h:87
#define GET_GUIDE_FUNC_B(DataName, FuncName, Default)
virtual SIM_Guide * createGuideObjectSubclass() const
virtual void initializeSubclass()