• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_PENDING_ANCHOR_H_
18 #define C_ARCORE_HELLO_AR_PENDING_ANCHOR_H_
19 
20 #include "include/gpu/GrBackendSurface.h"
21 #include "include/gpu/gl/GrGLTypes.h"
22 
23 #include "arcore_c_api.h"
24 #include "platform_tools/android/apps/arcore/src/main/cpp/glm.h"
25 
26 namespace hello_ar {
27     class PendingAnchor {
28     public:
29         PendingAnchor(SkPoint touchLocation);
30         ~PendingAnchor();
31 
32         SkPoint GetTouchLocation();
33         bool GetEditMode();
34         ArPlane* GetContainingPlane();
35         glm::vec4 GetAnchorPos(ArSession* arSession);
36         ArAnchor* GetArAnchor();
37 
38         void SetArAnchor(ArAnchor* anchor);
39         void SetEditMode(bool editMode);
40         void SetContainingPlane(ArPlane* plane);
41 
42     private:
43         SkPoint touchLocation;
44         bool editMode = false;
45         ArAnchor* anchor;
46         ArPlane* containingPlane;
47     };
48 }  // namespace hello_ar
49 
50 #endif
51