Commit 708d3dee authored by BlackAngle233's avatar BlackAngle233
Browse files

update final design

parent 1444629e
fileFormatVersion: 2
guid: cfa803484c2ebd04289751d02efe52cd
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#import "easyar/types.oc.h"
@interface easyar_Engine : NSObject
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Gets the version schema hash, which can be used to ensure type declarations consistent with runtime library.
/// </summary>
+ (int)schemaHash;
+ (bool)initialize:(NSString *)key;
/// <summary>
/// Handles the app onPause, pauses internal tasks.
/// </summary>
+ (void)onPause;
/// <summary>
/// Handles the app onResume, resumes internal tasks.
/// </summary>
+ (void)onResume;
/// <summary>
/// Gets error message on initialization failure.
/// </summary>
+ (NSString *)errorMessage;
/// <summary>
/// Gets the version number of EasyARSense.
/// </summary>
+ (NSString *)versionString;
/// <summary>
/// Gets the product name of EasyARSense. (Including variant, operating system and CPU architecture.)
/// </summary>
+ (NSString *)name;
@end
fileFormatVersion: 2
guid: 96c9bfaec6126e1489298477e91e6871
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_FRAME_H__
#define __EASYAR_FRAME_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Index, an automatic incremental value, which is different for every input frame.
/// </summary>
int easyar_InputFrame_index(const easyar_InputFrame * This);
/// <summary>
/// Gets image.
/// </summary>
void easyar_InputFrame_image(const easyar_InputFrame * This, /* OUT */ easyar_Image * * Return);
/// <summary>
/// Checks if there are camera parameters.
/// </summary>
bool easyar_InputFrame_hasCameraParameters(const easyar_InputFrame * This);
/// <summary>
/// Gets camera parameters.
/// </summary>
void easyar_InputFrame_cameraParameters(const easyar_InputFrame * This, /* OUT */ easyar_CameraParameters * * Return);
/// <summary>
/// Checks if there is temporal information (timestamp).
/// </summary>
bool easyar_InputFrame_hasTemporalInformation(const easyar_InputFrame * This);
/// <summary>
/// Timestamp. In seconds.
/// </summary>
double easyar_InputFrame_timestamp(const easyar_InputFrame * This);
/// <summary>
/// Checks if there is spatial information (cameraTransform and trackingStatus).
/// </summary>
bool easyar_InputFrame_hasSpatialInformation(const easyar_InputFrame * This);
/// <summary>
/// Camera transform matrix against world coordinate system. Camera coordinate system and world coordinate system are all right-handed. For the camera coordinate system, the origin is the optical center, x-right, y-up, and z in the direction of light going into camera. (The right and up, on mobile devices, is the right and up when the device is in the natural orientation.) The data arrangement is row-major, not like OpenGL&#39;s column-major.
/// </summary>
easyar_Matrix44F easyar_InputFrame_cameraTransform(const easyar_InputFrame * This);
/// <summary>
/// Gets device motion tracking status: `MotionTrackingStatus`_ .
/// </summary>
easyar_MotionTrackingStatus easyar_InputFrame_trackingStatus(const easyar_InputFrame * This);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_InputFrame_create(easyar_Image * image, easyar_CameraParameters * cameraParameters, double timestamp, easyar_Matrix44F cameraTransform, easyar_MotionTrackingStatus trackingStatus, /* OUT */ easyar_InputFrame * * Return);
/// <summary>
/// Creates an instance with image, camera parameters, and timestamp.
/// </summary>
void easyar_InputFrame_createWithImageAndCameraParametersAndTemporal(easyar_Image * image, easyar_CameraParameters * cameraParameters, double timestamp, /* OUT */ easyar_InputFrame * * Return);
/// <summary>
/// Creates an instance with image and camera parameters.
/// </summary>
void easyar_InputFrame_createWithImageAndCameraParameters(easyar_Image * image, easyar_CameraParameters * cameraParameters, /* OUT */ easyar_InputFrame * * Return);
/// <summary>
/// Creates an instance with image.
/// </summary>
void easyar_InputFrame_createWithImage(easyar_Image * image, /* OUT */ easyar_InputFrame * * Return);
void easyar_InputFrame__dtor(easyar_InputFrame * This);
void easyar_InputFrame__retain(const easyar_InputFrame * This, /* OUT */ easyar_InputFrame * * Return);
const char * easyar_InputFrame__typeName(const easyar_InputFrame * This);
void easyar_FrameFilterResult__dtor(easyar_FrameFilterResult * This);
void easyar_FrameFilterResult__retain(const easyar_FrameFilterResult * This, /* OUT */ easyar_FrameFilterResult * * Return);
const char * easyar_FrameFilterResult__typeName(const easyar_FrameFilterResult * This);
void easyar_OutputFrame__ctor(easyar_InputFrame * inputFrame, easyar_ListOfOptionalOfFrameFilterResult * results, /* OUT */ easyar_OutputFrame * * Return);
/// <summary>
/// Index, an automatic incremental value, which is different for every output frame.
/// </summary>
int easyar_OutputFrame_index(const easyar_OutputFrame * This);
/// <summary>
/// Corresponding input frame.
/// </summary>
void easyar_OutputFrame_inputFrame(const easyar_OutputFrame * This, /* OUT */ easyar_InputFrame * * Return);
/// <summary>
/// Results of synchronous components.
/// </summary>
void easyar_OutputFrame_results(const easyar_OutputFrame * This, /* OUT */ easyar_ListOfOptionalOfFrameFilterResult * * Return);
void easyar_OutputFrame__dtor(easyar_OutputFrame * This);
void easyar_OutputFrame__retain(const easyar_OutputFrame * This, /* OUT */ easyar_OutputFrame * * Return);
const char * easyar_OutputFrame__typeName(const easyar_OutputFrame * This);
void easyar_FeedbackFrame__ctor(easyar_InputFrame * inputFrame, easyar_OptionalOfOutputFrame previousOutputFrame, /* OUT */ easyar_FeedbackFrame * * Return);
/// <summary>
/// Input frame.
/// </summary>
void easyar_FeedbackFrame_inputFrame(const easyar_FeedbackFrame * This, /* OUT */ easyar_InputFrame * * Return);
/// <summary>
/// Historic output frame.
/// </summary>
void easyar_FeedbackFrame_previousOutputFrame(const easyar_FeedbackFrame * This, /* OUT */ easyar_OptionalOfOutputFrame * Return);
void easyar_FeedbackFrame__dtor(easyar_FeedbackFrame * This);
void easyar_FeedbackFrame__retain(const easyar_FeedbackFrame * This, /* OUT */ easyar_FeedbackFrame * * Return);
const char * easyar_FeedbackFrame__typeName(const easyar_FeedbackFrame * This);
void easyar_ListOfOptionalOfFrameFilterResult__ctor(easyar_OptionalOfFrameFilterResult const * begin, easyar_OptionalOfFrameFilterResult const * end, /* OUT */ easyar_ListOfOptionalOfFrameFilterResult * * Return);
void easyar_ListOfOptionalOfFrameFilterResult__dtor(easyar_ListOfOptionalOfFrameFilterResult * This);
void easyar_ListOfOptionalOfFrameFilterResult_copy(const easyar_ListOfOptionalOfFrameFilterResult * This, /* OUT */ easyar_ListOfOptionalOfFrameFilterResult * * Return);
int easyar_ListOfOptionalOfFrameFilterResult_size(const easyar_ListOfOptionalOfFrameFilterResult * This);
easyar_OptionalOfFrameFilterResult easyar_ListOfOptionalOfFrameFilterResult_at(const easyar_ListOfOptionalOfFrameFilterResult * This, int index);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: c3a4b04feaf3e984daa855177665d2ba
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_FRAME_HXX__
#define __EASYAR_FRAME_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// Input frame.
/// It includes image, camera parameters, timestamp, camera transform matrix against world coordinate system, and tracking status,
/// among which, camera parameters, timestamp, camera transform matrix and tracking status are all optional, but specific algorithms may have special requirements on the input.
/// </summary>
class InputFrame
{
protected:
easyar_InputFrame * cdata_ ;
void init_cdata(easyar_InputFrame * cdata);
virtual InputFrame & operator=(const InputFrame & data) { return *this; } //deleted
public:
InputFrame(easyar_InputFrame * cdata);
virtual ~InputFrame();
InputFrame(const InputFrame & data);
const easyar_InputFrame * get_cdata() const;
easyar_InputFrame * get_cdata();
/// <summary>
/// Index, an automatic incremental value, which is different for every input frame.
/// </summary>
int index();
/// <summary>
/// Gets image.
/// </summary>
void image(/* OUT */ Image * * Return);
/// <summary>
/// Checks if there are camera parameters.
/// </summary>
bool hasCameraParameters();
/// <summary>
/// Gets camera parameters.
/// </summary>
void cameraParameters(/* OUT */ CameraParameters * * Return);
/// <summary>
/// Checks if there is temporal information (timestamp).
/// </summary>
bool hasTemporalInformation();
/// <summary>
/// Timestamp. In seconds.
/// </summary>
double timestamp();
/// <summary>
/// Checks if there is spatial information (cameraTransform and trackingStatus).
/// </summary>
bool hasSpatialInformation();
/// <summary>
/// Camera transform matrix against world coordinate system. Camera coordinate system and world coordinate system are all right-handed. For the camera coordinate system, the origin is the optical center, x-right, y-up, and z in the direction of light going into camera. (The right and up, on mobile devices, is the right and up when the device is in the natural orientation.) The data arrangement is row-major, not like OpenGL&#39;s column-major.
/// </summary>
Matrix44F cameraTransform();
/// <summary>
/// Gets device motion tracking status: `MotionTrackingStatus`_ .
/// </summary>
MotionTrackingStatus trackingStatus();
/// <summary>
/// Creates an instance.
/// </summary>
static void create(Image * image, CameraParameters * cameraParameters, double timestamp, Matrix44F cameraTransform, MotionTrackingStatus trackingStatus, /* OUT */ InputFrame * * Return);
/// <summary>
/// Creates an instance with image, camera parameters, and timestamp.
/// </summary>
static void createWithImageAndCameraParametersAndTemporal(Image * image, CameraParameters * cameraParameters, double timestamp, /* OUT */ InputFrame * * Return);
/// <summary>
/// Creates an instance with image and camera parameters.
/// </summary>
static void createWithImageAndCameraParameters(Image * image, CameraParameters * cameraParameters, /* OUT */ InputFrame * * Return);
/// <summary>
/// Creates an instance with image.
/// </summary>
static void createWithImage(Image * image, /* OUT */ InputFrame * * Return);
};
/// <summary>
/// FrameFilterResult is the base class for result classes of all synchronous algorithm components.
/// </summary>
class FrameFilterResult
{
protected:
easyar_FrameFilterResult * cdata_ ;
void init_cdata(easyar_FrameFilterResult * cdata);
virtual FrameFilterResult & operator=(const FrameFilterResult & data) { return *this; } //deleted
public:
FrameFilterResult(easyar_FrameFilterResult * cdata);
virtual ~FrameFilterResult();
FrameFilterResult(const FrameFilterResult & data);
const easyar_FrameFilterResult * get_cdata() const;
easyar_FrameFilterResult * get_cdata();
};
/// <summary>
/// Output frame.
/// It includes input frame and results of synchronous components.
/// </summary>
class OutputFrame
{
protected:
easyar_OutputFrame * cdata_ ;
void init_cdata(easyar_OutputFrame * cdata);
virtual OutputFrame & operator=(const OutputFrame & data) { return *this; } //deleted
public:
OutputFrame(easyar_OutputFrame * cdata);
virtual ~OutputFrame();
OutputFrame(const OutputFrame & data);
const easyar_OutputFrame * get_cdata() const;
easyar_OutputFrame * get_cdata();
OutputFrame(InputFrame * inputFrame, ListOfOptionalOfFrameFilterResult * results);
/// <summary>
/// Index, an automatic incremental value, which is different for every output frame.
/// </summary>
int index();
/// <summary>
/// Corresponding input frame.
/// </summary>
void inputFrame(/* OUT */ InputFrame * * Return);
/// <summary>
/// Results of synchronous components.
/// </summary>
void results(/* OUT */ ListOfOptionalOfFrameFilterResult * * Return);
};
/// <summary>
/// Feedback frame.
/// It includes an input frame and a historic output frame for use in feedback synchronous components such as `ImageTracker`_ .
/// </summary>
class FeedbackFrame
{
protected:
easyar_FeedbackFrame * cdata_ ;
void init_cdata(easyar_FeedbackFrame * cdata);
virtual FeedbackFrame & operator=(const FeedbackFrame & data) { return *this; } //deleted
public:
FeedbackFrame(easyar_FeedbackFrame * cdata);
virtual ~FeedbackFrame();
FeedbackFrame(const FeedbackFrame & data);
const easyar_FeedbackFrame * get_cdata() const;
easyar_FeedbackFrame * get_cdata();
FeedbackFrame(InputFrame * inputFrame, OutputFrame * previousOutputFrame);
/// <summary>
/// Input frame.
/// </summary>
void inputFrame(/* OUT */ InputFrame * * Return);
/// <summary>
/// Historic output frame.
/// </summary>
void previousOutputFrame(/* OUT */ OutputFrame * * Return);
};
#ifndef __EASYAR_OPTIONALOFFRAMEFILTERRESULT__
#define __EASYAR_OPTIONALOFFRAMEFILTERRESULT__
struct OptionalOfFrameFilterResult
{
bool has_value;
FrameFilterResult * value;
};
static inline easyar_OptionalOfFrameFilterResult OptionalOfFrameFilterResult_to_c(FrameFilterResult * o);
#endif
#ifndef __EASYAR_LISTOFOPTIONALOFFRAMEFILTERRESULT__
#define __EASYAR_LISTOFOPTIONALOFFRAMEFILTERRESULT__
class ListOfOptionalOfFrameFilterResult
{
private:
easyar_ListOfOptionalOfFrameFilterResult * cdata_;
virtual ListOfOptionalOfFrameFilterResult & operator=(const ListOfOptionalOfFrameFilterResult & data) { return *this; } //deleted
public:
ListOfOptionalOfFrameFilterResult(easyar_ListOfOptionalOfFrameFilterResult * cdata);
virtual ~ListOfOptionalOfFrameFilterResult();
ListOfOptionalOfFrameFilterResult(const ListOfOptionalOfFrameFilterResult & data);
const easyar_ListOfOptionalOfFrameFilterResult * get_cdata() const;
easyar_ListOfOptionalOfFrameFilterResult * get_cdata();
ListOfOptionalOfFrameFilterResult(easyar_OptionalOfFrameFilterResult * begin, easyar_OptionalOfFrameFilterResult * end);
int size() const;
FrameFilterResult * at(int index) const;
};
#endif
#ifndef __EASYAR_OPTIONALOFOUTPUTFRAME__
#define __EASYAR_OPTIONALOFOUTPUTFRAME__
struct OptionalOfOutputFrame
{
bool has_value;
OutputFrame * value;
};
static inline easyar_OptionalOfOutputFrame OptionalOfOutputFrame_to_c(OutputFrame * o);
#endif
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FRAME_HXX__
#define __IMPLEMENTATION_EASYAR_FRAME_HXX__
#include "easyar/frame.h"
#include "easyar/image.hxx"
#include "easyar/buffer.hxx"
#include "easyar/cameraparameters.hxx"
#include "easyar/vector.hxx"
#include "easyar/matrix.hxx"
namespace easyar {
inline InputFrame::InputFrame(easyar_InputFrame * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFrame::~InputFrame()
{
if (cdata_) {
easyar_InputFrame__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFrame::InputFrame(const InputFrame & data)
:
cdata_(NULL)
{
easyar_InputFrame * cdata = NULL;
easyar_InputFrame__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFrame * InputFrame::get_cdata() const
{
return cdata_;
}
inline easyar_InputFrame * InputFrame::get_cdata()
{
return cdata_;
}
inline void InputFrame::init_cdata(easyar_InputFrame * cdata)
{
cdata_ = cdata;
}
inline int InputFrame::index()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_InputFrame_index(cdata_);
return _return_value_;
}
inline void InputFrame::image(/* OUT */ Image * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_Image * _return_value_ = NULL;
easyar_InputFrame_image(cdata_, &_return_value_);
*Return = new Image(_return_value_);
}
inline bool InputFrame::hasCameraParameters()
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_InputFrame_hasCameraParameters(cdata_);
return _return_value_;
}
inline void InputFrame::cameraParameters(/* OUT */ CameraParameters * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_CameraParameters * _return_value_ = NULL;
easyar_InputFrame_cameraParameters(cdata_, &_return_value_);
*Return = new CameraParameters(_return_value_);
}
inline bool InputFrame::hasTemporalInformation()
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_InputFrame_hasTemporalInformation(cdata_);
return _return_value_;
}
inline double InputFrame::timestamp()
{
if (cdata_ == NULL) {
return double();
}
double _return_value_ = easyar_InputFrame_timestamp(cdata_);
return _return_value_;
}
inline bool InputFrame::hasSpatialInformation()
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_InputFrame_hasSpatialInformation(cdata_);
return _return_value_;
}
inline Matrix44F InputFrame::cameraTransform()
{
if (cdata_ == NULL) {
return Matrix44F();
}
easyar_Matrix44F _return_value_ = easyar_InputFrame_cameraTransform(cdata_);
return Matrix44F(_return_value_.data[0], _return_value_.data[1], _return_value_.data[2], _return_value_.data[3], _return_value_.data[4], _return_value_.data[5], _return_value_.data[6], _return_value_.data[7], _return_value_.data[8], _return_value_.data[9], _return_value_.data[10], _return_value_.data[11], _return_value_.data[12], _return_value_.data[13], _return_value_.data[14], _return_value_.data[15]);
}
inline MotionTrackingStatus InputFrame::trackingStatus()
{
if (cdata_ == NULL) {
return MotionTrackingStatus();
}
easyar_MotionTrackingStatus _return_value_ = easyar_InputFrame_trackingStatus(cdata_);
return static_cast<MotionTrackingStatus>(_return_value_);
}
inline void InputFrame::create(Image * arg0, CameraParameters * arg1, double arg2, Matrix44F arg3, MotionTrackingStatus arg4, /* OUT */ InputFrame * * Return)
{
easyar_InputFrame * _return_value_ = NULL;
easyar_InputFrame_create(arg0->get_cdata(), arg1->get_cdata(), arg2, arg3.get_cdata(), static_cast<easyar_MotionTrackingStatus>(arg4), &_return_value_);
*Return = new InputFrame(_return_value_);
}
inline void InputFrame::createWithImageAndCameraParametersAndTemporal(Image * arg0, CameraParameters * arg1, double arg2, /* OUT */ InputFrame * * Return)
{
easyar_InputFrame * _return_value_ = NULL;
easyar_InputFrame_createWithImageAndCameraParametersAndTemporal(arg0->get_cdata(), arg1->get_cdata(), arg2, &_return_value_);
*Return = new InputFrame(_return_value_);
}
inline void InputFrame::createWithImageAndCameraParameters(Image * arg0, CameraParameters * arg1, /* OUT */ InputFrame * * Return)
{
easyar_InputFrame * _return_value_ = NULL;
easyar_InputFrame_createWithImageAndCameraParameters(arg0->get_cdata(), arg1->get_cdata(), &_return_value_);
*Return = new InputFrame(_return_value_);
}
inline void InputFrame::createWithImage(Image * arg0, /* OUT */ InputFrame * * Return)
{
easyar_InputFrame * _return_value_ = NULL;
easyar_InputFrame_createWithImage(arg0->get_cdata(), &_return_value_);
*Return = new InputFrame(_return_value_);
}
inline FrameFilterResult::FrameFilterResult(easyar_FrameFilterResult * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline FrameFilterResult::~FrameFilterResult()
{
if (cdata_) {
easyar_FrameFilterResult__dtor(cdata_);
cdata_ = NULL;
}
}
inline FrameFilterResult::FrameFilterResult(const FrameFilterResult & data)
:
cdata_(NULL)
{
easyar_FrameFilterResult * cdata = NULL;
easyar_FrameFilterResult__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_FrameFilterResult * FrameFilterResult::get_cdata() const
{
return cdata_;
}
inline easyar_FrameFilterResult * FrameFilterResult::get_cdata()
{
return cdata_;
}
inline void FrameFilterResult::init_cdata(easyar_FrameFilterResult * cdata)
{
cdata_ = cdata;
}
inline OutputFrame::OutputFrame(easyar_OutputFrame * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline OutputFrame::~OutputFrame()
{
if (cdata_) {
easyar_OutputFrame__dtor(cdata_);
cdata_ = NULL;
}
}
inline OutputFrame::OutputFrame(const OutputFrame & data)
:
cdata_(NULL)
{
easyar_OutputFrame * cdata = NULL;
easyar_OutputFrame__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_OutputFrame * OutputFrame::get_cdata() const
{
return cdata_;
}
inline easyar_OutputFrame * OutputFrame::get_cdata()
{
return cdata_;
}
inline void OutputFrame::init_cdata(easyar_OutputFrame * cdata)
{
cdata_ = cdata;
}
inline OutputFrame::OutputFrame(InputFrame * arg0, ListOfOptionalOfFrameFilterResult * arg1)
:
cdata_(NULL)
{
easyar_OutputFrame * _return_value_ = NULL;
easyar_OutputFrame__ctor(arg0->get_cdata(), arg1->get_cdata(), &_return_value_);
init_cdata(_return_value_);
}
inline int OutputFrame::index()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_OutputFrame_index(cdata_);
return _return_value_;
}
inline void OutputFrame::inputFrame(/* OUT */ InputFrame * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrame * _return_value_ = NULL;
easyar_OutputFrame_inputFrame(cdata_, &_return_value_);
*Return = new InputFrame(_return_value_);
}
inline void OutputFrame::results(/* OUT */ ListOfOptionalOfFrameFilterResult * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_ListOfOptionalOfFrameFilterResult * _return_value_ = NULL;
easyar_OutputFrame_results(cdata_, &_return_value_);
*Return = new ListOfOptionalOfFrameFilterResult(_return_value_);
}
inline FeedbackFrame::FeedbackFrame(easyar_FeedbackFrame * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline FeedbackFrame::~FeedbackFrame()
{
if (cdata_) {
easyar_FeedbackFrame__dtor(cdata_);
cdata_ = NULL;
}
}
inline FeedbackFrame::FeedbackFrame(const FeedbackFrame & data)
:
cdata_(NULL)
{
easyar_FeedbackFrame * cdata = NULL;
easyar_FeedbackFrame__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_FeedbackFrame * FeedbackFrame::get_cdata() const
{
return cdata_;
}
inline easyar_FeedbackFrame * FeedbackFrame::get_cdata()
{
return cdata_;
}
inline void FeedbackFrame::init_cdata(easyar_FeedbackFrame * cdata)
{
cdata_ = cdata;
}
inline FeedbackFrame::FeedbackFrame(InputFrame * arg0, OutputFrame * arg1)
:
cdata_(NULL)
{
easyar_FeedbackFrame * _return_value_ = NULL;
easyar_FeedbackFrame__ctor(arg0->get_cdata(), OptionalOfOutputFrame_to_c(arg1), &_return_value_);
init_cdata(_return_value_);
}
inline void FeedbackFrame::inputFrame(/* OUT */ InputFrame * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrame * _return_value_ = NULL;
easyar_FeedbackFrame_inputFrame(cdata_, &_return_value_);
*Return = new InputFrame(_return_value_);
}
inline void FeedbackFrame::previousOutputFrame(/* OUT */ OutputFrame * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OptionalOfOutputFrame _return_value_ = {false, NULL};
easyar_FeedbackFrame_previousOutputFrame(cdata_, &_return_value_);
*Return = (_return_value_.has_value ? new OutputFrame(_return_value_.value) : NULL);
}
#ifndef __IMPLEMENTATION_EASYAR_LISTOFOPTIONALOFFRAMEFILTERRESULT__
#define __IMPLEMENTATION_EASYAR_LISTOFOPTIONALOFFRAMEFILTERRESULT__
inline ListOfOptionalOfFrameFilterResult::ListOfOptionalOfFrameFilterResult(easyar_ListOfOptionalOfFrameFilterResult * cdata)
: cdata_(cdata)
{
}
inline ListOfOptionalOfFrameFilterResult::~ListOfOptionalOfFrameFilterResult()
{
if (cdata_) {
easyar_ListOfOptionalOfFrameFilterResult__dtor(cdata_);
cdata_ = NULL;
}
}
inline ListOfOptionalOfFrameFilterResult::ListOfOptionalOfFrameFilterResult(const ListOfOptionalOfFrameFilterResult & data)
: cdata_(static_cast<easyar_ListOfOptionalOfFrameFilterResult *>(NULL))
{
easyar_ListOfOptionalOfFrameFilterResult_copy(data.cdata_, &cdata_);
}
inline const easyar_ListOfOptionalOfFrameFilterResult * ListOfOptionalOfFrameFilterResult::get_cdata() const
{
return cdata_;
}
inline easyar_ListOfOptionalOfFrameFilterResult * ListOfOptionalOfFrameFilterResult::get_cdata()
{
return cdata_;
}
inline ListOfOptionalOfFrameFilterResult::ListOfOptionalOfFrameFilterResult(easyar_OptionalOfFrameFilterResult * begin, easyar_OptionalOfFrameFilterResult * end)
: cdata_(static_cast<easyar_ListOfOptionalOfFrameFilterResult *>(NULL))
{
easyar_ListOfOptionalOfFrameFilterResult__ctor(begin, end, &cdata_);
}
inline int ListOfOptionalOfFrameFilterResult::size() const
{
return easyar_ListOfOptionalOfFrameFilterResult_size(cdata_);
}
inline FrameFilterResult * ListOfOptionalOfFrameFilterResult::at(int index) const
{
easyar_OptionalOfFrameFilterResult _return_value_ = easyar_ListOfOptionalOfFrameFilterResult_at(cdata_, index);
if (_return_value_.has_value) { easyar_FrameFilterResult__retain(_return_value_.value, &_return_value_.value); }
return (_return_value_.has_value ? new FrameFilterResult(_return_value_.value) : NULL);
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFFRAMEFILTERRESULT__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFFRAMEFILTERRESULT__
static inline easyar_OptionalOfFrameFilterResult OptionalOfFrameFilterResult_to_c(FrameFilterResult * o)
{
if (o != NULL) {
easyar_OptionalOfFrameFilterResult _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfFrameFilterResult _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFOUTPUTFRAME__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFOUTPUTFRAME__
static inline easyar_OptionalOfOutputFrame OptionalOfOutputFrame_to_c(OutputFrame * o)
{
if (o != NULL) {
easyar_OptionalOfOutputFrame _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfOutputFrame _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
}
#endif
fileFormatVersion: 2
guid: 35d105cfa2f11b84db100b2e17e9e904
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#import "easyar/types.oc.h"
/// <summary>
/// Input frame.
/// It includes image, camera parameters, timestamp, camera transform matrix against world coordinate system, and tracking status,
/// among which, camera parameters, timestamp, camera transform matrix and tracking status are all optional, but specific algorithms may have special requirements on the input.
/// </summary>
@interface easyar_InputFrame : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Index, an automatic incremental value, which is different for every input frame.
/// </summary>
- (int)index;
/// <summary>
/// Gets image.
/// </summary>
- (easyar_Image *)image;
/// <summary>
/// Checks if there are camera parameters.
/// </summary>
- (bool)hasCameraParameters;
/// <summary>
/// Gets camera parameters.
/// </summary>
- (easyar_CameraParameters *)cameraParameters;
/// <summary>
/// Checks if there is temporal information (timestamp).
/// </summary>
- (bool)hasTemporalInformation;
/// <summary>
/// Timestamp. In seconds.
/// </summary>
- (double)timestamp;
/// <summary>
/// Checks if there is spatial information (cameraTransform and trackingStatus).
/// </summary>
- (bool)hasSpatialInformation;
/// <summary>
/// Camera transform matrix against world coordinate system. Camera coordinate system and world coordinate system are all right-handed. For the camera coordinate system, the origin is the optical center, x-right, y-up, and z in the direction of light going into camera. (The right and up, on mobile devices, is the right and up when the device is in the natural orientation.) The data arrangement is row-major, not like OpenGL&#39;s column-major.
/// </summary>
- (easyar_Matrix44F *)cameraTransform;
/// <summary>
/// Gets device motion tracking status: `MotionTrackingStatus`_ .
/// </summary>
- (easyar_MotionTrackingStatus)trackingStatus;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_InputFrame *)create:(easyar_Image *)image cameraParameters:(easyar_CameraParameters *)cameraParameters timestamp:(double)timestamp cameraTransform:(easyar_Matrix44F *)cameraTransform trackingStatus:(easyar_MotionTrackingStatus)trackingStatus;
/// <summary>
/// Creates an instance with image, camera parameters, and timestamp.
/// </summary>
+ (easyar_InputFrame *)createWithImageAndCameraParametersAndTemporal:(easyar_Image *)image cameraParameters:(easyar_CameraParameters *)cameraParameters timestamp:(double)timestamp;
/// <summary>
/// Creates an instance with image and camera parameters.
/// </summary>
+ (easyar_InputFrame *)createWithImageAndCameraParameters:(easyar_Image *)image cameraParameters:(easyar_CameraParameters *)cameraParameters;
/// <summary>
/// Creates an instance with image.
/// </summary>
+ (easyar_InputFrame *)createWithImage:(easyar_Image *)image;
@end
/// <summary>
/// FrameFilterResult is the base class for result classes of all synchronous algorithm components.
/// </summary>
@interface easyar_FrameFilterResult : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
@end
/// <summary>
/// Output frame.
/// It includes input frame and results of synchronous components.
/// </summary>
@interface easyar_OutputFrame : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
+ (easyar_OutputFrame *) create:(easyar_InputFrame *)inputFrame results:(NSArray<easyar_FrameFilterResult *> *)results;
/// <summary>
/// Index, an automatic incremental value, which is different for every output frame.
/// </summary>
- (int)index;
/// <summary>
/// Corresponding input frame.
/// </summary>
- (easyar_InputFrame *)inputFrame;
/// <summary>
/// Results of synchronous components.
/// </summary>
- (NSArray<easyar_FrameFilterResult *> *)results;
@end
/// <summary>
/// Feedback frame.
/// It includes an input frame and a historic output frame for use in feedback synchronous components such as `ImageTracker`_ .
/// </summary>
@interface easyar_FeedbackFrame : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
+ (easyar_FeedbackFrame *) create:(easyar_InputFrame *)inputFrame previousOutputFrame:(easyar_OutputFrame *)previousOutputFrame;
/// <summary>
/// Input frame.
/// </summary>
- (easyar_InputFrame *)inputFrame;
/// <summary>
/// Historic output frame.
/// </summary>
- (easyar_OutputFrame *)previousOutputFrame;
@end
fileFormatVersion: 2
guid: 61a42a3740c3f414fb7b5103767ede16
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_FRAMERECORDER_H__
#define __EASYAR_FRAMERECORDER_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Input port.
/// </summary>
void easyar_InputFrameRecorder_input(easyar_InputFrameRecorder * This, /* OUT */ easyar_InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int easyar_InputFrameRecorder_bufferRequirement(easyar_InputFrameRecorder * This);
/// <summary>
/// Output port.
/// </summary>
void easyar_InputFrameRecorder_output(easyar_InputFrameRecorder * This, /* OUT */ easyar_InputFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_InputFrameRecorder_create(/* OUT */ easyar_InputFrameRecorder * * Return);
/// <summary>
/// Starts frame recording. initialScreenRotation is the initial screen rotation when recording data, and it will be used in rendering for playback. The definition of screen rotation is the same as in `CameraParameters`_ .
/// </summary>
bool easyar_InputFrameRecorder_start(easyar_InputFrameRecorder * This, easyar_String * filePath, int initialScreenRotation);
/// <summary>
/// Stops frame recording. It will only stop recording and will not affect connection.
/// </summary>
void easyar_InputFrameRecorder_stop(easyar_InputFrameRecorder * This);
void easyar_InputFrameRecorder__dtor(easyar_InputFrameRecorder * This);
void easyar_InputFrameRecorder__retain(const easyar_InputFrameRecorder * This, /* OUT */ easyar_InputFrameRecorder * * Return);
const char * easyar_InputFrameRecorder__typeName(const easyar_InputFrameRecorder * This);
/// <summary>
/// Output port.
/// </summary>
void easyar_InputFramePlayer_output(easyar_InputFramePlayer * This, /* OUT */ easyar_InputFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_InputFramePlayer_create(/* OUT */ easyar_InputFramePlayer * * Return);
/// <summary>
/// Starts frame play.
/// </summary>
bool easyar_InputFramePlayer_start(easyar_InputFramePlayer * This, easyar_String * filePath);
/// <summary>
/// Stops frame play.
/// </summary>
void easyar_InputFramePlayer_stop(easyar_InputFramePlayer * This);
/// <summary>
/// Pauses frame play.
/// </summary>
void easyar_InputFramePlayer_pause(easyar_InputFramePlayer * This);
/// <summary>
/// Resumes frame play.
/// </summary>
bool easyar_InputFramePlayer_resume(easyar_InputFramePlayer * This);
/// <summary>
/// Total expected playback time span. The unit is second.
/// </summary>
double easyar_InputFramePlayer_totalTime(easyar_InputFramePlayer * This);
/// <summary>
/// Current playback time point. The unit is second. The initial value is 0.
/// </summary>
double easyar_InputFramePlayer_currentTime(easyar_InputFramePlayer * This);
/// <summary>
/// The initial screen rotation when recording data.
/// </summary>
int easyar_InputFramePlayer_initalScreenRotation(easyar_InputFramePlayer * This);
/// <summary>
/// Whether the playback is completed.
/// </summary>
bool easyar_InputFramePlayer_isCompleted(easyar_InputFramePlayer * This);
void easyar_InputFramePlayer__dtor(easyar_InputFramePlayer * This);
void easyar_InputFramePlayer__retain(const easyar_InputFramePlayer * This, /* OUT */ easyar_InputFramePlayer * * Return);
const char * easyar_InputFramePlayer__typeName(const easyar_InputFramePlayer * This);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 8f356b7bf4697be46b3365032336aa68
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_FRAMERECORDER_HXX__
#define __EASYAR_FRAMERECORDER_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// Input frame recorder.
/// There is an input frame input port and an input frame output port. It can be used to record input frames into an EIF file. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
class InputFrameRecorder
{
protected:
easyar_InputFrameRecorder * cdata_ ;
void init_cdata(easyar_InputFrameRecorder * cdata);
virtual InputFrameRecorder & operator=(const InputFrameRecorder & data) { return *this; } //deleted
public:
InputFrameRecorder(easyar_InputFrameRecorder * cdata);
virtual ~InputFrameRecorder();
InputFrameRecorder(const InputFrameRecorder & data);
const easyar_InputFrameRecorder * get_cdata() const;
easyar_InputFrameRecorder * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(/* OUT */ InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int bufferRequirement();
/// <summary>
/// Output port.
/// </summary>
void output(/* OUT */ InputFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
static void create(/* OUT */ InputFrameRecorder * * Return);
/// <summary>
/// Starts frame recording. initialScreenRotation is the initial screen rotation when recording data, and it will be used in rendering for playback. The definition of screen rotation is the same as in `CameraParameters`_ .
/// </summary>
bool start(String * filePath, int initialScreenRotation);
/// <summary>
/// Stops frame recording. It will only stop recording and will not affect connection.
/// </summary>
void stop();
};
/// <summary>
/// Input frame player.
/// There is an input frame output port. It can be used to get input frame from an EIF file. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
class InputFramePlayer
{
protected:
easyar_InputFramePlayer * cdata_ ;
void init_cdata(easyar_InputFramePlayer * cdata);
virtual InputFramePlayer & operator=(const InputFramePlayer & data) { return *this; } //deleted
public:
InputFramePlayer(easyar_InputFramePlayer * cdata);
virtual ~InputFramePlayer();
InputFramePlayer(const InputFramePlayer & data);
const easyar_InputFramePlayer * get_cdata() const;
easyar_InputFramePlayer * get_cdata();
/// <summary>
/// Output port.
/// </summary>
void output(/* OUT */ InputFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
static void create(/* OUT */ InputFramePlayer * * Return);
/// <summary>
/// Starts frame play.
/// </summary>
bool start(String * filePath);
/// <summary>
/// Stops frame play.
/// </summary>
void stop();
/// <summary>
/// Pauses frame play.
/// </summary>
void pause();
/// <summary>
/// Resumes frame play.
/// </summary>
bool resume();
/// <summary>
/// Total expected playback time span. The unit is second.
/// </summary>
double totalTime();
/// <summary>
/// Current playback time point. The unit is second. The initial value is 0.
/// </summary>
double currentTime();
/// <summary>
/// The initial screen rotation when recording data.
/// </summary>
int initalScreenRotation();
/// <summary>
/// Whether the playback is completed.
/// </summary>
bool isCompleted();
};
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FRAMERECORDER_HXX__
#define __IMPLEMENTATION_EASYAR_FRAMERECORDER_HXX__
#include "easyar/framerecorder.h"
#include "easyar/dataflow.hxx"
#include "easyar/frame.hxx"
#include "easyar/image.hxx"
#include "easyar/buffer.hxx"
#include "easyar/cameraparameters.hxx"
#include "easyar/vector.hxx"
#include "easyar/matrix.hxx"
namespace easyar {
inline InputFrameRecorder::InputFrameRecorder(easyar_InputFrameRecorder * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFrameRecorder::~InputFrameRecorder()
{
if (cdata_) {
easyar_InputFrameRecorder__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFrameRecorder::InputFrameRecorder(const InputFrameRecorder & data)
:
cdata_(NULL)
{
easyar_InputFrameRecorder * cdata = NULL;
easyar_InputFrameRecorder__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFrameRecorder * InputFrameRecorder::get_cdata() const
{
return cdata_;
}
inline easyar_InputFrameRecorder * InputFrameRecorder::get_cdata()
{
return cdata_;
}
inline void InputFrameRecorder::init_cdata(easyar_InputFrameRecorder * cdata)
{
cdata_ = cdata;
}
inline void InputFrameRecorder::input(/* OUT */ InputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSink * _return_value_ = NULL;
easyar_InputFrameRecorder_input(cdata_, &_return_value_);
*Return = new InputFrameSink(_return_value_);
}
inline int InputFrameRecorder::bufferRequirement()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_InputFrameRecorder_bufferRequirement(cdata_);
return _return_value_;
}
inline void InputFrameRecorder::output(/* OUT */ InputFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSource * _return_value_ = NULL;
easyar_InputFrameRecorder_output(cdata_, &_return_value_);
*Return = new InputFrameSource(_return_value_);
}
inline void InputFrameRecorder::create(/* OUT */ InputFrameRecorder * * Return)
{
easyar_InputFrameRecorder * _return_value_ = NULL;
easyar_InputFrameRecorder_create(&_return_value_);
*Return = new InputFrameRecorder(_return_value_);
}
inline bool InputFrameRecorder::start(String * arg0, int arg1)
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_InputFrameRecorder_start(cdata_, arg0->get_cdata(), arg1);
return _return_value_;
}
inline void InputFrameRecorder::stop()
{
if (cdata_ == NULL) {
return;
}
easyar_InputFrameRecorder_stop(cdata_);
}
inline InputFramePlayer::InputFramePlayer(easyar_InputFramePlayer * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFramePlayer::~InputFramePlayer()
{
if (cdata_) {
easyar_InputFramePlayer__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFramePlayer::InputFramePlayer(const InputFramePlayer & data)
:
cdata_(NULL)
{
easyar_InputFramePlayer * cdata = NULL;
easyar_InputFramePlayer__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFramePlayer * InputFramePlayer::get_cdata() const
{
return cdata_;
}
inline easyar_InputFramePlayer * InputFramePlayer::get_cdata()
{
return cdata_;
}
inline void InputFramePlayer::init_cdata(easyar_InputFramePlayer * cdata)
{
cdata_ = cdata;
}
inline void InputFramePlayer::output(/* OUT */ InputFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSource * _return_value_ = NULL;
easyar_InputFramePlayer_output(cdata_, &_return_value_);
*Return = new InputFrameSource(_return_value_);
}
inline void InputFramePlayer::create(/* OUT */ InputFramePlayer * * Return)
{
easyar_InputFramePlayer * _return_value_ = NULL;
easyar_InputFramePlayer_create(&_return_value_);
*Return = new InputFramePlayer(_return_value_);
}
inline bool InputFramePlayer::start(String * arg0)
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_InputFramePlayer_start(cdata_, arg0->get_cdata());
return _return_value_;
}
inline void InputFramePlayer::stop()
{
if (cdata_ == NULL) {
return;
}
easyar_InputFramePlayer_stop(cdata_);
}
inline void InputFramePlayer::pause()
{
if (cdata_ == NULL) {
return;
}
easyar_InputFramePlayer_pause(cdata_);
}
inline bool InputFramePlayer::resume()
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_InputFramePlayer_resume(cdata_);
return _return_value_;
}
inline double InputFramePlayer::totalTime()
{
if (cdata_ == NULL) {
return double();
}
double _return_value_ = easyar_InputFramePlayer_totalTime(cdata_);
return _return_value_;
}
inline double InputFramePlayer::currentTime()
{
if (cdata_ == NULL) {
return double();
}
double _return_value_ = easyar_InputFramePlayer_currentTime(cdata_);
return _return_value_;
}
inline int InputFramePlayer::initalScreenRotation()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_InputFramePlayer_initalScreenRotation(cdata_);
return _return_value_;
}
inline bool InputFramePlayer::isCompleted()
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_InputFramePlayer_isCompleted(cdata_);
return _return_value_;
}
}
#endif
fileFormatVersion: 2
guid: b78afecc362864c4f85ee68c10864d3e
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#import "easyar/types.oc.h"
/// <summary>
/// Input frame recorder.
/// There is an input frame input port and an input frame output port. It can be used to record input frames into an EIF file. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_InputFrameRecorder : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_InputFrameSink *)input;
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
- (int)bufferRequirement;
/// <summary>
/// Output port.
/// </summary>
- (easyar_InputFrameSource *)output;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_InputFrameRecorder *)create;
/// <summary>
/// Starts frame recording. initialScreenRotation is the initial screen rotation when recording data, and it will be used in rendering for playback. The definition of screen rotation is the same as in `CameraParameters`_ .
/// </summary>
- (bool)start:(NSString *)filePath initialScreenRotation:(int)initialScreenRotation;
/// <summary>
/// Stops frame recording. It will only stop recording and will not affect connection.
/// </summary>
- (void)stop;
@end
/// <summary>
/// Input frame player.
/// There is an input frame output port. It can be used to get input frame from an EIF file. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_InputFramePlayer : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Output port.
/// </summary>
- (easyar_InputFrameSource *)output;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_InputFramePlayer *)create;
/// <summary>
/// Starts frame play.
/// </summary>
- (bool)start:(NSString *)filePath;
/// <summary>
/// Stops frame play.
/// </summary>
- (void)stop;
/// <summary>
/// Pauses frame play.
/// </summary>
- (void)pause;
/// <summary>
/// Resumes frame play.
/// </summary>
- (bool)resume;
/// <summary>
/// Total expected playback time span. The unit is second.
/// </summary>
- (double)totalTime;
/// <summary>
/// Current playback time point. The unit is second. The initial value is 0.
/// </summary>
- (double)currentTime;
/// <summary>
/// The initial screen rotation when recording data.
/// </summary>
- (int)initalScreenRotation;
/// <summary>
/// Whether the playback is completed.
/// </summary>
- (bool)isCompleted;
@end
fileFormatVersion: 2
guid: 73597e51b44279a4482bdfca3f3580c8
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_IMAGE_H__
#define __EASYAR_IMAGE_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
void easyar_Image__ctor(easyar_Buffer * buffer, easyar_PixelFormat format, int width, int height, /* OUT */ easyar_Image * * Return);
/// <summary>
/// Returns buffer inside image. It can be used to access internal data of image. The content of `Buffer`_ shall not be modified, as they may be accessed from other threads.
/// </summary>
void easyar_Image_buffer(const easyar_Image * This, /* OUT */ easyar_Buffer * * Return);
/// <summary>
/// Returns image format.
/// </summary>
easyar_PixelFormat easyar_Image_format(const easyar_Image * This);
/// <summary>
/// Returns image width.
/// </summary>
int easyar_Image_width(const easyar_Image * This);
/// <summary>
/// Returns image height.
/// </summary>
int easyar_Image_height(const easyar_Image * This);
void easyar_Image__dtor(easyar_Image * This);
void easyar_Image__retain(const easyar_Image * This, /* OUT */ easyar_Image * * Return);
const char * easyar_Image__typeName(const easyar_Image * This);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 0b00e95668d77ad4e82270dcfcbdb91f
timeCreated: 1611716671
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_IMAGE_HXX__
#define __EASYAR_IMAGE_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// Image stores an image data and represents an image in memory.
/// Image raw data can be accessed as byte array. The width/height/etc information are also accessible.
/// You can always access image data since the first version of EasyAR Sense.
///
/// You can do this in iOS
/// ::
///
/// #import &lt;easyar/buffer.oc.h&gt;
/// #import &lt;easyar/image.oc.h&gt;
///
/// easyar_OutputFrame * outputFrame = [outputFrameBuffer peek];
/// if (outputFrame != nil) {
/// easyar_Image * i = [[outputFrame inputFrame] image];
/// easyar_Buffer * b = [i buffer];
/// char * bytes = calloc([b size], 1);
/// memcpy(bytes, [b data], [b size]);
/// // use bytes here
/// free(bytes);
/// }
///
/// Or in Android
/// ::
///
/// import cn.easyar.*;
///
/// OutputFrame outputFrame = outputFrameBuffer.peek();
/// if (outputFrame != null) {
/// InputFrame inputFrame = outputFrame.inputFrame();
/// Image i = inputFrame.image();
/// Buffer b = i.buffer();
/// byte[] bytes = new byte[b.size()];
/// b.copyToByteArray(0, bytes, 0, bytes.length);
/// // use bytes here
/// b.dispose();
/// i.dispose();
/// inputFrame.dispose();
/// outputFrame.dispose();
/// }
/// </summary>
class Image
{
protected:
easyar_Image * cdata_ ;
void init_cdata(easyar_Image * cdata);
virtual Image & operator=(const Image & data) { return *this; } //deleted
public:
Image(easyar_Image * cdata);
virtual ~Image();
Image(const Image & data);
const easyar_Image * get_cdata() const;
easyar_Image * get_cdata();
Image(Buffer * buffer, PixelFormat format, int width, int height);
/// <summary>
/// Returns buffer inside image. It can be used to access internal data of image. The content of `Buffer`_ shall not be modified, as they may be accessed from other threads.
/// </summary>
void buffer(/* OUT */ Buffer * * Return);
/// <summary>
/// Returns image format.
/// </summary>
PixelFormat format();
/// <summary>
/// Returns image width.
/// </summary>
int width();
/// <summary>
/// Returns image height.
/// </summary>
int height();
};
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_IMAGE_HXX__
#define __IMPLEMENTATION_EASYAR_IMAGE_HXX__
#include "easyar/image.h"
#include "easyar/buffer.hxx"
namespace easyar {
inline Image::Image(easyar_Image * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline Image::~Image()
{
if (cdata_) {
easyar_Image__dtor(cdata_);
cdata_ = NULL;
}
}
inline Image::Image(const Image & data)
:
cdata_(NULL)
{
easyar_Image * cdata = NULL;
easyar_Image__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_Image * Image::get_cdata() const
{
return cdata_;
}
inline easyar_Image * Image::get_cdata()
{
return cdata_;
}
inline void Image::init_cdata(easyar_Image * cdata)
{
cdata_ = cdata;
}
inline Image::Image(Buffer * arg0, PixelFormat arg1, int arg2, int arg3)
:
cdata_(NULL)
{
easyar_Image * _return_value_ = NULL;
easyar_Image__ctor(arg0->get_cdata(), static_cast<easyar_PixelFormat>(arg1), arg2, arg3, &_return_value_);
init_cdata(_return_value_);
}
inline void Image::buffer(/* OUT */ Buffer * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_Buffer * _return_value_ = NULL;
easyar_Image_buffer(cdata_, &_return_value_);
*Return = new Buffer(_return_value_);
}
inline PixelFormat Image::format()
{
if (cdata_ == NULL) {
return PixelFormat();
}
easyar_PixelFormat _return_value_ = easyar_Image_format(cdata_);
return static_cast<PixelFormat>(_return_value_);
}
inline int Image::width()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_Image_width(cdata_);
return _return_value_;
}
inline int Image::height()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_Image_height(cdata_);
return _return_value_;
}
}
#endif
fileFormatVersion: 2
guid: 574e636e6f3cd3046811d1cbbb2e84ea
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#import "easyar/types.oc.h"
/// <summary>
/// Image stores an image data and represents an image in memory.
/// Image raw data can be accessed as byte array. The width/height/etc information are also accessible.
/// You can always access image data since the first version of EasyAR Sense.
///
/// You can do this in iOS
/// ::
///
/// #import &lt;easyar/buffer.oc.h&gt;
/// #import &lt;easyar/image.oc.h&gt;
///
/// easyar_OutputFrame * outputFrame = [outputFrameBuffer peek];
/// if (outputFrame != nil) {
/// easyar_Image * i = [[outputFrame inputFrame] image];
/// easyar_Buffer * b = [i buffer];
/// char * bytes = calloc([b size], 1);
/// memcpy(bytes, [b data], [b size]);
/// // use bytes here
/// free(bytes);
/// }
///
/// Or in Android
/// ::
///
/// import cn.easyar.*;
///
/// OutputFrame outputFrame = outputFrameBuffer.peek();
/// if (outputFrame != null) {
/// InputFrame inputFrame = outputFrame.inputFrame();
/// Image i = inputFrame.image();
/// Buffer b = i.buffer();
/// byte[] bytes = new byte[b.size()];
/// b.copyToByteArray(0, bytes, 0, bytes.length);
/// // use bytes here
/// b.dispose();
/// i.dispose();
/// inputFrame.dispose();
/// outputFrame.dispose();
/// }
/// </summary>
@interface easyar_Image : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
+ (easyar_Image *) create:(easyar_Buffer *)buffer format:(easyar_PixelFormat)format width:(int)width height:(int)height;
/// <summary>
/// Returns buffer inside image. It can be used to access internal data of image. The content of `Buffer`_ shall not be modified, as they may be accessed from other threads.
/// </summary>
- (easyar_Buffer *)buffer;
/// <summary>
/// Returns image format.
/// </summary>
- (easyar_PixelFormat)format;
/// <summary>
/// Returns image width.
/// </summary>
- (int)width;
/// <summary>
/// Returns image height.
/// </summary>
- (int)height;
@end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment