HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_ConAnchorObjSpatial.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_ConAnchorObjSpatial_h__
9 #define __SIM_ConAnchorObjSpatial_h__
10 
11 #include "SIM_API.h"
12 #include <UT/UT_Vector3.h>
13 #include "SIM_ConAnchorSpatial.h"
14 
16 {
17 public:
19  /// Object-space offset.
21 
22  /// This value represents the desired world-space position of the
23  /// constraint. Every spatial constraint must be able to initialize
24  /// itself using this world space position.
25  GETSET_DATA_FUNCS_V3(SIM_NAME_WORLDSPACEPOS, WorldSpacePosition);
26  /// This value must be true to force the constraint to initialize
27  /// itself from the provided world space position. Otherwise the
28  /// constraint-specific parameters are used directly.
29  GETSET_DATA_FUNCS_B(SIM_NAME_USEWORLDSPACEPOS, UseWorldSpacePosition);
30 
31  /// Overridable get/set for Offset
32  const UT_Vector3 getOffset() const;
33  void setOffset(const UT_Vector3 &vector);
34 
35 protected:
36  explicit SIM_ConAnchorObjSpatial(const SIM_DataFactory *f);
37  ~SIM_ConAnchorObjSpatial() override;
38 
39  bool getNeedsInitSubclass() const override;
40  void initAnchorSubclass(const SIM_Object *object) override;
42  UT_String &str) const override;
43 
44  void initParmsFromWorldSpacePosition(
45  const UT_Vector3 &worldspacepos,
46  const SIM_Object *object);
47 
48  virtual void initParmsFromWorldSpacePositionSubclass(
49  const UT_Vector3 &worldspacepos,
50  const SIM_Object *object) = 0;
51 
52  virtual const UT_Vector3 getOffsetSubclass() const;
53 
54 private:
57 };
58 
59 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define DECLARE_CLASSNAME(DataClass, SuperClass)
Definition: SIM_DataUtils.h:20
virtual bool getObjectSpecificationSubclass(UT_String &str) const
Implements the real functionality of getObjectSpecification.
#define GETSET_DATA_FUNCS_B(DataName, FuncName)
#define SIM_NAME_USEWORLDSPACEPOS
Definition: SIM_Names.h:212
#define GETSET_DATA_FUNCS_S(DataName, FuncName)
virtual void initAnchorSubclass(const SIM_Object *object)
GLfloat f
Definition: glcorearb.h:1926
virtual bool getNeedsInitSubclass() const
GETSET_DATA_FUNCS_V3(SIM_NAME_CONDIR, DOFVectorInput)
#define SIM_NAME_OBJECT
Definition: SIM_Names.h:225
#define SIM_API
Definition: SIM_API.h:12
#define SIM_NAME_OFFSET
Definition: SIM_Names.h:157
#define SIM_NAME_WORLDSPACEPOS
Definition: SIM_Names.h:219