HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_ConAnchorObjPointGroupRot.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_ConAnchorObjPointGroupRot.h ( SIM Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __SIM_ConAnchorObjPointGroupRot__
12 #define __SIM_ConAnchorObjPointGroupRot__
13 
15 #include "SIM_DopDescription.h"
16 #include "SIM_PRMShared.h"
17 
19 {
20 public:
21  /// The point group that we are anchored to.
23 
27 
28  /// Resets the current point to the first in the group.
29  void reset() const;
30 
31  /// Moves the current point to the next one.
32  /// This will not move beyond the last point in the group.
33  void nextPoint() const;
34 
35  /// Whether we have already reached the last point in the group.
36  bool atEnd() const;
37 
38 protected:
41 
42  int getPointSubclass() const override;
43  void setPointSubclass(int ptnum) override;
44 
45  bool getNeedsInitSubclass() const override;
46  void initAnchorSubclass(const SIM_Object *object) override;
47 
49  const SIM_Options &options,
50  const GU_DetailHandle &gdh,
51  const SIM_Relationship &rel,
52  const SIM_Time &time) const override;
53 
54 
55  const UT_Vector3 getRotationSubclass() const override;
56  SIM_DOFType getDOFTypeSubclass() const override;
57  const UT_Vector3 getDOFVectorSubclass() const override;
58 
59 private:
60  UT_IntArray myPoints;
61  mutable int myPointsIdx;
62  mutable bool myAtEnd;
63 
64  void cachePoints();
65 
66  static const SIM_DopDescription *getDopDescription();
67 
71  "Anchor: Object Point Group Rotation",
72  getDopDescription());
73 };
74 
75 #endif
76 
virtual SIM_DOFType getDOFTypeSubclass() const
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define SIM_NAME_ROTATIONATTRIBNAME
Definition: SIM_Names.h:179
GT_API const UT_StringHolder time
void buildAnchorGuideGeometrySubclass(const SIM_Options &options, const GU_DetailHandle &gdh, const SIM_Relationship &rel, const SIM_Time &t) const override
Default implementation does nothing.
bool getNeedsInitSubclass() const override
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
GETSET_DATA_FUNCS_S(SIM_NAME_GEOMETRY, GeometryName)
GLfloat f
Definition: glcorearb.h:1926
GLboolean reset
Definition: glad.h:5138
virtual int getPointSubclass() const =0
void initAnchorSubclass(const SIM_Object *object) override
virtual const UT_Vector3 getRotationSubclass() const
SIM_DOFType
We need better names for these.
#define SIM_NAME_POINTGROUP
Definition: SIM_Names.h:166
#define SIM_NAME_CONDOFATTRIBNAME
Definition: SIM_Names.h:92
#define SIM_API
Definition: SIM_API.h:12
#define SIM_NAME_CONDIRATTRIBNAME
Definition: SIM_Names.h:89
virtual void setPointSubclass(int ptnum)=0
virtual const UT_Vector3 getDOFVectorSubclass() const