1/****************************************************************************************
2
3 Copyright (C) 2015 Autodesk, Inc.
4 All rights reserved.
5
6 Use of this software is subject to the terms of the Autodesk license agreement
7 provided at the time of installation or download, or which otherwise accompanies
8 this software in either electronic or hard copy form.
9
10****************************************************************************************/
11
12//! \file fbxconstraintscale.h
13#ifndef _FBXSDK_SCENE_CONSTRAINT_SCALE_H_
14#define _FBXSDK_SCENE_CONSTRAINT_SCALE_H_
15
16#include <fbxsdk/fbxsdk_def.h>
17
18#include <fbxsdk/scene/constraint/fbxconstraint.h>
19
20#include <fbxsdk/fbxsdk_nsbegin.h>
21
22/**\brief This constraint class contains methods for accessing the properties of a scale constraint.
23 * A scale constraint lets you constrain the scale of an object based on the scale of one or more sources.
24 * \nosubgrouping
25 */
26class FBXSDK_DLL FbxConstraintScale : public FbxConstraint
27{
28 FBXSDK_OBJECT_DECLARE(FbxConstraintScale,FbxConstraint);
29
30public:
31 /**
32 * \name Properties
33 */
34 //@{
35 /** This property handles whether to affect x axis.
36 * Default value is true.
37 */
38 FbxPropertyT<FbxBool> AffectX;
39
40 /** This property handles whether to affect y axis.
41 * Default value is true.
42 */
43 FbxPropertyT<FbxBool> AffectY;
44
45 /** This property handles whether to affect z axis.
46 * Default value is true.
47 */
48 FbxPropertyT<FbxBool> AffectZ;
49
50 /** This property handles scaling offset.
51 * Default value is (0, 0, 0).
52 */
53 FbxPropertyT<FbxDouble3> Scaling;
54
55 /** This property handles constraint source objects.
56 */
57 FbxPropertyT<FbxReference> ConstraintSources;
58
59 /** This property handles constraint target objects.
60 */
61 FbxPropertyT<FbxReference> ConstrainedObject;
62 //@}
63
64 /** Add a source to the constraint.
65 * \param pObject New source object.
66 * \param pWeight Weight of the source object.
67 */
68 void AddConstraintSource(FbxObject* pObject, double pWeight = 100);
69
70 /** Retrieve the constraint source count.
71 * \return Current constraint source count.
72 */
73 int GetConstraintSourceCount() const;
74
75 /** Retrieve a constraint source object.
76 * \param pIndex Index of the source
77 * \return Current source at the specified index.
78 */
79 FbxObject* GetConstraintSource(int pIndex) const;
80
81 /** Set the constrained object.
82 * \param pObject The constrained object.
83 */
84 void SetConstrainedObject(FbxObject* pObject);
85
86 /** Retrieve the constrained object.
87 * \return Current constrained object.
88 */
89 FbxObject* GetConstrainedObject() const;
90
91/*****************************************************************************************************************************
92** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
93*****************************************************************************************************************************/
94#ifndef DOXYGEN_SHOULD_SKIP_THIS
95protected:
96 virtual void ConstructProperties(bool pForceSet);
97 virtual EType GetConstraintType() const;
98#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
99};
100
101#include <fbxsdk/fbxsdk_nsend.h>
102
103#endif /* _FBXSDK_SCENE_CONSTRAINT_SCALE_H_ */
104