Adding ViroKit. Needs AWSCore :(

This commit is contained in:
John Lyon-Smith
2018-03-27 17:46:15 -07:00
parent 2ab15e7dc1
commit 02e06dface
844 changed files with 86921 additions and 21 deletions

View File

@@ -0,0 +1,40 @@
//
// VROControllerPresenterCardboard.h
// ViroRenderer
//
// Copyright © 2017 Viro Media. All rights reserved.
//
#ifndef VROControllerPresenterCardboardiOS_H
#define VROControllerPresenterCardboardiOS_H
#include <memory>
#include <string>
#include <vector>
#include "VRORenderContext.h"
#include "VROInputControllerBase.h"
#include "VROEventDelegate.h"
#include "VROHitTestResult.h"
class VROInputPresenterCardboardiOS : public VROInputPresenter {
public:
VROInputPresenterCardboardiOS() {
setReticle(std::make_shared<VROReticle>(nullptr));
getReticle()->setPointerFixed(true);
}
virtual ~VROInputPresenterCardboardiOS() {}
void onClick(int source, std::shared_ptr<VRONode> node, ClickState clickState, std::vector<float> clickedPosition) {
VROInputPresenter::onClick(source, node, clickState, clickedPosition);
if (clickState == ClickState::ClickUp){
getReticle()->trigger();
}
}
void onGazeHit(int source, std::shared_ptr<VRONode> node, const VROHitTestResult &hit) {
VROInputPresenter::onReticleGazeHit(hit);
}
};
#endif