HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  virtual ~SIM_ConAnchorObjSpatial();
38 
39  virtual bool getNeedsInitSubclass() const;
40  virtual void initAnchorSubclass(const SIM_Object *object);
41  virtual bool getObjectSpecificationSubclass(UT_String &str) const;
42 
43  void initParmsFromWorldSpacePosition(
44  const UT_Vector3 &worldspacepos,
45  const SIM_Object *object);
46 
47  virtual void initParmsFromWorldSpacePositionSubclass(
48  const UT_Vector3 &worldspacepos,
49  const SIM_Object *object) = 0;
50 
51  virtual const UT_Vector3 getOffsetSubclass() const;
52 
53 private:
56 };
57 
58 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#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:211
#define GETSET_DATA_FUNCS_S(DataName, FuncName)
virtual void initAnchorSubclass(const SIM_Object *object)
GLfloat f
Definition: glcorearb.h:1925
virtual bool getNeedsInitSubclass() const
GETSET_DATA_FUNCS_V3(SIM_NAME_CONDIR, DOFVectorInput)
#define SIM_NAME_OBJECT
Definition: SIM_Names.h:224
#define SIM_API
Definition: SIM_API.h:10
#define SIM_NAME_OFFSET
Definition: SIM_Names.h:156
#define SIM_NAME_WORLDSPACEPOS
Definition: SIM_Names.h:218