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  int getPointSubclass() const override;
51  void setPointSubclass(int ptnum) override;
52 
53  bool getNeedsInitSubclass() const override;
54  void initAnchorSubclass(const SIM_Object *object) override;
55 
57  const SIM_Options &options,
58  const GU_DetailHandle &gdh,
59  const SIM_Relationship &rel,
60  const SIM_Time &t) const override;
61 
62  SIM_DOFType getDOFTypeSubclass() const override;
63  const UT_Vector3 getDOFVectorSubclass() const override;
64  const UT_Vector3 getOffsetSubclass() const override;
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
GLdouble GLdouble t
Definition: glew.h:1403
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
bool getNeedsInitSubclass() const override
#define SIM_NAME_FUSEPIDATTRIBNAME
Definition: SIM_Names.h:90
GLboolean reset
Definition: glew.h:4989
void buildAnchorGuideGeometrySubclass(const SIM_Options &options, const GU_DetailHandle &gdh, const SIM_Relationship &rel, const SIM_Time &t) const override
Default implementation does nothing.
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glew.h:3460
#define SIM_NAME_POINTGROUP
Definition: SIM_Names.h:166
void initAnchorSubclass(const SIM_Object *object) override
virtual int getPointSubclass() const =0
#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
GLfloat f
Definition: glcorearb.h:1925
#define SIM_NAME_OFFSETATTRIBNAME
Definition: SIM_Names.h:158