HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  virtual void initializeSubclass();
67 
68  virtual bool getIsAlternateRepresentationSubclass() const;
69  virtual void initAlternateRepresentationSubclass(const SIM_Data &);
70  virtual SIM_Guide *createGuideObjectSubclass() const;
71  virtual void buildGuideGeometrySubclass(const SIM_RootData &root,
72  const SIM_Options &options,
73  const GU_DetailHandle &gdh,
74  UT_DMatrix4 *xform,
75  const SIM_Time &t) const;
76 
77 private:
78 
79  static UT_Vector2 detectRange(
80  const GU_Detail *igdp,
81  const GA_ROHandleF &vish,
82  bool forcescalar,
83  SIM_VisType vistype);
84 
85  static const SIM_DopDescription *getParticleFieldVisualizationDopDescription();
86 
87  const SIM_Geometry *myGeometry;
88 
90 
92  SIM_Data,
93  "ParticleFieldVisualization",
94  getParticleFieldVisualizationDopDescription());
95 };
96 
97 #endif
#define SIM_NAME_SHOWGUIDE
Definition: SIM_Names.h:185
#define SIMZ_API
Definition: SIMZ_API.h:10
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#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:58
#define GET_GUIDE_FUNC_V2(DataName, FuncName, Default)
This class holds a signed distance function representing a GU_Detail.
#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()