| 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 fbxselectionset.h |
| 13 | #ifndef _FBXSDK_SCENE_SELECTION_SET_H_ |
| 14 | #define _FBXSDK_SCENE_SELECTION_SET_H_ |
| 15 | |
| 16 | #include <fbxsdk/fbxsdk_def.h> |
| 17 | |
| 18 | #include <fbxsdk/scene/fbxcollection.h> |
| 19 | #include <fbxsdk/scene/fbxselectionnode.h> |
| 20 | |
| 21 | #include <fbxsdk/fbxsdk_nsbegin.h> |
| 22 | |
| 23 | /** FBX SDK selection set class. |
| 24 | * \nosubgrouping |
| 25 | * Represents a set of selected objects (FbxObject) and components. This is a non-exclusive (multiple membership) collection. |
| 26 | * Objects (FbxObject) can be added to a FbxSelectionSet directly, but to add components (vertexes, edges, or faces) |
| 27 | * you create a selection node (FbxSelectionNode) to group the object and its components together as a single item to be added. |
| 28 | * \see FbxSelectionNode |
| 29 | */ |
| 30 | class FBXSDK_DLL FbxSelectionSet : public FbxCollection |
| 31 | { |
| 32 | FBXSDK_OBJECT_DECLARE(FbxSelectionSet, FbxCollection); |
| 33 | |
| 34 | public: |
| 35 | /** This property stores annotation of the selection set. |
| 36 | * Default value is "". |
| 37 | */ |
| 38 | FbxPropertyT<FbxString> SelectionSetAnnotation; |
| 39 | |
| 40 | /** |
| 41 | * \name Utility functions |
| 42 | */ |
| 43 | //@{ |
| 44 | |
| 45 | /** Get the selected faces of a specified object. |
| 46 | * \param pObj The specified object. |
| 47 | * \param pPolygonIndexArray The array to take the indices of the selected faces. |
| 48 | * \remarks The indices of selected faces will be put in pPolygonIndexArray. |
| 49 | */ |
| 50 | void GetFaceSelection( FbxObject* pObj,FbxArray<int>& pPolygonIndexArray ) const; |
| 51 | |
| 52 | /** Get the selected edges of a specified object. |
| 53 | * \param pObj The specified object. |
| 54 | * \param pEdgeIndexArray The array to take the indices of the selected edges. |
| 55 | * \remarks The indices of selected face will be put in pEdgeIndexArray. |
| 56 | */ |
| 57 | void GetEdgeSelection( FbxObject* pObj,FbxArray<int>& pEdgeIndexArray ) const; |
| 58 | |
| 59 | /** Get the selected vertices of a specified object. |
| 60 | * \param pObj The specified object. |
| 61 | * \param pVertexIndexArray The array to take the indices of the selected vertices. |
| 62 | * \remarks The indices of selected face will be put in pVertexIndexArray. |
| 63 | */ |
| 64 | void GetVertexSelection( FbxObject* pObj,FbxArray<int>& pVertexIndexArray ) const; |
| 65 | |
| 66 | /** Get list of two types of member in the selection set: SelectionNodes and Directly contained objects. |
| 67 | * \param pSelectionNodeList The array to take selection nodes of the selection set. |
| 68 | * \param pDirectObjectList The array to take directly contained objects of the selection set. |
| 69 | * \remarks There might be two types members for a selection set: selection node and directly contained object. |
| 70 | * They will be listed in pSelectionNodeList and pDirectObjectList separately. |
| 71 | */ |
| 72 | void GetSelectionNodesAndDirectObjects(FbxArray<FbxSelectionNode*> &pSelectionNodeList, FbxArray<FbxObject*> &pDirectObjectList) const; |
| 73 | |
| 74 | //@} |
| 75 | |
| 76 | /***************************************************************************************************************************** |
| 77 | ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** |
| 78 | *****************************************************************************************************************************/ |
| 79 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 80 | protected: |
| 81 | virtual void ConstructProperties(bool pForceSet); |
| 82 | #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ |
| 83 | }; |
| 84 | |
| 85 | #include <fbxsdk/fbxsdk_nsend.h> |
| 86 | |
| 87 | #endif /* _FBXSDK_SCENE_SELECTION_SET_H_ */ |
| 88 | |