MaxstARSDK  3.5.0
MasTrackedImage.mm
1 //
2 // MasImage.m
3 // MaxstAR
4 //
5 // Created by Kimseunglee on 2017. 11. 23..
6 // Copyright © 2017년 Maxst. All rights reserved.
7 //
8 
9 #import "MasTrackedImage.h"
10 #import "TrackedImage.h"
11 
12 @interface MasTrackedImage()
13 {
14  maxstAR::TrackedImage *_image;
15 }
16 
17 @end
18 
19 @implementation MasTrackedImage
20 
21 - (instancetype)init:(void*)image {
22  self = [super init];
23  if (self) {
24  _image = (maxstAR::TrackedImage*)image;
25  }
26  return self;
27 }
28 
29 - (int) getWidth {
30  if(_image == nullptr) {
31  return 0;
32  }
33  return _image->getWidth();
34 }
35 - (int) getHeight {
36  if(_image == nullptr) {
37  return 0;
38  }
39  return _image->getHeight();
40 }
41 - (int) getLength {
42  if(_image == nullptr) {
43  return 0;
44  }
45  return _image->getLength();
46 }
47 - (MasColorFormat) getForamt {
48  if(_image == nullptr) {
49  return NONE;
50  }
51  return (MasColorFormat)_image->getFormat();
52 }
53 - (const unsigned char *) getData {
54  if(_image == nullptr) {
55  return nullptr;
56  }
57  return _image->getData();
58 }
59 @end
const unsigned char * getData()
Get image data.
int getWidth()
Get image width.
int getLength()
Get image length.
image data which is used for tracker and rendering
MasColorFormat getForamt()
Get image format.
int getHeight()
Get image height.