Classes | Public Member Functions | Static Public Member Functions

KFbxCriteria Class Reference

This reference page is linked to from the following overview topics: FBX Objects, List of Python FBX classes.


Search for all occurrences

Detailed Description

Defines a filtering criteria for a query of objects, connections and properties, so that only those satisfying the criteria are affected by the query.

Some examples of kinds of criteria are object type, connection type, or property. Criteria can be combined using logical operators such as "and" and "or"

Note:
Objects are basic elements in FBX. Each of them has a hierarchy type and some properties. Objects and properties can be connected through a connection to represent a relationship between them. (e.g. child-parent, container membership, reference, etc.,). In a query, you could select object or properties based on these criteria. Here are some examples:
 KFbxObject* lObject = KFbxObject::Create(lManager, "Object");
 int lSrcReferencedObjectCount = lObject->RootProperty.GetSrcObjectCount(KFbxCriteria::ConnectionType(eFbxConnectionReference));
 int lSrcLightCount = lObject->RootProperty.GetSrcObjectCount(KFbxCriteria::ObjectType(KFbxLight::ClassId));
 int lSrcDeformerCount = lObject->RootProperty.GetSrcObjectCount(KFbxCriteria::ObjectIsA(KFbxDeformer::ClassId));
 int lSrcPropertyCount = lObject->RootProperty.GetSrcCount(KFbxCriteria::Property());
See also:
KFbxQuery
KFbxProperty::GetSrcObjectCount(KFbxCriteria const &) const
KFbxCollection::GetMemberCount(KFbxCriteria) const
KFbxLibrary::ImportAssets(KFbxLibrary*, const KFbxCriteria&)

Definition at line 448 of file kfbxquery.h.

#include <kfbxquery.h>

List of all members.

Classes

class   KFbxCriteriaCache
class   KFbxCriteriaClassIdCompare

Public Member Functions

  KFbxCriteria ()
  Default constructor.
  KFbxCriteria (KFbxCriteria const &pCriteria)
  Copy constructor.
  ~KFbxCriteria ()
  Destructor.
KFbxCriteria operator= (KFbxCriteria const &pCriteria)
  Assignment operator.
KFbxCriteria  operator&& (KFbxCriteria const &pCriteria) const
  Gets a logical conjunction (and) criteria from this and the specified criteria.
KFbxCriteria  operator|| (KFbxCriteria const &pCriteria) const
  Gets a logical disjunction (or) criteria from this and the specified criteria.
KFbxCriteria  operator! () const
  Returns a negated version of the criteria.
KFbxQuery GetQuery () const
  Retrieves the query.

Static Public Member Functions

static KFbxCriteria  ConnectionType (kFbxConnectionType pConnectionType)
  Creates a new query criteria that only selects the specific connection type.
static KFbxCriteria  ObjectType (kFbxClassId pClassId)
  Creates a new query criteria that only selects objects which have a specific class ID or derive from a class with a specific class ID.
static KFbxCriteria  ObjectIsA (kFbxClassId pClassId)
  Creates a new query criteria that only selects objects which have a specific class ID.
static KFbxCriteria  Property ()
  Creates a new query criteria that only selects properties.

Constructor & Destructor Documentation

KFbxCriteria ( ) [inline]

Default constructor.

Definition at line 482 of file kfbxquery.h.

                : mQuery(0)
            {
            }
KFbxCriteria ( KFbxCriteria const &  pCriteria ) [inline]

Copy constructor.

Parameters:
pCriteria The criteria to be copied

Definition at line 490 of file kfbxquery.h.

                : mQuery(pCriteria.mQuery)
            {
                if( mQuery )
                    mQuery->Ref();
            }
~KFbxCriteria ( ) [inline]

Destructor.

Definition at line 498 of file kfbxquery.h.

            {
                if( mQuery )
                    mQuery->Unref();
            }

Member Function Documentation

static KFbxCriteria ConnectionType ( kFbxConnectionType  pConnectionType ) [inline, static]

Creates a new query criteria that only selects the specific connection type.

Parameters:
pConnectionType The connection type to query

Definition at line 453 of file kfbxquery.h.

            {
                return KFbxCriteria(KFbxQueryConnectionType::Create(pConnectionType));
            }
static KFbxCriteria ObjectType ( kFbxClassId  pClassId ) [inline, static]

Creates a new query criteria that only selects objects which have a specific class ID or derive from a class with a specific class ID.

Parameters:
pClassId The base type class ID

Definition at line 462 of file kfbxquery.h.

            {
                return KFbxCriteria(*sCache.GetObjectType(pClassId));
            }
static KFbxCriteria ObjectIsA ( kFbxClassId  pClassId ) [inline, static]

Creates a new query criteria that only selects objects which have a specific class ID.

Parameters:
pClassId The type class ID

Definition at line 470 of file kfbxquery.h.

            {
                return KFbxCriteria(KFbxQueryIsA::Create(pClassId));
            }
static KFbxCriteria Property ( ) [inline, static]

Creates a new query criteria that only selects properties.

Definition at line 476 of file kfbxquery.h.

KFbxCriteria& operator= ( KFbxCriteria const &  pCriteria ) [inline]

Assignment operator.

Parameters:
pCriteria The criteria to be copied

Definition at line 507 of file kfbxquery.h.

            {
                if( this != &pCriteria )
                {
                    KFbxQuery* lQuery = mQuery;
                    mQuery = pCriteria.mQuery;

                    if( mQuery )
                        mQuery->Ref();

                    if( lQuery )
                        lQuery->Unref();
                }

                return *this;
            }
KFbxCriteria operator&& ( KFbxCriteria const &  pCriteria ) const [inline]

Gets a logical conjunction (and) criteria from this and the specified criteria.

Parameters:
pCriteria The specified criteria

Definition at line 526 of file kfbxquery.h.

            {
                return KFbxCriteria(KFbxQueryOperator::Create(GetQuery(),eFbxAnd,pCriteria.GetQuery()));
            }
KFbxCriteria operator|| ( KFbxCriteria const &  pCriteria ) const [inline]

Gets a logical disjunction (or) criteria from this and the specified criteria.

Parameters:
pCriteria The specified criteria

Definition at line 534 of file kfbxquery.h.

            {
                return KFbxCriteria(KFbxQueryOperator::Create(GetQuery(),eFbxOr,pCriteria.GetQuery()));
            }
KFbxCriteria operator! ( ) const [inline]

Returns a negated version of the criteria.

Definition at line 540 of file kfbxquery.h.

KFbxQuery* GetQuery ( ) const [inline]

Retrieves the query.

Returns:
The query of this criteria

Definition at line 547 of file kfbxquery.h.

{ return mQuery; }

The documentation for this class was generated from the following file:

KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria
KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria KFbxCriteria