HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 
27  /// Access the list of object points directly,
28  /// (for example, when SIM_ConstraintIterator is not used)
29  const UT_IntArray& points() const;
30 
31  /// reset(), nextPoint() and atEnd() are used by SIM_ConstraintIterator
32  /// SIM_ConstraintIterator makes the base class SIM_ConAnchorObjPointPos
33  /// behave as a proxy for the individual points in the group
34 
35  /// Reset the current point to the first one in the group.
36  void reset() const;
37 
38  /// Move to the next point in the group.
39  /// This will not move beyond the last point in the group.
40  void nextPoint() const;
41 
42  /// Whether we have already reached final point in the group.
43  bool atEnd() const;
44 
45 protected:
48 
49  virtual int getPointSubclass() const;
50  virtual void setPointSubclass(int ptnum);
51 
52  virtual bool getNeedsInitSubclass() const;
53  virtual void initAnchorSubclass(const SIM_Object *object);
54 
56  const SIM_Options &options,
57  const GU_DetailHandle &gdh,
58  const SIM_Relationship &rel,
59  const SIM_Time &t) const;
60 
61  virtual SIM_DOFType getDOFTypeSubclass() const;
62  virtual const UT_Vector3 getDOFVectorSubclass() const;
63  virtual const UT_Vector3 getOffsetSubclass() const;
64 
65 private:
66  UT_IntArray myPoints;
67  mutable int myPointsIdx;
68  mutable bool myAtEnd;
69 
70  void cachePoints();
71 
72  static const SIM_DopDescription *getDopDescription();
73 
77  "Anchor: Object Point Group Position",
78  getDopDescription());
79 };
80 
81 #endif
82 
#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.
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
GLfloat f
Definition: glcorearb.h:1925
#define SIM_NAME_POINTGROUP
Definition: SIM_Names.h:165
virtual int getPointSubclass() const =0
#define SIM_NAME_CONDOFATTRIBNAME
Definition: SIM_Names.h:91
#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:157
virtual bool getNeedsInitSubclass() const