#ifndef __MOCAPSTREAMROKOKOHDK_H_INCLUDED__
#define __MOCAPSTREAMROKOKOHDK_H_INCLUDED__
namespace HDK_Sample
{
{
public:
14043, "", "", "", 0, 0, 32768,
{true, false, false, false, false, false, true, false, false, false}}
);
{
return UTmakeUnique<MocapStreamRokokoHDK>(opts);
}
bool &parse_incomplete) override;
const char*
label()
const override {
return "Rokoko Studio - HDK"; }
const char*
name()
const override {
return "rokoko_hdk"; }
private:
void computeSkeletonTransforms();
struct ActorPoint
{
ActorPoint()
: myWorldXform(1.0)
, myLocalXform(1.0)
, myDidReceive(true)
{}
bool myDidReceive;
};
struct Actor
{
Actor()
: myOccurances(0)
, myIsDirty(true)
{}
int myOccurances;
bool myIsDirty;
};
class ActorList
{
public:
ActorList() {}
~ActorList() {}
void resetOccurances()
{
for (auto &actor : myActors)
{
actor.myOccurances = 0;
}
}
{
if (myNameToIdx.contains(name))
{
Actor &actor = myActors(myNameToIdx[name]);
actor.myPoints.clear();
return &actor;
}
Actor new_actor;
myActors.append(new_actor);
myNameToIdx[
name] = myActors.entries()-1;
return &myActors(myActors.entries()-1);
}
{
if (myNameToIdx.contains(name))
return &myActors(myNameToIdx[name]);
return nullptr;
}
{
if (!myNameToIdx.contains(name))
return false;
myActors.removeIndex(removed_idx);
for (auto it = myNameToIdx.begin(); !it.atEnd(); ++it)
{
if (it->second > removed_idx)
it->second--;
}
return true;
}
Actor &operator()(
exint i)
{
if (i < 0)
i = 0;
if (i >= myActors.size())
i = myActors.size()-1;
return myActors(i);
}
private:
};
ActorList mySkeletons;
ActorList myProps;
};
}
#endif