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

update final design

parent 1444629e
fileFormatVersion: 2
guid: bf2b55f98dac4e0469e66f0e2bf7d4f6
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>
/// ARKitCameraDevice implements a camera device based on ARKit, which outputs `InputFrame`_ (including image, camera parameters, timestamp, 6DOF location, and tracking status).
/// After creation, start/stop can be invoked to start or stop data collection.
/// When the component is not needed anymore, call close function to close it. It shall not be used after calling close.
/// ARKitCameraDevice outputs `InputFrame`_ from inputFrameSource. inputFrameSource shall be connected to `InputFrameSink`_ for use. Refer to `Overview &lt;Overview.html&gt;`__ .
/// bufferCapacity is the capacity of `InputFrame`_ buffer. If the count of `InputFrame`_ which has been output from the device and have not been released is more than this number, the device will not output new `InputFrame`_ , until previous `InputFrame`_ have been released. This may cause screen stuck. Refer to `Overview &lt;Overview.html&gt;`__ .
/// </summary>
@interface easyar_ARKitCameraDevice : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
+ (easyar_ARKitCameraDevice *) create;
/// <summary>
/// Checks if the component is available. It returns true only on iOS 11 or later when ARKit is supported by hardware.
/// </summary>
+ (bool)isAvailable;
/// <summary>
/// `InputFrame`_ buffer capacity. The default is 8.
/// </summary>
- (int)bufferCapacity;
/// <summary>
/// Sets `InputFrame`_ buffer capacity.
/// </summary>
- (void)setBufferCapacity:(int)capacity;
/// <summary>
/// `InputFrame`_ output port.
/// </summary>
- (easyar_InputFrameSource *)inputFrameSource;
/// <summary>
/// Starts video stream capture.
/// </summary>
- (bool)start;
/// <summary>
/// Stops video stream capture.
/// </summary>
- (void)stop;
/// <summary>
/// Close. The component shall not be used after calling close.
/// </summary>
- (void)close;
@end
fileFormatVersion: 2
guid: d014bd11d05f05f44bf3e76d299f1099
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_BUFFER_H__
#define __EASYAR_BUFFER_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Wraps a raw memory block. When Buffer is released by all holders, deleter callback will be invoked to execute user-defined memory destruction. deleter must be thread-safe.
/// </summary>
void easyar_Buffer_wrap(void * ptr, int size, easyar_FunctorOfVoid deleter, /* OUT */ easyar_Buffer * * Return);
/// <summary>
/// Creates a Buffer of specified byte size.
/// </summary>
void easyar_Buffer_create(int size, /* OUT */ easyar_Buffer * * Return);
/// <summary>
/// Returns raw data address.
/// </summary>
void * easyar_Buffer_data(const easyar_Buffer * This);
/// <summary>
/// Byte size of raw data.
/// </summary>
int easyar_Buffer_size(const easyar_Buffer * This);
/// <summary>
/// Copies raw memory. It can be used in languages or platforms without complete support for memory operations.
/// </summary>
void easyar_Buffer_memoryCopy(void * src, void * dest, int length);
/// <summary>
/// Tries to copy data from a raw memory address into Buffer. If copy succeeds, it returns true, or else it returns false. Possible failure causes includes: source or destination data range overflow.
/// </summary>
bool easyar_Buffer_tryCopyFrom(easyar_Buffer * This, void * src, int srcIndex, int index, int length);
/// <summary>
/// Copies buffer data to user array.
/// </summary>
bool easyar_Buffer_tryCopyTo(easyar_Buffer * This, int index, void * dest, int destIndex, int length);
/// <summary>
/// Creates a sub-buffer with a reference to the original Buffer. A Buffer will only be released after all its sub-buffers are released.
/// </summary>
void easyar_Buffer_partition(easyar_Buffer * This, int index, int length, /* OUT */ easyar_Buffer * * Return);
void easyar_Buffer__dtor(easyar_Buffer * This);
void easyar_Buffer__retain(const easyar_Buffer * This, /* OUT */ easyar_Buffer * * Return);
const char * easyar_Buffer__typeName(const easyar_Buffer * This);
void easyar_BufferDictionary__ctor(/* OUT */ easyar_BufferDictionary * * Return);
/// <summary>
/// Current file count.
/// </summary>
int easyar_BufferDictionary_count(const easyar_BufferDictionary * This);
/// <summary>
/// Checks if a specified path is in the dictionary.
/// </summary>
bool easyar_BufferDictionary_contains(const easyar_BufferDictionary * This, easyar_String * path);
/// <summary>
/// Tries to get the corresponding `Buffer`_ for a specified path.
/// </summary>
void easyar_BufferDictionary_tryGet(const easyar_BufferDictionary * This, easyar_String * path, /* OUT */ easyar_OptionalOfBuffer * Return);
/// <summary>
/// Sets `Buffer`_ for a specified path.
/// </summary>
void easyar_BufferDictionary_set(easyar_BufferDictionary * This, easyar_String * path, easyar_Buffer * buffer);
/// <summary>
/// Removes a specified path.
/// </summary>
bool easyar_BufferDictionary_remove(easyar_BufferDictionary * This, easyar_String * path);
/// <summary>
/// Clears the dictionary.
/// </summary>
void easyar_BufferDictionary_clear(easyar_BufferDictionary * This);
void easyar_BufferDictionary__dtor(easyar_BufferDictionary * This);
void easyar_BufferDictionary__retain(const easyar_BufferDictionary * This, /* OUT */ easyar_BufferDictionary * * Return);
const char * easyar_BufferDictionary__typeName(const easyar_BufferDictionary * This);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: ec534accfc8244743b742b7861c2dedc
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_BUFFER_HXX__
#define __EASYAR_BUFFER_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// Buffer stores a raw byte array, which can be used to access image data.
/// To access image data in Java API, get buffer from `Image`_ and copy to a Java byte array.
/// You can always access image data since the first version of EasyAR Sense. Refer to `Image`_ .
/// </summary>
class Buffer
{
protected:
easyar_Buffer * cdata_ ;
void init_cdata(easyar_Buffer * cdata);
virtual Buffer & operator=(const Buffer & data) { return *this; } //deleted
public:
Buffer(easyar_Buffer * cdata);
virtual ~Buffer();
Buffer(const Buffer & data);
const easyar_Buffer * get_cdata() const;
easyar_Buffer * get_cdata();
/// <summary>
/// Wraps a raw memory block. When Buffer is released by all holders, deleter callback will be invoked to execute user-defined memory destruction. deleter must be thread-safe.
/// </summary>
static void wrap(void * ptr, int size, FunctorOfVoid deleter, /* OUT */ Buffer * * Return);
/// <summary>
/// Creates a Buffer of specified byte size.
/// </summary>
static void create(int size, /* OUT */ Buffer * * Return);
/// <summary>
/// Returns raw data address.
/// </summary>
void * data();
/// <summary>
/// Byte size of raw data.
/// </summary>
int size();
/// <summary>
/// Copies raw memory. It can be used in languages or platforms without complete support for memory operations.
/// </summary>
static void memoryCopy(void * src, void * dest, int length);
/// <summary>
/// Tries to copy data from a raw memory address into Buffer. If copy succeeds, it returns true, or else it returns false. Possible failure causes includes: source or destination data range overflow.
/// </summary>
bool tryCopyFrom(void * src, int srcIndex, int index, int length);
/// <summary>
/// Copies buffer data to user array.
/// </summary>
bool tryCopyTo(int index, void * dest, int destIndex, int length);
/// <summary>
/// Creates a sub-buffer with a reference to the original Buffer. A Buffer will only be released after all its sub-buffers are released.
/// </summary>
void partition(int index, int length, /* OUT */ Buffer * * Return);
};
/// <summary>
/// A mapping from file path to `Buffer`_ . It can be used to represent multiple files in the memory.
/// </summary>
class BufferDictionary
{
protected:
easyar_BufferDictionary * cdata_ ;
void init_cdata(easyar_BufferDictionary * cdata);
virtual BufferDictionary & operator=(const BufferDictionary & data) { return *this; } //deleted
public:
BufferDictionary(easyar_BufferDictionary * cdata);
virtual ~BufferDictionary();
BufferDictionary(const BufferDictionary & data);
const easyar_BufferDictionary * get_cdata() const;
easyar_BufferDictionary * get_cdata();
BufferDictionary();
/// <summary>
/// Current file count.
/// </summary>
int count();
/// <summary>
/// Checks if a specified path is in the dictionary.
/// </summary>
bool contains(String * path);
/// <summary>
/// Tries to get the corresponding `Buffer`_ for a specified path.
/// </summary>
void tryGet(String * path, /* OUT */ Buffer * * Return);
/// <summary>
/// Sets `Buffer`_ for a specified path.
/// </summary>
void set(String * path, Buffer * buffer);
/// <summary>
/// Removes a specified path.
/// </summary>
bool remove(String * path);
/// <summary>
/// Clears the dictionary.
/// </summary>
void clear();
};
#ifndef __EASYAR_FUNCTOROFVOID__
#define __EASYAR_FUNCTOROFVOID__
struct FunctorOfVoid
{
void * _state;
void (* func)(void * _state);
void (* destroy)(void * _state);
FunctorOfVoid(void * _state, void (* func)(void * _state), void (* destroy)(void * _state));
};
static void FunctorOfVoid_func(void * _state, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoid_destroy(void * _state);
static inline easyar_FunctorOfVoid FunctorOfVoid_to_c(FunctorOfVoid f);
#endif
#ifndef __EASYAR_OPTIONALOFBUFFER__
#define __EASYAR_OPTIONALOFBUFFER__
struct OptionalOfBuffer
{
bool has_value;
Buffer * value;
};
static inline easyar_OptionalOfBuffer OptionalOfBuffer_to_c(Buffer * o);
#endif
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_BUFFER_HXX__
#define __IMPLEMENTATION_EASYAR_BUFFER_HXX__
#include "easyar/buffer.h"
namespace easyar {
inline Buffer::Buffer(easyar_Buffer * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline Buffer::~Buffer()
{
if (cdata_) {
easyar_Buffer__dtor(cdata_);
cdata_ = NULL;
}
}
inline Buffer::Buffer(const Buffer & data)
:
cdata_(NULL)
{
easyar_Buffer * cdata = NULL;
easyar_Buffer__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_Buffer * Buffer::get_cdata() const
{
return cdata_;
}
inline easyar_Buffer * Buffer::get_cdata()
{
return cdata_;
}
inline void Buffer::init_cdata(easyar_Buffer * cdata)
{
cdata_ = cdata;
}
inline void Buffer::wrap(void * arg0, int arg1, FunctorOfVoid arg2, /* OUT */ Buffer * * Return)
{
easyar_Buffer * _return_value_ = NULL;
easyar_Buffer_wrap(arg0, arg1, FunctorOfVoid_to_c(arg2), &_return_value_);
*Return = new Buffer(_return_value_);
}
inline void Buffer::create(int arg0, /* OUT */ Buffer * * Return)
{
easyar_Buffer * _return_value_ = NULL;
easyar_Buffer_create(arg0, &_return_value_);
*Return = new Buffer(_return_value_);
}
inline void * Buffer::data()
{
if (cdata_ == NULL) {
return NULL;
}
void * _return_value_ = easyar_Buffer_data(cdata_);
return _return_value_;
}
inline int Buffer::size()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_Buffer_size(cdata_);
return _return_value_;
}
inline void Buffer::memoryCopy(void * arg0, void * arg1, int arg2)
{
easyar_Buffer_memoryCopy(arg0, arg1, arg2);
}
inline bool Buffer::tryCopyFrom(void * arg0, int arg1, int arg2, int arg3)
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_Buffer_tryCopyFrom(cdata_, arg0, arg1, arg2, arg3);
return _return_value_;
}
inline bool Buffer::tryCopyTo(int arg0, void * arg1, int arg2, int arg3)
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_Buffer_tryCopyTo(cdata_, arg0, arg1, arg2, arg3);
return _return_value_;
}
inline void Buffer::partition(int arg0, int arg1, /* OUT */ Buffer * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_Buffer * _return_value_ = NULL;
easyar_Buffer_partition(cdata_, arg0, arg1, &_return_value_);
*Return = new Buffer(_return_value_);
}
inline BufferDictionary::BufferDictionary(easyar_BufferDictionary * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline BufferDictionary::~BufferDictionary()
{
if (cdata_) {
easyar_BufferDictionary__dtor(cdata_);
cdata_ = NULL;
}
}
inline BufferDictionary::BufferDictionary(const BufferDictionary & data)
:
cdata_(NULL)
{
easyar_BufferDictionary * cdata = NULL;
easyar_BufferDictionary__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_BufferDictionary * BufferDictionary::get_cdata() const
{
return cdata_;
}
inline easyar_BufferDictionary * BufferDictionary::get_cdata()
{
return cdata_;
}
inline void BufferDictionary::init_cdata(easyar_BufferDictionary * cdata)
{
cdata_ = cdata;
}
inline BufferDictionary::BufferDictionary()
:
cdata_(NULL)
{
easyar_BufferDictionary * _return_value_ = NULL;
easyar_BufferDictionary__ctor(&_return_value_);
init_cdata(_return_value_);
}
inline int BufferDictionary::count()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_BufferDictionary_count(cdata_);
return _return_value_;
}
inline bool BufferDictionary::contains(String * arg0)
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_BufferDictionary_contains(cdata_, arg0->get_cdata());
return _return_value_;
}
inline void BufferDictionary::tryGet(String * arg0, /* OUT */ Buffer * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OptionalOfBuffer _return_value_ = {false, NULL};
easyar_BufferDictionary_tryGet(cdata_, arg0->get_cdata(), &_return_value_);
*Return = (_return_value_.has_value ? new Buffer(_return_value_.value) : NULL);
}
inline void BufferDictionary::set(String * arg0, Buffer * arg1)
{
if (cdata_ == NULL) {
return;
}
easyar_BufferDictionary_set(cdata_, arg0->get_cdata(), arg1->get_cdata());
}
inline bool BufferDictionary::remove(String * arg0)
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_BufferDictionary_remove(cdata_, arg0->get_cdata());
return _return_value_;
}
inline void BufferDictionary::clear()
{
if (cdata_ == NULL) {
return;
}
easyar_BufferDictionary_clear(cdata_);
}
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOID__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOID__
inline FunctorOfVoid::FunctorOfVoid(void * _state, void (* func)(void * _state), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoid_func(void * _state, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
FunctorOfVoid * f = reinterpret_cast<FunctorOfVoid *>(_state);
f->func(f->_state);
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoid_destroy(void * _state)
{
FunctorOfVoid * f = reinterpret_cast<FunctorOfVoid *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoid FunctorOfVoid_to_c(FunctorOfVoid f)
{
easyar_FunctorOfVoid _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoid(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoid_func;
_return_value_.destroy = FunctorOfVoid_destroy;
return _return_value_;
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFBUFFER__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFBUFFER__
static inline easyar_OptionalOfBuffer OptionalOfBuffer_to_c(Buffer * o)
{
if (o != NULL) {
easyar_OptionalOfBuffer _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfBuffer _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
}
#endif
fileFormatVersion: 2
guid: fde86f321655e5b4b954c21c23703609
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>
/// Buffer stores a raw byte array, which can be used to access image data.
/// To access image data in Java API, get buffer from `Image`_ and copy to a Java byte array.
/// You can always access image data since the first version of EasyAR Sense. Refer to `Image`_ .
/// </summary>
@interface easyar_Buffer : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Wraps a raw memory block. When Buffer is released by all holders, deleter callback will be invoked to execute user-defined memory destruction. deleter must be thread-safe.
/// </summary>
+ (easyar_Buffer *)wrap:(void *)ptr size:(int)size deleter:(void (^)())deleter;
/// <summary>
/// Creates a Buffer of specified byte size.
/// </summary>
+ (easyar_Buffer *)create:(int)size;
/// <summary>
/// Returns raw data address.
/// </summary>
- (void *)data;
/// <summary>
/// Byte size of raw data.
/// </summary>
- (int)size;
/// <summary>
/// Copies raw memory. It can be used in languages or platforms without complete support for memory operations.
/// </summary>
+ (void)memoryCopy:(void *)src dest:(void *)dest length:(int)length;
/// <summary>
/// Tries to copy data from a raw memory address into Buffer. If copy succeeds, it returns true, or else it returns false. Possible failure causes includes: source or destination data range overflow.
/// </summary>
- (bool)tryCopyFrom:(void *)src srcIndex:(int)srcIndex index:(int)index length:(int)length;
/// <summary>
/// Copies buffer data to user array.
/// </summary>
- (bool)tryCopyTo:(int)index dest:(void *)dest destIndex:(int)destIndex length:(int)length;
/// <summary>
/// Creates a sub-buffer with a reference to the original Buffer. A Buffer will only be released after all its sub-buffers are released.
/// </summary>
- (easyar_Buffer *)partition:(int)index length:(int)length;
@end
/// <summary>
/// A mapping from file path to `Buffer`_ . It can be used to represent multiple files in the memory.
/// </summary>
@interface easyar_BufferDictionary : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
+ (easyar_BufferDictionary *) create;
/// <summary>
/// Current file count.
/// </summary>
- (int)count;
/// <summary>
/// Checks if a specified path is in the dictionary.
/// </summary>
- (bool)contains:(NSString *)path;
/// <summary>
/// Tries to get the corresponding `Buffer`_ for a specified path.
/// </summary>
- (easyar_Buffer *)tryGet:(NSString *)path;
/// <summary>
/// Sets `Buffer`_ for a specified path.
/// </summary>
- (void)set:(NSString *)path buffer:(easyar_Buffer *)buffer;
/// <summary>
/// Removes a specified path.
/// </summary>
- (bool)remove:(NSString *)path;
/// <summary>
/// Clears the dictionary.
/// </summary>
- (void)clear;
@end
fileFormatVersion: 2
guid: d3750188f30d7b84e91ace1069509859
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_BUFFERPOOL_H__
#define __EASYAR_BUFFERPOOL_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// block_size is the byte size of each `Buffer`_ .
/// capacity is the maximum count of `Buffer`_ .
/// </summary>
void easyar_BufferPool__ctor(int block_size, int capacity, /* OUT */ easyar_BufferPool * * Return);
/// <summary>
/// The byte size of each `Buffer`_ .
/// </summary>
int easyar_BufferPool_block_size(const easyar_BufferPool * This);
/// <summary>
/// The maximum count of `Buffer`_ .
/// </summary>
int easyar_BufferPool_capacity(const easyar_BufferPool * This);
/// <summary>
/// Current acquired count of `Buffer`_ .
/// </summary>
int easyar_BufferPool_size(const easyar_BufferPool * This);
/// <summary>
/// Tries to acquire a memory block. If current acquired count of `Buffer`_ does not reach maximum, a new `Buffer`_ is fetched or allocated, or else null is returned.
/// </summary>
void easyar_BufferPool_tryAcquire(easyar_BufferPool * This, /* OUT */ easyar_OptionalOfBuffer * Return);
void easyar_BufferPool__dtor(easyar_BufferPool * This);
void easyar_BufferPool__retain(const easyar_BufferPool * This, /* OUT */ easyar_BufferPool * * Return);
const char * easyar_BufferPool__typeName(const easyar_BufferPool * This);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 79ab5b6fbcc7a5e4d86a5a86fdaf6d0d
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_BUFFERPOOL_HXX__
#define __EASYAR_BUFFERPOOL_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// BufferPool is a memory pool to reduce memory allocation time consumption for functionality like custom camera interoperability, which needs to allocate memory buffers of a fixed size repeatedly.
/// </summary>
class BufferPool
{
protected:
easyar_BufferPool * cdata_ ;
void init_cdata(easyar_BufferPool * cdata);
virtual BufferPool & operator=(const BufferPool & data) { return *this; } //deleted
public:
BufferPool(easyar_BufferPool * cdata);
virtual ~BufferPool();
BufferPool(const BufferPool & data);
const easyar_BufferPool * get_cdata() const;
easyar_BufferPool * get_cdata();
/// <summary>
/// block_size is the byte size of each `Buffer`_ .
/// capacity is the maximum count of `Buffer`_ .
/// </summary>
BufferPool(int block_size, int capacity);
/// <summary>
/// The byte size of each `Buffer`_ .
/// </summary>
int block_size();
/// <summary>
/// The maximum count of `Buffer`_ .
/// </summary>
int capacity();
/// <summary>
/// Current acquired count of `Buffer`_ .
/// </summary>
int size();
/// <summary>
/// Tries to acquire a memory block. If current acquired count of `Buffer`_ does not reach maximum, a new `Buffer`_ is fetched or allocated, or else null is returned.
/// </summary>
void tryAcquire(/* OUT */ Buffer * * Return);
};
#ifndef __EASYAR_OPTIONALOFBUFFER__
#define __EASYAR_OPTIONALOFBUFFER__
struct OptionalOfBuffer
{
bool has_value;
Buffer * value;
};
static inline easyar_OptionalOfBuffer OptionalOfBuffer_to_c(Buffer * o);
#endif
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_BUFFERPOOL_HXX__
#define __IMPLEMENTATION_EASYAR_BUFFERPOOL_HXX__
#include "easyar/bufferpool.h"
#include "easyar/buffer.hxx"
namespace easyar {
inline BufferPool::BufferPool(easyar_BufferPool * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline BufferPool::~BufferPool()
{
if (cdata_) {
easyar_BufferPool__dtor(cdata_);
cdata_ = NULL;
}
}
inline BufferPool::BufferPool(const BufferPool & data)
:
cdata_(NULL)
{
easyar_BufferPool * cdata = NULL;
easyar_BufferPool__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_BufferPool * BufferPool::get_cdata() const
{
return cdata_;
}
inline easyar_BufferPool * BufferPool::get_cdata()
{
return cdata_;
}
inline void BufferPool::init_cdata(easyar_BufferPool * cdata)
{
cdata_ = cdata;
}
inline BufferPool::BufferPool(int arg0, int arg1)
:
cdata_(NULL)
{
easyar_BufferPool * _return_value_ = NULL;
easyar_BufferPool__ctor(arg0, arg1, &_return_value_);
init_cdata(_return_value_);
}
inline int BufferPool::block_size()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_BufferPool_block_size(cdata_);
return _return_value_;
}
inline int BufferPool::capacity()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_BufferPool_capacity(cdata_);
return _return_value_;
}
inline int BufferPool::size()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_BufferPool_size(cdata_);
return _return_value_;
}
inline void BufferPool::tryAcquire(/* OUT */ Buffer * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OptionalOfBuffer _return_value_ = {false, NULL};
easyar_BufferPool_tryAcquire(cdata_, &_return_value_);
*Return = (_return_value_.has_value ? new Buffer(_return_value_.value) : NULL);
}
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFBUFFER__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFBUFFER__
static inline easyar_OptionalOfBuffer OptionalOfBuffer_to_c(Buffer * o)
{
if (o != NULL) {
easyar_OptionalOfBuffer _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfBuffer _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
}
#endif
fileFormatVersion: 2
guid: 2704ed30fc87f6c46b9dedc8e4d3da63
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.
//
//=============================================================================================================================
#import "easyar/types.oc.h"
/// <summary>
/// BufferPool is a memory pool to reduce memory allocation time consumption for functionality like custom camera interoperability, which needs to allocate memory buffers of a fixed size repeatedly.
/// </summary>
@interface easyar_BufferPool : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// block_size is the byte size of each `Buffer`_ .
/// capacity is the maximum count of `Buffer`_ .
/// </summary>
+ (easyar_BufferPool *) create:(int)block_size capacity:(int)capacity;
/// <summary>
/// The byte size of each `Buffer`_ .
/// </summary>
- (int)block_size;
/// <summary>
/// The maximum count of `Buffer`_ .
/// </summary>
- (int)capacity;
/// <summary>
/// Current acquired count of `Buffer`_ .
/// </summary>
- (int)size;
/// <summary>
/// Tries to acquire a memory block. If current acquired count of `Buffer`_ does not reach maximum, a new `Buffer`_ is fetched or allocated, or else null is returned.
/// </summary>
- (easyar_Buffer *)tryAcquire;
@end
fileFormatVersion: 2
guid: 6bf38bdf7dab7464bbddd4963ae10e5b
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_CALIBRATION_H__
#define __EASYAR_CALIBRATION_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
void easyar_CalibrationDownloader__ctor(/* OUT */ easyar_CalibrationDownloader * * Return);
void easyar_CalibrationDownloader_download(easyar_CalibrationDownloader * This, easyar_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString onCompleted);
void easyar_CalibrationDownloader__dtor(easyar_CalibrationDownloader * This);
void easyar_CalibrationDownloader__retain(const easyar_CalibrationDownloader * This, /* OUT */ easyar_CalibrationDownloader * * Return);
const char * easyar_CalibrationDownloader__typeName(const easyar_CalibrationDownloader * This);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 4800955f3ec6c2045b4984632b77be18
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_CALIBRATION_HXX__
#define __EASYAR_CALIBRATION_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// CalibrationDownloader is used for download and update of calibration data in MotionTracker. The calibration data will only take effect after reallocation of MotionTracker.
/// </summary>
class CalibrationDownloader
{
protected:
easyar_CalibrationDownloader * cdata_ ;
void init_cdata(easyar_CalibrationDownloader * cdata);
virtual CalibrationDownloader & operator=(const CalibrationDownloader & data) { return *this; } //deleted
public:
CalibrationDownloader(easyar_CalibrationDownloader * cdata);
virtual ~CalibrationDownloader();
CalibrationDownloader(const CalibrationDownloader & data);
const easyar_CalibrationDownloader * get_cdata() const;
easyar_CalibrationDownloader * get_cdata();
CalibrationDownloader();
void download(CallbackScheduler * callbackScheduler, FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString onCompleted);
};
#ifndef __EASYAR_OPTIONALOFSTRING__
#define __EASYAR_OPTIONALOFSTRING__
struct OptionalOfString
{
bool has_value;
String * value;
};
static inline easyar_OptionalOfString OptionalOfString_to_c(String * o);
#endif
#ifndef __EASYAR_FUNCTOROFVOIDFROMCALIBRATIONDOWNLOADSTATUSANDOPTIONALOFSTRING__
#define __EASYAR_FUNCTOROFVOIDFROMCALIBRATIONDOWNLOADSTATUSANDOPTIONALOFSTRING__
struct FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString
{
void * _state;
void (* func)(void * _state, CalibrationDownloadStatus, String *);
void (* destroy)(void * _state);
FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString(void * _state, void (* func)(void * _state, CalibrationDownloadStatus, String *), void (* destroy)(void * _state));
};
static void FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_func(void * _state, easyar_CalibrationDownloadStatus, easyar_OptionalOfString, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_destroy(void * _state);
static inline easyar_FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_to_c(FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString f);
#endif
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_CALIBRATION_HXX__
#define __IMPLEMENTATION_EASYAR_CALIBRATION_HXX__
#include "easyar/calibration.h"
#include "easyar/callbackscheduler.hxx"
namespace easyar {
inline CalibrationDownloader::CalibrationDownloader(easyar_CalibrationDownloader * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline CalibrationDownloader::~CalibrationDownloader()
{
if (cdata_) {
easyar_CalibrationDownloader__dtor(cdata_);
cdata_ = NULL;
}
}
inline CalibrationDownloader::CalibrationDownloader(const CalibrationDownloader & data)
:
cdata_(NULL)
{
easyar_CalibrationDownloader * cdata = NULL;
easyar_CalibrationDownloader__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_CalibrationDownloader * CalibrationDownloader::get_cdata() const
{
return cdata_;
}
inline easyar_CalibrationDownloader * CalibrationDownloader::get_cdata()
{
return cdata_;
}
inline void CalibrationDownloader::init_cdata(easyar_CalibrationDownloader * cdata)
{
cdata_ = cdata;
}
inline CalibrationDownloader::CalibrationDownloader()
:
cdata_(NULL)
{
easyar_CalibrationDownloader * _return_value_ = NULL;
easyar_CalibrationDownloader__ctor(&_return_value_);
init_cdata(_return_value_);
}
inline void CalibrationDownloader::download(CallbackScheduler * arg0, FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString arg1)
{
if (cdata_ == NULL) {
return;
}
easyar_CalibrationDownloader_download(cdata_, arg0->get_cdata(), FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_to_c(arg1));
}
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMCALIBRATIONDOWNLOADSTATUSANDOPTIONALOFSTRING__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMCALIBRATIONDOWNLOADSTATUSANDOPTIONALOFSTRING__
inline FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString::FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString(void * _state, void (* func)(void * _state, CalibrationDownloadStatus, String *), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_func(void * _state, easyar_CalibrationDownloadStatus arg0, easyar_OptionalOfString arg1, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
CalibrationDownloadStatus cpparg0 = static_cast<CalibrationDownloadStatus>(arg0);
if (arg1.has_value) { easyar_String_copy(arg1.value, &arg1.value); }
String * cpparg1 = (arg1.has_value ? new String(arg1.value) : NULL);
FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString * f = reinterpret_cast<FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString *>(_state);
f->func(f->_state, cpparg0, cpparg1);
delete cpparg1;
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_destroy(void * _state)
{
FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString * f = reinterpret_cast<FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_to_c(FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString f)
{
easyar_FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_func;
_return_value_.destroy = FunctorOfVoidFromCalibrationDownloadStatusAndOptionalOfString_destroy;
return _return_value_;
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFSTRING__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFSTRING__
static inline easyar_OptionalOfString OptionalOfString_to_c(String * o)
{
if (o != NULL) {
easyar_OptionalOfString _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfString _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
}
#endif
fileFormatVersion: 2
guid: 7b3a20d3631670443b426f33db9ce7c9
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>
/// CalibrationDownloader is used for download and update of calibration data in MotionTracker. The calibration data will only take effect after reallocation of MotionTracker.
/// </summary>
@interface easyar_CalibrationDownloader : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
+ (easyar_CalibrationDownloader *) create;
- (void)download:(easyar_CallbackScheduler *)callbackScheduler onCompleted:(void (^)(easyar_CalibrationDownloadStatus status, NSString * error))onCompleted;
@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