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 fbxselectionnode.h
13#ifndef _FBXSDK_SCENE_SELECTION_NODE_H_
14#define _FBXSDK_SCENE_SELECTION_NODE_H_
15
16#include <fbxsdk/fbxsdk_def.h>
17
18#include <fbxsdk/core/fbxobject.h>
19
20#include <fbxsdk/fbxsdk_nsbegin.h>
21
22/** FbxSelectionNode is an auxiliary class for Selection Set.
23* \nosubgrouping
24* Used to group objects with their components (e.g. vertex, edge, and face), when adding it to a selection set (FbxSelectionSet).
25* \see FbxSelectionSet
26*/
27class FBXSDK_DLL FbxSelectionNode : public FbxObject
28{
29 FBXSDK_OBJECT_DECLARE(FbxSelectionNode, FbxObject);
30
31public:
32 /** \enum ESelectType SelectionNode type identifier.
33 * - \e eVertexLevel Vertex level selection.
34 * - \e eEdgeLevel Edge level selection.
35 * - \e eFaceLevel Face level selection.
36 * - \e eObjectLevel Object level selection.
37 * - \e eSelectTypeCount Number of Select Types.
38 */
39 enum ESelectType
40 {
41 eVertexLevel,
42 eEdgeLevel,
43 eFaceLevel,
44 eObjectLevel,
45 eSelectTypeCount
46 };
47
48 /** Set an object whose components or itself is contained in the SelectionNode.
49 * \param pObject The object whose components or itself is contained in the SelectionNode.
50 * \return \c true if the object is set successfully. \c false otherwise.
51 * \remarks It is possible a SDK user will try to set multiple objects to one SelectionNode, but only the last one will be kept.
52 */
53 bool SetSelectionObject(FbxObject* pObject);
54
55 /** Get the object whose components or itself or both are contained in the SelectionNode.
56 * \return The object whose components or itself or both are contained in the SelectionNode.
57 */
58 FbxObject* GetSelectionObject() const;
59
60 /** To detect if the SelectionNode is valid.
61 * \return \c true if this is a valid SelectionNode. \c false otherwise.
62 * \remarks SelectionNode is valid if selection object is set.
63 * SelectionNode is not valid if no selection object is set.
64 */
65 bool IsValid() const;
66
67 /** \c true means the object itself is also in the selection set;
68 * \c false means only the object's components are in the selection set, the object is not.
69 */
70 bool mIsTheNodeInSet;
71
72 /** Index array for selected vertices.
73 */
74 FbxArray<int> mVertexIndexArray;
75
76 /** Index array for selected edges.
77 */
78 FbxArray<int> mEdgeIndexArray;
79
80 /** Index array for selected faces.
81 */
82 FbxArray<int> mPolygonIndexArray;
83
84/*****************************************************************************************************************************
85** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
86*****************************************************************************************************************************/
87#ifndef DOXYGEN_SHOULD_SKIP_THIS
88 FbxArray<FbxArray<int>*> mSubTypeSelectArray;
89 static const char* SELECT_TYPE_NAMES[(int)eSelectTypeCount];
90
91protected:
92 virtual void Construct(const FbxObject* pFrom);
93 bool ConnectNotify (FbxConnectEvent const &pEvent);
94#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
95};
96
97#include <fbxsdk/fbxsdk_nsend.h>
98
99#endif /* _FBXSDK_SCENE_SELECTION_NODE_H_ */
100