OpenNI 1.3.2
|
#include <XnCppWrapper.h>
Represents an OpenNI context object.
xn::Context::Context | ( | ) | [inline] |
Ctor.
xn::Context::Context | ( | XnContext * | pContext | ) | [inline] |
Ctor
pContext | [in] Underlying C object |
xn::Context::Context | ( | const Context & | other | ) | [inline] |
Copy Ctor
other | [in] Another context. Note that the context will only be destroyed when The original object is destroyed. |
xn::Context::~Context | ( | ) | [inline] |
Dtor.
XnStatus xn::Context::AddLicense | ( | const XnLicense & | License | ) | [inline] |
XnStatus xn::Context::AddRef | ( | ) | [inline] |
Adds a reference to the context object.
For full details and usage, see xnContextAddRefXnStatus xn::Context::AutoEnumerateOverSingleInput | ( | NodeInfoList & | List, |
XnProductionNodeDescription & | description, | ||
const XnChar * | strCreationInfo, | ||
XnProductionNodeType | InputType, | ||
EnumerationErrors * | pErrors, | ||
Query * | pQuery = NULL |
||
) | const [inline] |
XnStatus xn::Context::CreateAnyProductionTree | ( | XnProductionNodeType | type, |
Query * | pQuery, | ||
ProductionNode & | node, | ||
EnumerationErrors * | pErrors = NULL |
||
) | [inline] |
Enumerates for production trees for a specific node type, and creates the first found tree. This function is a shortcut version for using xnEnumerateProductionTrees(), iterating the list, and then calling xnCreateProductionTree().
For full details and usage, see xnCreateAnyProductionTreeXnStatus xn::Context::CreateCodec | ( | XnCodecID | codecID, |
ProductionNode & | initializerNode, | ||
Codec & | codec | ||
) | [inline] |
XnStatus xn::Context::CreateMockNode | ( | XnProductionNodeType | type, |
const XnChar * | strName, | ||
ProductionNode & | mockNode | ||
) | [inline] |
Creates a production node which is only a mock. This node does not represent an actual node, but only keeps a state and implements an interface above it. Mock nodes are useful when simulating nodes for playing recordings, or for use in tests. See also xnCreateMockNodeBasedOn().
For full details and usage, see xnCreateMockNodeXnStatus xn::Context::CreateMockNodeBasedOn | ( | ProductionNode & | originalNode, |
const XnChar * | strName, | ||
ProductionNode & | mockNode | ||
) | [inline] |
Creates a production node which is only a mock, base on the type and properties of another node. This node does not represent an actual node, but only keeps a state and implements an interface above it. Mock nodes are useful when simulating nodes for playing recordings, or for use in tests. See also xnCreateMockNode().
For full details and usage, see xnCreateMockNodeBasedOnXnStatus xn::Context::CreateProductionTree | ( | NodeInfo & | Tree | ) | [inline] |
Creates a production node. If the tree specifies additional needed nodes, and those nodes do not exist, they will be created too, and passed to this node as input.
For full details and usage, see xnCreateProductionTreeXnStatus xn::Context::CreateProductionTree | ( | NodeInfo & | Tree, |
ProductionNode & | node | ||
) | [inline] |
Creates a production node. If the tree specifies additional needed nodes, and those nodes do not exist, they will be created too, and passed to this node as input.
For full details and usage, see xnCreateProductionTreeXnStatus xn::Context::EnumerateExistingNodes | ( | NodeInfoList & | list | ) | const [inline] |
Gets a list of all existing node in the context. Each node that was returned increases its ref count. The list must be freed using xnNodeInfoListFree().
For full details and usage, see xnEnumerateExistingNodesXnStatus xn::Context::EnumerateExistingNodes | ( | NodeInfoList & | list, |
XnProductionNodeType | type | ||
) | const [inline] |
Gets a list of all existing node in the context. Each node that was returned increases its ref count. The list must be freed using xnNodeInfoListFree().
For full details and usage, see xnEnumerateExistingNodesByTypeXnStatus xn::Context::EnumerateLicenses | ( | XnLicense *& | aLicenses, |
XnUInt32 & | nCount | ||
) | const [inline] |
XnStatus xn::Context::EnumerateProductionTrees | ( | XnProductionNodeType | Type, |
const Query * | pQuery, | ||
NodeInfoList & | TreesList, | ||
EnumerationErrors * | pErrors = NULL |
||
) | const [inline] |
Enumerates all available production trees for a specific node type. The trees populated in the list should be freed by calling xnNodeInfoListFree() once not needed.
For full details and usage, see xnEnumerateProductionTreesXnStatus xn::Context::FindExistingNode | ( | XnProductionNodeType | type, |
ProductionNode & | node | ||
) | const [inline] |
static void xn::Context::FreeLicensesList | ( | XnLicense | aLicenses[] | ) | [inline, static] |
XnStatus xn::Context::GetGlobalErrorState | ( | ) | [inline] |
Gets the global error state of the context. If one of the nodes in the context is in error state, that state will be returned. If more than one node is in error state, XN_STATUS_MULTIPLE_NODES_ERROR is returned. An application can query each node error state by calling xnGetNodeErrorState().
For full details and usage, see xnGetGlobalErrorStateXnBool xn::Context::GetGlobalMirror | ( | ) | [inline] |
Gets the global mirror flag.
For full details and usage, see xnGetGlobalMirrorXnStatus xn::Context::GetProductionNodeByName | ( | const XnChar * | strInstanceName, |
ProductionNode & | node | ||
) | const [inline] |
XnStatus xn::Context::GetProductionNodeInfoByName | ( | const XnChar * | strInstanceName, |
NodeInfo & | nodeInfo | ||
) | const [inline] |
XnContext* xn::Context::GetUnderlyingObject | ( | ) | const [inline] |
Gets the underlying C object.
XnStatus xn::Context::Init | ( | ) | [inline] |
Initializes the OpenNI library.
For full details and usage, see xnInitXnStatus xn::Context::InitFromXmlFile | ( | const XnChar * | strFileName, |
EnumerationErrors * | pErrors = NULL |
||
) | [inline] |
Initializes OpenNI context, and then configures it using the given file. NOTE: when using this function, the context will be the owner of the created nodes, so those nodes and the context will only be destroyed if calling xnShutdown(). It is highly suggested to use xnInitFromXmlFileEx() instead, which returns a node referencing created nodes, making the caller owner of those nodes.
For full details and usage, see xnInitFromXmlFileXnStatus xn::Context::InitFromXmlFile | ( | const XnChar * | strFileName, |
ScriptNode & | scriptNode, | ||
EnumerationErrors * | pErrors = NULL |
||
) | [inline] |
Initializes OpenNI context, and then configures it using the given file. NOTE: when using this function, the context will be the owner of the created nodes, so those nodes and the context will only be destroyed if calling xnShutdown(). It is highly suggested to use xnInitFromXmlFileEx() instead, which returns a node referencing created nodes, making the caller owner of those nodes.
For full details and usage, see xnInitFromXmlFileXnStatus xn::Context::OpenFileRecording | ( | const XnChar * | strFileName | ) | [inline] |
Opens a recording file, adding all nodes in it to the context. NOTE: when using this function, the context will be the owner of the created player node, so this nodes and the context will only be destroyed if calling xnShutdown(). It is highly suggested to use xnContextOpenFileRecordingEx() instead, which returns the player node, making the caller owner of this node.
For full details and usage, see xnContextOpenFileRecordingXnStatus xn::Context::OpenFileRecording | ( | const XnChar * | strFileName, |
ProductionNode & | playerNode | ||
) | [inline] |
Opens a recording file, adding all nodes in it to the context. NOTE: when using this function, the context will be the owner of the created player node, so this nodes and the context will only be destroyed if calling xnShutdown(). It is highly suggested to use xnContextOpenFileRecordingEx() instead, which returns the player node, making the caller owner of this node.
For full details and usage, see xnContextOpenFileRecordingXnStatus xn::Context::RegisterToErrorStateChange | ( | XnErrorStateChangedHandler | handler, |
void * | pCookie, | ||
XnCallbackHandle & | hCallback | ||
) | [inline] |
Registers a callback function to global error state changes.
For full details and usage, see xnRegisterToGlobalErrorStateChangevoid xn::Context::Release | ( | ) | [inline] |
Releases a context object, decreasing its ref count by 1. If reference count has reached 0, the context will be destroyed.
For full details and usage, see xnContextReleaseXnStatus xn::Context::RunXmlScript | ( | const XnChar * | strScript, |
EnumerationErrors * | pErrors = NULL |
||
) | [inline] |
Runs an XML script in the given context. NOTE: when using this function, the context will be the owner of the created nodes, so those nodes and the context will only be destroyed if calling xnShutdown(). It is highly suggested to use xnContextRunXmlScriptEx() instead, which returns a node referencing created nodes, making the caller owner of those nodes.
For full details and usage, see xnContextRunXmlScriptXnStatus xn::Context::RunXmlScript | ( | const XnChar * | strScript, |
ScriptNode & | scriptNode, | ||
EnumerationErrors * | pErrors = NULL |
||
) | [inline] |
Runs an XML script in the given context. NOTE: when using this function, the context will be the owner of the created nodes, so those nodes and the context will only be destroyed if calling xnShutdown(). It is highly suggested to use xnContextRunXmlScriptEx() instead, which returns a node referencing created nodes, making the caller owner of those nodes.
For full details and usage, see xnContextRunXmlScriptXnStatus xn::Context::RunXmlScriptFromFile | ( | const XnChar * | strFileName, |
EnumerationErrors * | pErrors = NULL |
||
) | [inline] |
Runs an XML script in the given context. NOTE: when using this function, the context will be the owner of the created nodes, so those nodes and the context will only be destroyed if calling xnShutdown(). It is highly suggested to use xnContextRunXmlScriptFromFileEx() instead, which returns a node referencing created nodes, making the caller owner of those nodes.
For full details and usage, see xnContextRunXmlScriptFromFileXnStatus xn::Context::RunXmlScriptFromFile | ( | const XnChar * | strFileName, |
ScriptNode & | scriptNode, | ||
EnumerationErrors * | pErrors = NULL |
||
) | [inline] |
Runs an XML script in the given context. NOTE: when using this function, the context will be the owner of the created nodes, so those nodes and the context will only be destroyed if calling xnShutdown(). It is highly suggested to use xnContextRunXmlScriptFromFileEx() instead, which returns a node referencing created nodes, making the caller owner of those nodes.
For full details and usage, see xnContextRunXmlScriptFromFileXnStatus xn::Context::SetGlobalMirror | ( | XnBool | bMirror | ) | [inline] |
Sets the global mirror flag. This will set all current existing nodes' mirror state, and also affect future created nodes. The default mirror flag is FALSE.
For full details and usage, see xnSetGlobalMirrorvoid xn::Context::SetHandle | ( | XnContext * | pContext | ) | [inline] |
Replaces the underlying C object pointed to by this object.
void xn::Context::Shutdown | ( | ) | [inline] |
Shuts down an OpenNI context, destroying all its nodes. Do not call any function of this context or any correlated node after calling this method. NOTE: this function destroys the context and all the nodes it holds and so should be used very carefully. Normally you should just call xnContextRelease()
For full details and usage, see xnShutdownXnStatus xn::Context::StartGeneratingAll | ( | ) | [inline] |
Make sure all generators are generating data.
For full details and usage, see xnStartGeneratingAllXnStatus xn::Context::StopGeneratingAll | ( | ) | [inline] |
Stop all generators from generating data.
For full details and usage, see xnStopGeneratingAllvoid xn::Context::TakeOwnership | ( | XnContext * | pContext | ) | [inline] |
void xn::Context::UnregisterFromErrorStateChange | ( | XnCallbackHandle | hCallback | ) | [inline] |
Unregisters a callback function which was registered using xnRegisterToGlobalErrorStateChange().
For full details and usage, see xnUnregisterFromGlobalErrorStateChangeXnStatus xn::Context::WaitAndUpdateAll | ( | ) | [inline] |
Updates all generators nodes in the context, waiting for all to have new data.
For full details and usage, see xnWaitAndUpdateAllXnStatus xn::Context::WaitAnyUpdateAll | ( | ) | [inline] |
Updates all generators nodes in the context, once any of them have new data.
For full details and usage, see xnWaitAnyUpdateAllXnStatus xn::Context::WaitNoneUpdateAll | ( | ) | [inline] |
Updates all generator nodes in the context, without any waiting. If a node has new data, it will be updated.
For full details and usage, see xnWaitNoneUpdateAllXnStatus xn::Context::WaitOneUpdateAll | ( | ProductionNode & | node | ) | [inline] |
Updates all generators nodes in the context, waiting for a specific one to have new data.
For full details and usage, see xnWaitOneUpdateAll