25 #ifndef INCLUDED_AugmentedProcessModel_h_GUID_8A98A9D0_A8E4_4094_639A_25C4285B5F56 26 #define INCLUDED_AugmentedProcessModel_h_GUID_8A98A9D0_A8E4_4094_639A_25C4285B5F56 36 #include <type_traits> 44 using ModelTypeA = ModelA;
45 using ModelTypeB = ModelB;
46 using StateA =
typename ModelA::State;
47 using StateB =
typename ModelB::State;
52 : a_(modA), b_(modB) {}
59 : a_(other.a_), b_(other.b_) {}
65 void predictState(
State &state,
double dt) {
66 modelA().predictState(state.a(), dt);
67 modelB().predictState(state.
b(), dt);
73 ModelTypeA &modelA() {
return a_; }
74 ModelTypeA
const &modelA()
const {
return a_; }
76 ModelTypeB &modelB() {
return b_; }
77 ModelTypeB
const &modelB()
const {
return b_; }
85 template <
typename ModelA,
typename ModelB>
88 typename std::remove_const<ModelB>::type>;
92 template <
typename ModelA,
typename ModelB>
100 #endif // INCLUDED_AugmentedProcessModel_h_GUID_8A98A9D0_A8E4_4094_639A_25C4285B5F56 DeducedAugmentedProcessModel< ModelA, ModelB > makeAugmentedProcessModel(ModelA &a, ModelB &b)
Factory function, akin to std::tie(), to make an augmented process model.
Definition: AugmentedProcessModel.h:94
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
AugmentedProcessModel(AugmentedProcessModel &&other)
Move constructor.
Definition: AugmentedProcessModel.h:58
AugmentedProcessModel & operator=(AugmentedProcessModel const &other)=delete
non-assignable
AugmentedProcessModel(ModelTypeA &modA, ModelTypeB &modB)
Constructor.
Definition: AugmentedProcessModel.h:51
State type that consists entirely of references to two independent sub-states.
Definition: AugmentedState.h:41
StateTypeB & b()
Access the second part of the state.
Definition: AugmentedState.h:116
Process model type that consists entirely of references to two sub-process models, for operating on an AugmentedState<>.
Definition: AugmentedProcessModel.h:42