C++ SDK for MANUS Core 2.1
|
Classes | |
class | ClientSkeleton |
Used to store the information about the final animated skeletons. More... | |
class | ClientSkeletonCollection |
Used to store all the final animated skeletons received from Core. More... | |
class | SDKMinimalClient |
class ClientSkeleton |
Used to store the information about the final animated skeletons.
Definition at line 72 of file SDKClient.hpp.
Public Member Functions | |
~ClientSkeleton () | |
Public Attributes | |
SkeletonInfo | info |
std::vector< SkeletonNode > | nodes |
SkeletonNode * | nodes = nullptr |
|
inline |
Definition at line 41 of file SDKMinimalClient.hpp.
SkeletonInfo info |
Definition at line 75 of file SDKClient.hpp.
std::vector<SkeletonNode> nodes |
Definition at line 76 of file SDKClient.hpp.
SkeletonNode* nodes = nullptr |
Definition at line 39 of file SDKMinimalClient.hpp.
class ClientSkeletonCollection |
Used to store all the final animated skeletons received from Core.
Definition at line 80 of file SDKClient.hpp.
Public Attributes | |
std::vector< ClientSkeleton > | skeletons |
std::vector< ClientSkeleton > skeletons |
Definition at line 83 of file SDKClient.hpp.
class SDKMinimalClient |
Definition at line 54 of file SDKMinimalClient.hpp.
Inherits SDKClientPlatformSpecific.
Public Member Functions | |
SDKMinimalClient () | |
~SDKMinimalClient () | |
ClientReturnCode | Initialize () |
Initialize the sample console and the SDK. This function attempts to resize the console window and then proceeds to initialize the SDK's interface. More... | |
ClientReturnCode | InitializeSDK () |
Initialize the sdk, register the callbacks and set the coordinate system. This needs to be done before any of the other SDK functions can be used. More... | |
ClientReturnCode | ShutDown () |
When you are done with the SDK, don't forget to nicely shut it down this will close all connections to the host, close any threads and clean up after itself after this is called it is expected to exit the client program. If not it needs to call initialize again. More... | |
ClientReturnCode | RegisterAllCallbacks () |
Used to register the callbacks between sdk and core. Callbacks that are registered functions that get called when a certain 'event' happens, such as data coming in from Manus Core. All of these are optional, but depending on what data you require you may or may not need all of them. More... | |
void | Run () |
main loop More... | |
Static Public Member Functions | |
static void | OnConnectedCallback (const ManusHost *const p_Host) |
static void | OnSkeletonStreamCallback (const SkeletonStreamInfo *const p_SkeletonStreamInfo) |
This gets called when the client is connected to manus core. More... | |
Protected Member Functions | |
ClientReturnCode | ConnectLocally () |
the client will now try to connect to manus core via the SDK. More... | |
bool | SetupHandNodes (uint32_t p_SklIndex) |
This support function sets up the nodes for the skeleton hand In order to have any 3d positional/rotational information from the gloves or body, one needs to setup the skeleton on which this data should be applied. In the case of this sample we create a Hand skeleton for which we want to get the calculated result. The ID's for the nodes set here are the same IDs which are used in the OnSkeletonStreamCallback, this allows us to create the link between Manus Core's data and the data we enter here. More... | |
bool | SetupHandChains (uint32_t p_SklIndex) |
This function sets up some basic hand chains. Chains are required for a Skeleton to be able to be animated, it basically tells Manus Core which nodes belong to which body part and what data needs to be applied to which node. More... | |
void | LoadTestSkeleton () |
This function sets up a very minimalistic hand skeleton. In order to have any 3d positional/rotational information from the gloves or body, one needs to setup a skeleton on which this data can be applied. In the case of this sample we create a Hand skeleton in order to get skeleton information in the OnSkeletonStreamCallback function. This sample does not contain any 3D rendering, so we will not be applying the returned data on anything. More... | |
NodeSetup | CreateNodeSetup (uint32_t p_Id, uint32_t p_ParentId, float p_PosX, float p_PosY, float p_PosZ, std::string p_Name) |
Skeletons are pretty extensive in their data setup so we have several support functions so we can correctly receive and parse the data, this function helps setup the data. More... | |
![]() | |
bool | PlatformSpecificInitialization (void) |
Initialise things only needed for this platform. More... | |
bool | PlatformSpecificShutdown (void) |
Shut down things only needed for this platform. More... | |
void | UpdateInput (void) |
Update the current keyboard state. More... | |
bool | ResizeWindow (const short int p_ConsoleWidth, const short int p_ConsoleHeight, const short int p_ConsoleScrollback) |
Resize the window, so the log messages will fit. Make sure not to enter illegal sizes in here or SetConsoleWindowInfo and SetConsoleScreenBufferSize can generate an error. This is not code directly needed for the SDK to function, but its handy for a quick and simple output for this client. More... | |
void | ApplyConsolePosition (const int p_ConsoleCurrentOffset) |
Set the current console position. This handles the platform-specific part of advancing the console position. More... | |
bool | GetKey (const int p_Key) |
Gets key's current state. True is pressed false is not pressed. More... | |
bool | GetKeyDown (const int p_Key) |
Returns true first time it is called when key is pressed. More... | |
bool | GetKeyUp (const int p_Key) |
Returns true first time it is called when key is released. More... | |
std::string | GetDocumentsDirectoryPath_UTF8 (void) |
Get the path to the user's Documents folder. The string should be in UTF-8 format. More... | |
std::ifstream | GetInputFileStream (std::string p_Path_UTF8) |
Get an input stream for the given file. The file's path should be in UTF-8 format. More... | |
std::ofstream | GetOutputFileStream (std::string p_Path_UTF8) |
Get an output stream for the given file. The file's path should be in UTF-8 format. More... | |
bool | DoesFolderOrFileExist (std::string p_Path_UTF8) |
Check if the given folder or file exists. The folder path given should be in UTF-8 format. More... | |
void | CreateFolderIfItDoesNotExist (std::string p_Path_UTF8) |
Create the given folder if it does not exist. The folder path given should be in UTF-8 format. More... | |
Static Protected Member Functions | |
static ManusVec3 | CreateManusVec3 (float p_X, float p_Y, float p_Z) |
![]() | |
static bool | CopyString (char *const p_Target, const size_t p_MaxLengthThatWillFitInTarget, const std::string &p_Source) |
Copy the given string into the given target. More... | |
static void | ClearConsole (void) |
Clear the console window. More... | |
Protected Attributes | |
bool | m_Running = true |
std::mutex | m_SkeletonMutex |
ClientSkeletonCollection * | m_NextSkeleton = nullptr |
ClientSkeletonCollection * | m_Skeleton = nullptr |
uint32_t | m_FrameCounter = 0 |
Static Protected Attributes | |
static SDKMinimalClient * | s_Instance = nullptr |
![]() | |
static const std::string | s_SlashForFilesystemPath = "/" |
The slash character that is used in the filesystem. More... | |
SDKMinimalClient | ( | ) |
Definition at line 27 of file SDKMinimalClient.cpp.
~SDKMinimalClient | ( | ) |
Definition at line 32 of file SDKMinimalClient.cpp.
|
protected |
the client will now try to connect to manus core via the SDK.
Definition at line 175 of file SDKMinimalClient.cpp.
|
staticprotected |
Definition at line 285 of file SDKMinimalClient.cpp.
|
protected |
Skeletons are pretty extensive in their data setup so we have several support functions so we can correctly receive and parse the data, this function helps setup the data.
p_Id | the id of the created node setup |
p_ParentId | the id of the node parent |
p_PosX | X position of the node, this is defined with respect to the global coordinate system or the local one depending on the parameter p_UseWorldCoordinates set when initializing the sdk, |
p_PosY | Y position of the node this is defined with respect to the global coordinate system or the local one depending on the parameter p_UseWorldCoordinates set when initializing the sdk, |
p_PosZ | Z position of the node this is defined with respect to the global coordinate system or the local one depending on the parameter p_UseWorldCoordinates set when initializing the sdk, |
p_Name | the name of the node setup |
Definition at line 268 of file SDKMinimalClient.cpp.
ClientReturnCode Initialize | ( | ) |
Initialize the sample console and the SDK. This function attempts to resize the console window and then proceeds to initialize the SDK's interface.
Definition at line 39 of file SDKMinimalClient.cpp.
ClientReturnCode InitializeSDK | ( | ) |
Initialize the sdk, register the callbacks and set the coordinate system. This needs to be done before any of the other SDK functions can be used.
Definition at line 57 of file SDKMinimalClient.cpp.
|
protected |
This function sets up a very minimalistic hand skeleton. In order to have any 3d positional/rotational information from the gloves or body, one needs to setup a skeleton on which this data can be applied. In the case of this sample we create a Hand skeleton in order to get skeleton information in the OnSkeletonStreamCallback function. This sample does not contain any 3D rendering, so we will not be applying the returned data on anything.
Definition at line 221 of file SDKMinimalClient.cpp.
|
static |
|
static |
This gets called when the client is connected to manus core.
p_SkeletonStreamInfo | contains the meta data on how much data regarding the skeleton we need to get from the SDK. |
Definition at line 461 of file SDKMinimalClient.cpp.
ClientReturnCode RegisterAllCallbacks | ( | ) |
Used to register the callbacks between sdk and core. Callbacks that are registered functions that get called when a certain 'event' happens, such as data coming in from Manus Core. All of these are optional, but depending on what data you require you may or may not need all of them.
Definition at line 116 of file SDKMinimalClient.cpp.
void Run | ( | ) |
main loop
Definition at line 130 of file SDKMinimalClient.cpp.
|
protected |
This function sets up some basic hand chains. Chains are required for a Skeleton to be able to be animated, it basically tells Manus Core which nodes belong to which body part and what data needs to be applied to which node.
p_SklIndex | The index of the temporary skeleton on which the chains will be added. |
Definition at line 376 of file SDKMinimalClient.cpp.
|
protected |
This support function sets up the nodes for the skeleton hand In order to have any 3d positional/rotational information from the gloves or body, one needs to setup the skeleton on which this data should be applied. In the case of this sample we create a Hand skeleton for which we want to get the calculated result. The ID's for the nodes set here are the same IDs which are used in the OnSkeletonStreamCallback, this allows us to create the link between Manus Core's data and the data we enter here.
Definition at line 300 of file SDKMinimalClient.cpp.
ClientReturnCode ShutDown | ( | ) |
When you are done with the SDK, don't forget to nicely shut it down this will close all connections to the host, close any threads and clean up after itself after this is called it is expected to exit the client program. If not it needs to call initialize again.
Definition at line 97 of file SDKMinimalClient.cpp.
|
protected |
Definition at line 86 of file SDKMinimalClient.hpp.
|
protected |
Definition at line 83 of file SDKMinimalClient.hpp.
|
protected |
Definition at line 79 of file SDKMinimalClient.hpp.
|
protected |
Definition at line 84 of file SDKMinimalClient.hpp.
|
protected |
Definition at line 81 of file SDKMinimalClient.hpp.
|
staticprotected |
Definition at line 78 of file SDKMinimalClient.hpp.
|
strong |
Values that can be returned by this application.
Definition at line 17 of file SDKMinimalClient.hpp.