HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SIM_SlicePlane.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  */
7 
8 #ifndef __SIM_SlicePlane_h__
9 #define __SIM_SlicePlane_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_Slice.h"
13 #include "SIM_OptionsUser.h"
14 
16  public SIM_OptionsUser
17 {
18 public:
19  /// Control the force attribute.
20  GETSET_DATA_FUNCS_V3("dir", SliceDirection);
21  /// Control the position attribute.
23 
24 protected:
25  explicit SIM_SlicePlane(const SIM_DataFactory *factory);
26  virtual ~SIM_SlicePlane();
27 
28  /// Returns the distance to the slice's boundary. If the point
29  /// is inside the slice this is a negative distance, else positive.
30  /// This is what must be overridden to make the slice do something
31  /// interesting
32  virtual fpreal getSliceBoundaryDistSubclass(const UT_Vector3 &pos) const;
33 
34  /// Which side of our parent we are on
35  virtual UT_Vector3 getCenterSubclass() const { return myPos; }
36 
37  virtual SIM_Guide *createGuideObjectSubclass() const;
38  /// We override this method to create the fan geometry.
39  virtual void buildGuideGeometrySubclass(const SIM_RootData &root,
40  const SIM_Options &options,
41  const GU_DetailHandle &gdh,
42  UT_DMatrix4 *xform,
43  const SIM_Time &t) const;
44 
45  /// Update our cached position and size so we can store pre-normalized
46  /// values to speed up detection
47  virtual void optionChangedSubclass(const char *name);
48 
49 private:
50  static const SIM_DopDescription *getSlicePlaneDopDescription();
51 
52  UT_Vector3 myDir, myPos;
53  fpreal myOffset;
54 
57  SIM_Slice,
58  "Slice by Plane",
59  getSlicePlaneDopDescription());
60 };
61 
62 #endif
63 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
virtual void optionChangedSubclass(const char *name)
virtual void buildGuideGeometrySubclass(const SIM_RootData &root, const SIM_Options &options, const GU_DetailHandle &gdh, UT_DMatrix4 *xform, const SIM_Time &t) const
#define GETSET_DATA_FUNCS_V3(DataName, FuncName)
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
virtual UT_Vector3 getCenterSubclass() const
Which side of our parent we are on.
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual fpreal getSliceBoundaryDistSubclass(const UT_Vector3 &pos) const =0
#define SIM_NAME_POSITION
Definition: SIM_Names.h:167
double fpreal
Definition: SYS_Types.h:263
#define SIM_API
Definition: SIM_API.h:10
virtual SIM_Guide * createGuideObjectSubclass() const