Model loading
This commit is contained in:
parent
51e605ca6d
commit
4b21057fdd
@ -85,6 +85,8 @@ public:
|
||||
virtual void SendText(const char *s);
|
||||
void SendInt(const int x);
|
||||
|
||||
virtual void Download(const char *url) {};
|
||||
|
||||
protected:
|
||||
Roboid *roboid;
|
||||
NetworkPerception *networkPerception;
|
||||
|
@ -130,3 +130,11 @@ void Passer::RoboidControl::Roboid::Release(Thing *child) {
|
||||
this->perception->AddTrackedObject(nullptr, Spherical16::zero,
|
||||
SwingTwist16::identity, child->type);
|
||||
}
|
||||
|
||||
void Roboid::LoadModel(const char *url) {
|
||||
this->modelUrl = url;
|
||||
if (this->networkSync == nullptr)
|
||||
return;
|
||||
|
||||
this->networkSync->Download(url);
|
||||
}
|
6
Roboid.h
6
Roboid.h
@ -70,6 +70,12 @@ public:
|
||||
nullptr; // thing to track the world origin to be able to transform
|
||||
// world coordinates into roboid or local coordinates
|
||||
// Perhaps this will move to perception at some point
|
||||
|
||||
/// @brief Loads the model and adds the skeleton (if any) to the roboid
|
||||
/// @param url The url of the model
|
||||
/// @remark The only supported model format is .gltf
|
||||
void LoadModel(const char *url);
|
||||
|
||||
private:
|
||||
unsigned long lastUpdateTimeMs = 0;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user