FBX C++ API Reference
fbxcollection.h
Go to the documentation of this file.
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 
13 #ifndef _FBXSDK_SCENE_COLLECTION_H_
14 #define _FBXSDK_SCENE_COLLECTION_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #include <fbxsdk/core/fbxobject.h>
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
22 class FbxCriteria;
23 
29 {
31 
32 public:
37  virtual void Clear();
39 
43  virtual bool AddMember(FbxObject* pMember) { return ConnectSrcObject(pMember); }
44 
48  virtual bool RemoveMember(FbxObject* pMember) { return DisconnectSrcObject(pMember); }
49 
53  inline int GetMemberCount () const { return GetSrcObjectCount(); }
54 
59  inline FbxObject* GetMember(int pIndex=0) const { return GetSrcObject(pIndex); }
60 
65  virtual bool IsMember(const FbxObject* pMember) const;
67 
74  template <class T> inline int GetMemberCount() const { return GetSrcObjectCount<T>(); }
75 
79  template <class T> inline T* GetMember(int pIndex=0) const { return GetSrcObject<T>(pIndex); }
80 
83  template <class T> inline T* FindMember(const char* pName) const { return FindSrcObject<T>(pName); }
85 
94  inline int GetMemberCount(const FbxCriteria& pCriteria) const { return GetSrcObjectCount(pCriteria); }
95 
101  inline FbxObject* GetMember(const FbxCriteria& pCriteria, int pIndex=0) const { return GetSrcObject(pCriteria, pIndex); }
102 
108  inline FbxObject* FindMember(const FbxCriteria& pCriteria, const char* pName) const { return FindSrcObject(pCriteria, pName); }
110 
118  virtual void SetSelectedAll(bool pSelection);
120 };
121 
122 #include <fbxsdk/fbxsdk_nsend.h>
123 
124 #endif /* _FBXSDK_SCENE_COLLECTION_H_ */
#define FBXSDK_OBJECT_DECLARE(Class, Parent)
Macro used to declare a new class derived from FbxObject.
Definition: fbxobject.h:61
int GetMemberCount(const FbxCriteria &pCriteria) const
Returns the number of objects contained within the collection that meet the specified criteria...
Definition: fbxcollection.h:94
FBX SDK environment definition.
FbxObject * FindMember(const FbxCriteria &pCriteria, const char *pName) const
Searches for a member with the given name that also meets the given criteria.
T * GetMember(int pIndex=0) const
Returns the member of class T at the given index in the collection.
Definition: fbxcollection.h:79
int GetMemberCount() const
Returns the number of objects contained within the collection.
Definition: fbxcollection.h:53
FbxObject * GetMember(int pIndex=0) const
Returns the member of the collection at the given index.
Definition: fbxcollection.h:59
T * FindMember(const char *pName) const
Searches for a member of class T.
Definition: fbxcollection.h:83
int GetMemberCount() const
Returns the number of class T objects contained within the collection.
Definition: fbxcollection.h:74
FbxObject * GetMember(const FbxCriteria &pCriteria, int pIndex=0) const
Returns the member at the given index in the collection if it meets the specified criteria...
FbxObject * GetSrcObject(int pIndex=0) const
Returns the source object with which this object connects at the specified index. ...
Definition: fbxobject.h:462
The base class of most FBX objects.
Definition: fbxobject.h:157
bool ConnectSrcObject(FbxObject *pObject, FbxConnection::EType pType=FbxConnection::eNone)
Connects this object to a source object.
Definition: fbxobject.h:422
Defines a filtering criteria for a query of objects, connections and properties, so that only those s...
Definition: fbxquery.h:104
bool DisconnectSrcObject(FbxObject *pObject)
Disconnects this object from a source object.
Definition: fbxobject.h:434
virtual bool AddMember(FbxObject *pMember)
Adds a member.
Definition: fbxcollection.h:43
FbxObject * FindSrcObject(const char *pName, int pStartIndex=0) const
Searches the source object with the specified name, starting at the specified index.
Definition: fbxobject.h:476
int GetSrcObjectCount() const
Returns the number of source objects with which this object connects.
Definition: fbxobject.h:450
A FbxObject derived container for FbxObject.
Definition: fbxcollection.h:28
#define FBXSDK_DLL
Definition: fbxarch.h:173
virtual bool RemoveMember(FbxObject *pMember)
Removes a member.
Definition: fbxcollection.h:48