mirror of
https://github.com/lubosz/overte.git
synced 2025-04-15 05:29:32 +02:00
Adding the stub of the ClassificationTracker class
This commit is contained in:
parent
e9ea4828ce
commit
db4e280e95
5 changed files with 77 additions and 2 deletions
24
libraries/workload/src/workload/ClassificationTracker.cpp
Normal file
24
libraries/workload/src/workload/ClassificationTracker.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// ClassificationTracker.cpp
|
||||
// libraries/workload/src/workload
|
||||
//
|
||||
// Created by Andrew Meadows 2018.02.21
|
||||
// Copyright 2018 High Fidelity, Inc.
|
||||
//
|
||||
// Originally from lighthouse3d. Modified to utilize glm::vec3 and clean up to our coding standards
|
||||
// Simple plane class.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#include "ClassificationTracker.h"
|
||||
|
||||
using namespace workload;
|
||||
|
||||
void ClassificationTracker::configure(const Config& config) {
|
||||
}
|
||||
|
||||
void ClassificationTracker::run(const workload::WorkloadContextPointer& renderContext, Outputs& outputs) {
|
||||
|
||||
}
|
||||
|
45
libraries/workload/src/workload/ClassificationTracker.h
Normal file
45
libraries/workload/src/workload/ClassificationTracker.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
//
|
||||
// ClassificationTracker.h
|
||||
// libraries/workload/src/workload
|
||||
//
|
||||
// Created by Andrew Meadows 2018.02.21
|
||||
// Copyright 2018 High Fidelity, Inc.
|
||||
//
|
||||
// Originally from lighthouse3d. Modified to utilize glm::vec3 and clean up to our coding standards
|
||||
// Simple plane class.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#ifndef hifi_workload_ClassificationTracker_h
|
||||
#define hifi_workload_ClassificationTracker_h
|
||||
|
||||
#include "Space.h"
|
||||
#include "Engine.h"
|
||||
|
||||
namespace workload {
|
||||
|
||||
class ClassificationTrackerConfig : public Job::Config {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ClassificationTrackerConfig() : Job::Config(true) {}
|
||||
};
|
||||
|
||||
class ClassificationTracker {
|
||||
public:
|
||||
using Config = ClassificationTrackerConfig;
|
||||
using Outputs = Classifications;
|
||||
using JobModel = workload::Job::ModelO<ClassificationTracker, Outputs, Config>;
|
||||
|
||||
ClassificationTracker() {}
|
||||
|
||||
void configure(const Config& config);
|
||||
void run(const workload::WorkloadContextPointer& renderContext, Outputs& outputs);
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
} // namespace workload
|
||||
|
||||
#endif // hifi_workload_ClassificationTracker_h
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include "ClassificationTracker.h"
|
||||
|
||||
namespace workload {
|
||||
|
||||
// the "real Job"
|
||||
|
@ -33,7 +35,7 @@ namespace workload {
|
|||
if (_isEnabled) {
|
||||
std::cout << _message.toStdString() << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
WorkloadContext::WorkloadContext() : task::JobContext(trace_workload()) {}
|
||||
|
@ -47,6 +49,8 @@ namespace workload {
|
|||
using JobModel = Task::Model<EngineModel>;
|
||||
void build(EngineModel& model, const Varying& in, Varying& out) {
|
||||
model.addJob<HelloWorld>("helloWorld");
|
||||
|
||||
auto classifications = model.addJob<ClassificationTracker>("classificationTracker");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace workload {
|
|||
Q_PROPERTY(QString message READ getMessage WRITE setMessage)
|
||||
QString _message {"Hello World."};
|
||||
public:
|
||||
HelloWorldConfig() : Job::Config(true) {}
|
||||
HelloWorldConfig() : Job::Config(true) {}
|
||||
QString getMessage() const { return _message; }
|
||||
void setMessage(const QString& msg) { _message = msg; }
|
||||
};
|
||||
|
|
|
@ -78,6 +78,8 @@ private:
|
|||
std::vector<int32_t> _freeIndices;
|
||||
};
|
||||
|
||||
using Classifications = std::vector<Space::Change>;
|
||||
|
||||
} // namespace workload
|
||||
|
||||
#endif // hifi_workload_Space_h
|
||||
|
|
Loading…
Reference in a new issue