1 /* 2 * Copyright 2018 Google Inc. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef C_ARCORE_HELLO_AR_ANCHOR_WRAPPER_H_ 18 #define C_ARCORE_HELLO_AR_ANCHOR_WRAPPER_H_ 19 #include "arcore_c_api.h" 20 21 namespace hello_ar { 22 enum DrawableType { 23 TEXT = 0, CIRCLE = 1, RECT = 2 24 }; 25 26 class AnchorWrapper { 27 public: 28 AnchorWrapper(ArAnchor* anchor); 29 30 const ArAnchor* GetArAnchor(); 31 DrawableType GetDrawableType(); 32 bool GetInEditMode(); 33 34 void SetArAnchor(ArAnchor* anchor); 35 void SetDrawableType(DrawableType drawableType); 36 void SetInEditMode(bool inEditMode); 37 38 private: 39 ArAnchor* anchor; 40 DrawableType drawableType; 41 bool inEditMode = false; 42 }; 43 } // namespace hello_ar 44 45 #endif 46