HDK
|
#include <MocapStreamRokokoHDK.h>
Public Member Functions | |
MocapStreamRokokoHDK (const ServerOptions &opts=ServerOptions{14043,"","","", 0, 0, 32768,{true, false, false, false, false, false, true, false, false, false}}) | |
~MocapStreamRokokoHDK () override | |
UT_UniquePtr< MC_MocapStreamImpl > | clone (const ServerOptions &opts) override |
bool | parsePacket (UT_StringHolder &packet, fpreal packet_time, bool &parse_incomplete) override |
void | updateJoints (GU_Detail *gdp, const MC_MocapStreamCookParms &cookparms, const MC_MocapStreamCookParms &prev_cookparms) override |
void | buildSkeleton (GU_Detail *gdp, UT_StringHolder name) override |
void | removeSkeleton (const UT_StringHolder &name) override |
Removes the stored data for a skeleton. More... | |
const char * | label () const override |
const char * | name () const override |
Public Member Functions inherited from MC_MocapStreamImpl | |
MC_MocapStreamImpl (MC_MocapServerFunc f, const ServerOptions &myServerOptions) | |
virtual | ~MC_MocapStreamImpl () |
virtual bool | removeExpiredSkeletons () const |
virtual int | expirationCount () |
void | receivedSkeleton (const UT_StringHolder &name) |
void | renamedSkeleton (const UT_StringHolder &old_name, const UT_StringHolder &new_name) |
Call this to let the base class know an actor's name has changed. More... | |
void | setPacketTime (fpreal64 time) |
template<typename... Args> | |
void | addParseError (const char *fmt, Args &&...args) |
Call this to report an error when parsing. More... | |
template<typename... Args> | |
void | addParseWarning (const char *fmt, Args &&...args) |
Call this to report a warning when parsing. More... | |
void | rebuildSkeletons () |
void | queueServerTask (const UT_Function< void(void *)> &task) |
bool | cook (GU_Detail *gdp, uint64 &skeleton_version, fpreal time, const MC_MocapStreamCookParms &cookparms, const MC_MocapStreamCookParms &prev_cookparms, bool &is_killed) |
void | clear () |
Removes all actors/skeletons. More... | |
void | startRecording (UT_SharedPtr< MC_MocapRecorder > recorder, const MC_MocapStreamCookParms &cookparms) |
Starts recording the motion capture data and stores it in a MotionClip. More... | |
void | stopRecording (UT_SharedPtr< MC_MocapRecorder > recorder) |
Stops recording the motion capture data. More... | |
const UT_ArrayStringMap< exint > & | getActorMap () |
bool | hasHitError () |
Used to determine if the stream has run into an error. More... | |
Additional Inherited Members | |
Public Types inherited from MC_MocapStreamImpl | |
typedef void(* | MC_MocapServerFunc )(ServerState &state, const ServerOptions &options, MC_MocapStreamImpl *data) |
Static Public Member Functions inherited from MC_MocapStreamImpl | |
static void | basicUdpReceiver (ServerState &state, const ServerOptions &options, MC_MocapStreamImpl *data) |
static void | basicTcpClient (ServerState &state, const ServerOptions &options, MC_MocapStreamImpl *data) |
static void | getBoostErrorMessage (hboost::system::error_code e, UT_StringHolder &err_msg) |
Gets the error message corresponding to an hboost error code. More... | |
static void | getBoostErrorMessage (hboost::system::system_error &e, UT_StringHolder &err_msg) |
Gets the error message corresponding to an hboost error code. More... | |
static void | handleBoostError (hboost::system::error_code e, ServerState &state) |
Adds an error message to the log corresponding to an hboost error code. More... | |
static void | handleBoostError (hboost::system::system_error &e, ServerState &state) |
Adds an error message to the log corresponding to an hboost error code. More... | |
Protected Member Functions inherited from MC_MocapStreamImpl | |
UT_StringHolder | updateAttribName (GU_Detail *gdp, const UT_StringHolder &base_name, const UT_StringHolder &rename_pattern, const UT_StringHolder &prev_rename_pattern) |
Definition at line 18 of file MocapStreamRokokoHDK.h.
MocapStreamRokokoHDK::MocapStreamRokokoHDK | ( | const ServerOptions & | opts = ServerOptions{ 14043, "", "", "", 0, 0, 32768, {true, false, false, false, false, false, true, false, false, false}} | ) |
Initializes the MC_MocapStream::ServerOptions class with the default values for the different parameters on the MocapStream SOP and define which parameters are visible.
Definition at line 157 of file MocapStreamRokokoHDK.C.
|
override |
Definition at line 161 of file MocapStreamRokokoHDK.C.
|
overridevirtual |
Appends the skeleton's geometry to the gdp The theActorAttribName attribute should store the name of the skeleton, and the name attribute will store the names of each joint.
Implements MC_MocapStreamImpl.
Definition at line 689 of file MocapStreamRokokoHDK.C.
|
inlineoverridevirtual |
Creates a unique pointer to the the MocapStreamRokokoHDK device from a set of server options.
This must be implemented and is used in the connection process.
Implements MC_MocapStreamImpl.
Definition at line 34 of file MocapStreamRokokoHDK.h.
|
inlineoverridevirtual |
Define the label for this device. This will be added in the "Device" menu on the MocapStream SOP.
Implements MC_MocapStreamImpl.
Definition at line 50 of file MocapStreamRokokoHDK.h.
Define a unique name for this device. This will be used to distinguish This device from other MocapStream devices.
Implements MC_MocapStreamImpl.
Definition at line 54 of file MocapStreamRokokoHDK.h.
|
overridevirtual |
Called for each packet received from the server. Return true when a packet which defines a pose is valid. parse_incomplete is set to true when a portion of the packet remains to be parsed. In this case, packet is set to the appropriate value to call this method again.
NOTE: If this returns true and parse_incomplete is set to true, that means that the "packet" that was passed in contained parts of more that one packet. This can occur when the data is from a constant stream that has been cut up.
Implements MC_MocapStreamImpl.
Definition at line 278 of file MocapStreamRokokoHDK.C.
|
overridevirtual |
Removes the stored data for a skeleton.
Reimplemented from MC_MocapStreamImpl.
Definition at line 678 of file MocapStreamRokokoHDK.C.
|
overridevirtual |
Updates the joints' attributes in place based on the results of parsePacket you can assume that all desired skeletons have already been built in the gdp, so you should keep the same geometry, just update the attributes you need.
Implements MC_MocapStreamImpl.
Definition at line 568 of file MocapStreamRokokoHDK.C.