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,46 @@
//
// VROARNode.h
// ViroKit
//
// Created by Andy Chu on 6/16/17.
// Copyright © 2017 Viro Media. All rights reserved.
//
#ifndef VROARNode_h
#define VROARNode_h
#include "VRONode.h"
class VROARAnchor;
/*
ARNode is a specialized Node that corresponds to a detected ARAnchor. Each ARNode is
continually updated to stay in sync with its corresponding ARAnchor: if the anchor's
position, orientation, or other detected properties change, the ARNode will be changed
as well.
*/
class VROARNode : public VRONode {
public:
VROARNode() : _pauseUpdates(false) {}
virtual ~VROARNode() {}
void setAnchor(std::shared_ptr<VROARAnchor> anchor) {
_anchor = anchor;
}
std::shared_ptr<VROARAnchor> getAnchor() {
return _anchor.lock();
}
void setPauseUpdates(bool pauseUpdates);
bool shouldPauseUpdates() {
return _pauseUpdates;
}
protected:
std::weak_ptr<VROARAnchor> _anchor;
bool _pauseUpdates;
};
#endif /* VROARNode_h */