內容目录

上一个主题

Engine Class

下一个主题

FrameFilter Class

Frame Class

Inherits: Drawable

Description

Frame用来存储跟踪到的数据。

这个数据包括当前camera的图像,跟踪到的target和其它一些信息。

Constructor

C: void easyar_Frame__ctor(easyar_Frame * * Return)
C++11: Frame()
Traditional C++: Frame()
Java: public Frame()
Objective-C: + (easyar_Frame *) create
Swift (since EasyAR SDK 2.1.0): public convenience init()

size

用于显示的图像的大小。

C: easyar_Vec2I easyar_Frame_size(const easyar_Frame * This)
C++11: Vec2I size()
Traditional C++: Vec2I size()
Java: public native Vec2I size()
Objective-C: - (easyar_Vec2I *)size
Swift (since EasyAR SDK 2.1.0): public func size() -> Vec2I

timestamp

返回当前frame的时间戳。

C: double easyar_Frame_timestamp(const easyar_Frame * This)
C++11: double timestamp()
Traditional C++: double timestamp()
Java: public native double timestamp()
Objective-C: - (double)timestamp
Swift (since EasyAR SDK 2.1.0): public func timestamp() -> Double

index

返回当前frame的索引。

C: int easyar_Frame_index(const easyar_Frame * This)
C++11: int index()
Traditional C++: int index()
Java: public native int index()
Objective-C: - (int)index
Swift (since EasyAR SDK 2.1.0): public func index() -> Int32

images

返回当前frame中包含的图像列表。

C: void easyar_Frame_images(const easyar_Frame * This, easyar_ListOfPointerOfImage * * Return)
C++11: std::vector<std::shared_ptr<Image>> images()
Traditional C++: void images(ListOfPointerOfImage * * Return)
Java: public native java.util.ArrayList<Image> images()
Objective-C: - (NSArray<easyar_Image *> *)images
Swift (since EasyAR SDK 2.1.0): public func images() -> [Image]

targetInstances

返回当前frame中包含的TargetInstance列表。

C: void easyar_Frame_targetInstances(const easyar_Frame * This, easyar_ListOfPointerOfTargetInstance * * Return)
C++11: std::vector<std::shared_ptr<TargetInstance>> targetInstances()
Traditional C++: void targetInstances(ListOfPointerOfTargetInstance * * Return)
Java: public native java.util.ArrayList<TargetInstance> targetInstances()
Objective-C: - (NSArray<easyar_TargetInstance *> *)targetInstances
Swift (since EasyAR SDK 2.1.0): public func targetInstances() -> [TargetInstance]

text

返回当前frame中包含的文字信息。如果没有则返回空字符串。

C: void easyar_Frame_text(easyar_Frame * This, easyar_String * * Return)
C++11: std::string text()
Traditional C++: void text(String * * Return)
Java: public native java.lang.String text()
Objective-C: - (NSString *)text
Swift (since EasyAR SDK 2.1.0): public func text() -> String