HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_ConAnchorObjPointGroupPos.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_ConAnchorObjPointGroupPos.h ( SIM Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __SIM_ConAnchorObjPointGroupPos__
12 #define __SIM_ConAnchorObjPointGroupPos__
13 
14 #include "SIM_API.h"
16 
18 {
19 public:
20  /// Store the group of points we are anchored to.
22 
26  GETSET_DATA_FUNCS_S(SIM_NAME_FUSEPIDATTRIBNAME, IdentifierAttribute);
27 
28  /// Access the list of object points directly,
29  /// (for example, when SIM_ConstraintIterator is not used)
30  const UT_IntArray& points() const;
31 
32  /// reset(), nextPoint() and atEnd() are used by SIM_ConstraintIterator
33  /// SIM_ConstraintIterator makes the base class SIM_ConAnchorObjPointPos
34  /// behave as a proxy for the individual points in the group
35 
36  /// Reset the current point to the first one in the group.
37  void reset() const;
38 
39  /// Move to the next point in the group.
40  /// This will not move beyond the last point in the group.
41  void nextPoint() const;
42 
43  /// Whether we have already reached final point in the group.
44  bool atEnd() const;
45 
46 protected:
49 
50  virtual int getPointSubclass() const;
51  virtual void setPointSubclass(int ptnum);
52 
53  virtual bool getNeedsInitSubclass() const;
54  virtual void initAnchorSubclass(const SIM_Object *object);
55 
57  const SIM_Options &options,
58  const GU_DetailHandle &gdh,
59  const SIM_Relationship &rel,
60  const SIM_Time &t) const;
61 
62  virtual SIM_DOFType getDOFTypeSubclass() const;
63  virtual const UT_Vector3 getDOFVectorSubclass() const;
64  virtual const UT_Vector3 getOffsetSubclass() const;
65 
66 private:
67  UT_IntArray myPoints;
68  mutable int myPointsIdx;
69  mutable bool myAtEnd;
70 
71  void cachePoints();
72 
73  static const SIM_DopDescription *getDopDescription();
74 
78  "Anchor: Object Point Group Position",
79  getDopDescription());
80 };
81 
82 #endif
83 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
virtual const UT_Vector3 getOffsetSubclass() const
virtual SIM_DOFType getDOFTypeSubclass() const
virtual const UT_Vector3 getDOFVectorSubclass() const
GETSET_DATA_FUNCS_S(SIM_NAME_GEOMETRY, GeometryName)
virtual void setPointSubclass(int ptnum)=0
virtual void initAnchorSubclass(const SIM_Object *object)
virtual void buildAnchorGuideGeometrySubclass(const SIM_Options &options, const GU_DetailHandle &gdh, const SIM_Relationship &rel, const SIM_Time &t) const
Default implementation does nothing.
GLboolean reset
Definition: glew.h:4959
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
GLclampf f
Definition: glew.h:3499
#define SIM_NAME_FUSEPIDATTRIBNAME
Definition: SIM_Names.h:90
#define SIM_NAME_POINTGROUP
Definition: SIM_Names.h:166
virtual int getPointSubclass() const =0
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glew.h:3446
#define SIM_NAME_CONDOFATTRIBNAME
Definition: SIM_Names.h:92
#define SIM_API
Definition: SIM_API.h:10
#define SIM_NAME_CONDIRATTRIBNAME
Definition: SIM_Names.h:89
#define SIM_NAME_OFFSETATTRIBNAME
Definition: SIM_Names.h:158
virtual bool getNeedsInitSubclass() const
GLdouble GLdouble t
Definition: glew.h:1398