mirror of
https://github.com/lubosz/overte.git
synced 2025-04-13 13:13:19 +02:00
Merge pull request #12454 from samcake/workload-engine
Drafting the Classification Tracker job and adding it as a no op to the workload engine
This commit is contained in:
commit
2bf9b4f4a7
4 changed files with 74 additions and 0 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"
|
||||
|
@ -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");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ private:
|
|||
};
|
||||
|
||||
using SpacePointer = std::shared_ptr<Space>;
|
||||
using Classifications = std::vector<Space::Change>;
|
||||
|
||||
} // namespace workload
|
||||
|
||||
|
|
Loading…
Reference in a new issue