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

update final design

parent 1444629e
fileFormatVersion: 2
guid: 5885141edd921164788b9256053df377
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_SPARSESPATIALMAPMANAGER_H__
#define __EASYAR_SPARSESPATIALMAPMANAGER_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Check whether SparseSpatialMapManager is is available. It returns true when the operating system is Windows, Mac, iOS or Android.
/// </summary>
bool easyar_SparseSpatialMapManager_isAvailable(void);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_SparseSpatialMapManager_create(/* OUT */ easyar_SparseSpatialMapManager * * Return);
/// <summary>
/// Creates a map from `SparseSpatialMap`_ and upload it to EasyAR cloud servers. After completion, a serverMapId will be returned for loading map from EasyAR cloud servers.
/// </summary>
void easyar_SparseSpatialMapManager_host(easyar_SparseSpatialMapManager * This, easyar_SparseSpatialMap * mapBuilder, easyar_String * apiKey, easyar_String * apiSecret, easyar_String * sparseSpatialMapAppId, easyar_String * name, easyar_OptionalOfImage preview, easyar_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromBoolAndStringAndString onCompleted);
/// <summary>
/// Loads a map from EasyAR cloud servers by serverMapId. To unload the map, call `SparseSpatialMap.unloadMap`_ with serverMapId.
/// </summary>
void easyar_SparseSpatialMapManager_load(easyar_SparseSpatialMapManager * This, easyar_SparseSpatialMap * mapTracker, easyar_String * serverMapId, easyar_String * apiKey, easyar_String * apiSecret, easyar_String * sparseSpatialMapAppId, easyar_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromBoolAndString onCompleted);
/// <summary>
/// Clears allocated cache space.
/// </summary>
void easyar_SparseSpatialMapManager_clear(easyar_SparseSpatialMapManager * This);
void easyar_SparseSpatialMapManager__dtor(easyar_SparseSpatialMapManager * This);
void easyar_SparseSpatialMapManager__retain(const easyar_SparseSpatialMapManager * This, /* OUT */ easyar_SparseSpatialMapManager * * Return);
const char * easyar_SparseSpatialMapManager__typeName(const easyar_SparseSpatialMapManager * This);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 7872777b070dc3e48912c16a6c6f50a1
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_SPARSESPATIALMAPMANAGER_HXX__
#define __EASYAR_SPARSESPATIALMAPMANAGER_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// SparseSpatialMap manager class, for managing sharing.
/// </summary>
class SparseSpatialMapManager
{
protected:
easyar_SparseSpatialMapManager * cdata_ ;
void init_cdata(easyar_SparseSpatialMapManager * cdata);
virtual SparseSpatialMapManager & operator=(const SparseSpatialMapManager & data) { return *this; } //deleted
public:
SparseSpatialMapManager(easyar_SparseSpatialMapManager * cdata);
virtual ~SparseSpatialMapManager();
SparseSpatialMapManager(const SparseSpatialMapManager & data);
const easyar_SparseSpatialMapManager * get_cdata() const;
easyar_SparseSpatialMapManager * get_cdata();
/// <summary>
/// Check whether SparseSpatialMapManager is is available. It returns true when the operating system is Windows, Mac, iOS or Android.
/// </summary>
static bool isAvailable();
/// <summary>
/// Creates an instance.
/// </summary>
static void create(/* OUT */ SparseSpatialMapManager * * Return);
/// <summary>
/// Creates a map from `SparseSpatialMap`_ and upload it to EasyAR cloud servers. After completion, a serverMapId will be returned for loading map from EasyAR cloud servers.
/// </summary>
void host(SparseSpatialMap * mapBuilder, String * apiKey, String * apiSecret, String * sparseSpatialMapAppId, String * name, Image * preview, CallbackScheduler * callbackScheduler, FunctorOfVoidFromBoolAndStringAndString onCompleted);
/// <summary>
/// Loads a map from EasyAR cloud servers by serverMapId. To unload the map, call `SparseSpatialMap.unloadMap`_ with serverMapId.
/// </summary>
void load(SparseSpatialMap * mapTracker, String * serverMapId, String * apiKey, String * apiSecret, String * sparseSpatialMapAppId, CallbackScheduler * callbackScheduler, FunctorOfVoidFromBoolAndString onCompleted);
/// <summary>
/// Clears allocated cache space.
/// </summary>
void clear();
};
#ifndef __EASYAR_OPTIONALOFIMAGE__
#define __EASYAR_OPTIONALOFIMAGE__
struct OptionalOfImage
{
bool has_value;
Image * value;
};
static inline easyar_OptionalOfImage OptionalOfImage_to_c(Image * o);
#endif
#ifndef __EASYAR_FUNCTOROFVOIDFROMBOOLANDSTRINGANDSTRING__
#define __EASYAR_FUNCTOROFVOIDFROMBOOLANDSTRINGANDSTRING__
struct FunctorOfVoidFromBoolAndStringAndString
{
void * _state;
void (* func)(void * _state, bool, String *, String *);
void (* destroy)(void * _state);
FunctorOfVoidFromBoolAndStringAndString(void * _state, void (* func)(void * _state, bool, String *, String *), void (* destroy)(void * _state));
};
static void FunctorOfVoidFromBoolAndStringAndString_func(void * _state, bool, easyar_String *, easyar_String *, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoidFromBoolAndStringAndString_destroy(void * _state);
static inline easyar_FunctorOfVoidFromBoolAndStringAndString FunctorOfVoidFromBoolAndStringAndString_to_c(FunctorOfVoidFromBoolAndStringAndString f);
#endif
#ifndef __EASYAR_FUNCTOROFVOIDFROMBOOLANDSTRING__
#define __EASYAR_FUNCTOROFVOIDFROMBOOLANDSTRING__
struct FunctorOfVoidFromBoolAndString
{
void * _state;
void (* func)(void * _state, bool, String *);
void (* destroy)(void * _state);
FunctorOfVoidFromBoolAndString(void * _state, void (* func)(void * _state, bool, String *), void (* destroy)(void * _state));
};
static void FunctorOfVoidFromBoolAndString_func(void * _state, bool, easyar_String *, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoidFromBoolAndString_destroy(void * _state);
static inline easyar_FunctorOfVoidFromBoolAndString FunctorOfVoidFromBoolAndString_to_c(FunctorOfVoidFromBoolAndString f);
#endif
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_SPARSESPATIALMAPMANAGER_HXX__
#define __IMPLEMENTATION_EASYAR_SPARSESPATIALMAPMANAGER_HXX__
#include "easyar/sparsespatialmapmanager.h"
#include "easyar/sparsespatialmap.hxx"
#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"
#include "easyar/callbackscheduler.hxx"
namespace easyar {
inline SparseSpatialMapManager::SparseSpatialMapManager(easyar_SparseSpatialMapManager * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline SparseSpatialMapManager::~SparseSpatialMapManager()
{
if (cdata_) {
easyar_SparseSpatialMapManager__dtor(cdata_);
cdata_ = NULL;
}
}
inline SparseSpatialMapManager::SparseSpatialMapManager(const SparseSpatialMapManager & data)
:
cdata_(NULL)
{
easyar_SparseSpatialMapManager * cdata = NULL;
easyar_SparseSpatialMapManager__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_SparseSpatialMapManager * SparseSpatialMapManager::get_cdata() const
{
return cdata_;
}
inline easyar_SparseSpatialMapManager * SparseSpatialMapManager::get_cdata()
{
return cdata_;
}
inline void SparseSpatialMapManager::init_cdata(easyar_SparseSpatialMapManager * cdata)
{
cdata_ = cdata;
}
inline bool SparseSpatialMapManager::isAvailable()
{
bool _return_value_ = easyar_SparseSpatialMapManager_isAvailable();
return _return_value_;
}
inline void SparseSpatialMapManager::create(/* OUT */ SparseSpatialMapManager * * Return)
{
easyar_SparseSpatialMapManager * _return_value_ = NULL;
easyar_SparseSpatialMapManager_create(&_return_value_);
*Return = new SparseSpatialMapManager(_return_value_);
}
inline void SparseSpatialMapManager::host(SparseSpatialMap * arg0, String * arg1, String * arg2, String * arg3, String * arg4, Image * arg5, CallbackScheduler * arg6, FunctorOfVoidFromBoolAndStringAndString arg7)
{
if (cdata_ == NULL) {
return;
}
easyar_SparseSpatialMapManager_host(cdata_, arg0->get_cdata(), arg1->get_cdata(), arg2->get_cdata(), arg3->get_cdata(), arg4->get_cdata(), OptionalOfImage_to_c(arg5), arg6->get_cdata(), FunctorOfVoidFromBoolAndStringAndString_to_c(arg7));
}
inline void SparseSpatialMapManager::load(SparseSpatialMap * arg0, String * arg1, String * arg2, String * arg3, String * arg4, CallbackScheduler * arg5, FunctorOfVoidFromBoolAndString arg6)
{
if (cdata_ == NULL) {
return;
}
easyar_SparseSpatialMapManager_load(cdata_, arg0->get_cdata(), arg1->get_cdata(), arg2->get_cdata(), arg3->get_cdata(), arg4->get_cdata(), arg5->get_cdata(), FunctorOfVoidFromBoolAndString_to_c(arg6));
}
inline void SparseSpatialMapManager::clear()
{
if (cdata_ == NULL) {
return;
}
easyar_SparseSpatialMapManager_clear(cdata_);
}
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFIMAGE__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFIMAGE__
static inline easyar_OptionalOfImage OptionalOfImage_to_c(Image * o)
{
if (o != NULL) {
easyar_OptionalOfImage _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfImage _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMBOOLANDSTRINGANDSTRING__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMBOOLANDSTRINGANDSTRING__
inline FunctorOfVoidFromBoolAndStringAndString::FunctorOfVoidFromBoolAndStringAndString(void * _state, void (* func)(void * _state, bool, String *, String *), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoidFromBoolAndStringAndString_func(void * _state, bool arg0, easyar_String * arg1, easyar_String * arg2, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
bool cpparg0 = arg0;
easyar_String_copy(arg1, &arg1);
String * cpparg1 = new String(arg1);
easyar_String_copy(arg2, &arg2);
String * cpparg2 = new String(arg2);
FunctorOfVoidFromBoolAndStringAndString * f = reinterpret_cast<FunctorOfVoidFromBoolAndStringAndString *>(_state);
f->func(f->_state, cpparg0, cpparg1, cpparg2);
delete cpparg1;
delete cpparg2;
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoidFromBoolAndStringAndString_destroy(void * _state)
{
FunctorOfVoidFromBoolAndStringAndString * f = reinterpret_cast<FunctorOfVoidFromBoolAndStringAndString *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoidFromBoolAndStringAndString FunctorOfVoidFromBoolAndStringAndString_to_c(FunctorOfVoidFromBoolAndStringAndString f)
{
easyar_FunctorOfVoidFromBoolAndStringAndString _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoidFromBoolAndStringAndString(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoidFromBoolAndStringAndString_func;
_return_value_.destroy = FunctorOfVoidFromBoolAndStringAndString_destroy;
return _return_value_;
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMBOOLANDSTRING__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMBOOLANDSTRING__
inline FunctorOfVoidFromBoolAndString::FunctorOfVoidFromBoolAndString(void * _state, void (* func)(void * _state, bool, String *), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoidFromBoolAndString_func(void * _state, bool arg0, easyar_String * arg1, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
bool cpparg0 = arg0;
easyar_String_copy(arg1, &arg1);
String * cpparg1 = new String(arg1);
FunctorOfVoidFromBoolAndString * f = reinterpret_cast<FunctorOfVoidFromBoolAndString *>(_state);
f->func(f->_state, cpparg0, cpparg1);
delete cpparg1;
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoidFromBoolAndString_destroy(void * _state)
{
FunctorOfVoidFromBoolAndString * f = reinterpret_cast<FunctorOfVoidFromBoolAndString *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoidFromBoolAndString FunctorOfVoidFromBoolAndString_to_c(FunctorOfVoidFromBoolAndString f)
{
easyar_FunctorOfVoidFromBoolAndString _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoidFromBoolAndString(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoidFromBoolAndString_func;
_return_value_.destroy = FunctorOfVoidFromBoolAndString_destroy;
return _return_value_;
}
#endif
}
#endif
fileFormatVersion: 2
guid: 7d82b8a5e3f6368438931f35640a8a64
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>
/// SparseSpatialMap manager class, for managing sharing.
/// </summary>
@interface easyar_SparseSpatialMapManager : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Check whether SparseSpatialMapManager is is available. It returns true when the operating system is Windows, Mac, iOS or Android.
/// </summary>
+ (bool)isAvailable;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_SparseSpatialMapManager *)create;
/// <summary>
/// Creates a map from `SparseSpatialMap`_ and upload it to EasyAR cloud servers. After completion, a serverMapId will be returned for loading map from EasyAR cloud servers.
/// </summary>
- (void)host:(easyar_SparseSpatialMap *)mapBuilder apiKey:(NSString *)apiKey apiSecret:(NSString *)apiSecret sparseSpatialMapAppId:(NSString *)sparseSpatialMapAppId name:(NSString *)name preview:(easyar_Image *)preview callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler onCompleted:(void (^)(bool isSuccessful, NSString * serverMapId, NSString * error))onCompleted;
/// <summary>
/// Loads a map from EasyAR cloud servers by serverMapId. To unload the map, call `SparseSpatialMap.unloadMap`_ with serverMapId.
/// </summary>
- (void)load:(easyar_SparseSpatialMap *)mapTracker serverMapId:(NSString *)serverMapId apiKey:(NSString *)apiKey apiSecret:(NSString *)apiSecret sparseSpatialMapAppId:(NSString *)sparseSpatialMapAppId callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler onCompleted:(void (^)(bool isSuccessful, NSString * error))onCompleted;
/// <summary>
/// Clears allocated cache space.
/// </summary>
- (void)clear;
@end
fileFormatVersion: 2
guid: 49f67b2ebc77e9647915a46427bfe981
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_STORAGE_H__
#define __EASYAR_STORAGE_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Sets asset root path.
/// </summary>
void easyar_Storage_setAssetDirPath(easyar_String * path);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 3da2f508ea22e104cac564d20ff36de4
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_STORAGE_HXX__
#define __EASYAR_STORAGE_HXX__
#include "easyar/types.hxx"
namespace easyar {
class Storage
{
public:
/// <summary>
/// Sets asset root path.
/// </summary>
static void setAssetDirPath(String * path);
};
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_STORAGE_HXX__
#define __IMPLEMENTATION_EASYAR_STORAGE_HXX__
#include "easyar/storage.h"
namespace easyar {
inline void Storage::setAssetDirPath(String * arg0)
{
easyar_Storage_setAssetDirPath(arg0->get_cdata());
}
}
#endif
fileFormatVersion: 2
guid: eeae4c9fa18cb874a8f0c890b3849bde
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_Storage : NSObject
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Sets asset root path.
/// </summary>
+ (void)setAssetDirPath:(NSString *)path;
@end
fileFormatVersion: 2
guid: 5f1f05dac8a70484d860e5753b443b8b
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_SURFACETRACKER_H__
#define __EASYAR_SURFACETRACKER_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Camera transform 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.) For the world coordinate system, y is up (to the opposite of gravity). The data arrangement is row-major, not like OpenGL&#39;s column-major.
/// </summary>
easyar_Matrix44F easyar_SurfaceTrackerResult_transform(const easyar_SurfaceTrackerResult * This);
void easyar_SurfaceTrackerResult__dtor(easyar_SurfaceTrackerResult * This);
void easyar_SurfaceTrackerResult__retain(const easyar_SurfaceTrackerResult * This, /* OUT */ easyar_SurfaceTrackerResult * * Return);
const char * easyar_SurfaceTrackerResult__typeName(const easyar_SurfaceTrackerResult * This);
void easyar_castSurfaceTrackerResultToFrameFilterResult(const easyar_SurfaceTrackerResult * This, /* OUT */ easyar_FrameFilterResult * * Return);
void easyar_tryCastFrameFilterResultToSurfaceTrackerResult(const easyar_FrameFilterResult * This, /* OUT */ easyar_SurfaceTrackerResult * * Return);
/// <summary>
/// Returns true only on Android or iOS when accelerometer and gyroscope are available.
/// </summary>
bool easyar_SurfaceTracker_isAvailable(void);
/// <summary>
/// `InputFrame`_ input port. InputFrame must have raw image, timestamp, and camera parameters.
/// </summary>
void easyar_SurfaceTracker_inputFrameSink(easyar_SurfaceTracker * This, /* OUT */ easyar_InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int easyar_SurfaceTracker_bufferRequirement(easyar_SurfaceTracker * This);
/// <summary>
/// `OutputFrame`_ output port.
/// </summary>
void easyar_SurfaceTracker_outputFrameSource(easyar_SurfaceTracker * This, /* OUT */ easyar_OutputFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_SurfaceTracker_create(/* OUT */ easyar_SurfaceTracker * * Return);
/// <summary>
/// Starts the track algorithm.
/// </summary>
bool easyar_SurfaceTracker_start(easyar_SurfaceTracker * This);
/// <summary>
/// Stops the track algorithm. Call start to start the track again.
/// </summary>
void easyar_SurfaceTracker_stop(easyar_SurfaceTracker * This);
/// <summary>
/// Close. The component shall not be used after calling close.
/// </summary>
void easyar_SurfaceTracker_close(easyar_SurfaceTracker * This);
/// <summary>
/// Sets the tracking target to a point on camera image. For the camera image coordinate system ([0, 1]^2), x-right, y-down, and origin is at left-top corner. `CameraParameters.imageCoordinatesFromScreenCoordinates`_ can be used to convert points from screen coordinate system to camera image coordinate system.
/// </summary>
void easyar_SurfaceTracker_alignTargetToCameraImagePoint(easyar_SurfaceTracker * This, easyar_Vec2F cameraImagePoint);
void easyar_SurfaceTracker__dtor(easyar_SurfaceTracker * This);
void easyar_SurfaceTracker__retain(const easyar_SurfaceTracker * This, /* OUT */ easyar_SurfaceTracker * * Return);
const char * easyar_SurfaceTracker__typeName(const easyar_SurfaceTracker * This);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: ddd9b2cbefc70584a84e0544c2248e1a
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_SURFACETRACKER_HXX__
#define __EASYAR_SURFACETRACKER_HXX__
#include "easyar/types.hxx"
#include "easyar/frame.hxx"
namespace easyar {
/// <summary>
/// Result of `SurfaceTracker`_ .
/// </summary>
class SurfaceTrackerResult : public FrameFilterResult
{
protected:
easyar_SurfaceTrackerResult * cdata_ ;
void init_cdata(easyar_SurfaceTrackerResult * cdata);
virtual SurfaceTrackerResult & operator=(const SurfaceTrackerResult & data) { return *this; } //deleted
public:
SurfaceTrackerResult(easyar_SurfaceTrackerResult * cdata);
virtual ~SurfaceTrackerResult();
SurfaceTrackerResult(const SurfaceTrackerResult & data);
const easyar_SurfaceTrackerResult * get_cdata() const;
easyar_SurfaceTrackerResult * get_cdata();
/// <summary>
/// Camera transform 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.) For the world coordinate system, y is up (to the opposite of gravity). The data arrangement is row-major, not like OpenGL&#39;s column-major.
/// </summary>
Matrix44F transform();
static void tryCastFromFrameFilterResult(FrameFilterResult * v, /* OUT */ SurfaceTrackerResult * * Return);
};
/// <summary>
/// SurfaceTracker implements tracking with environmental surfaces.
/// SurfaceTracker occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview &lt;Overview.html&gt;`__ .
/// After creation, you can call start/stop to enable/disable the track process. start and stop are very lightweight calls.
/// When the component is not needed anymore, call close function to close it. It shall not be used after calling close.
/// SurfaceTracker inputs `InputFrame`_ from inputFrameSink. `InputFrameSource`_ shall be connected to inputFrameSink for use. Refer to `Overview &lt;Overview.html&gt;`__ .
/// </summary>
class SurfaceTracker
{
protected:
easyar_SurfaceTracker * cdata_ ;
void init_cdata(easyar_SurfaceTracker * cdata);
virtual SurfaceTracker & operator=(const SurfaceTracker & data) { return *this; } //deleted
public:
SurfaceTracker(easyar_SurfaceTracker * cdata);
virtual ~SurfaceTracker();
SurfaceTracker(const SurfaceTracker & data);
const easyar_SurfaceTracker * get_cdata() const;
easyar_SurfaceTracker * get_cdata();
/// <summary>
/// Returns true only on Android or iOS when accelerometer and gyroscope are available.
/// </summary>
static bool isAvailable();
/// <summary>
/// `InputFrame`_ input port. InputFrame must have raw image, timestamp, and camera parameters.
/// </summary>
void inputFrameSink(/* OUT */ InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int bufferRequirement();
/// <summary>
/// `OutputFrame`_ output port.
/// </summary>
void outputFrameSource(/* OUT */ OutputFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
static void create(/* OUT */ SurfaceTracker * * Return);
/// <summary>
/// Starts the track algorithm.
/// </summary>
bool start();
/// <summary>
/// Stops the track algorithm. Call start to start the track again.
/// </summary>
void stop();
/// <summary>
/// Close. The component shall not be used after calling close.
/// </summary>
void close();
/// <summary>
/// Sets the tracking target to a point on camera image. For the camera image coordinate system ([0, 1]^2), x-right, y-down, and origin is at left-top corner. `CameraParameters.imageCoordinatesFromScreenCoordinates`_ can be used to convert points from screen coordinate system to camera image coordinate system.
/// </summary>
void alignTargetToCameraImagePoint(Vec2F cameraImagePoint);
};
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_SURFACETRACKER_HXX__
#define __IMPLEMENTATION_EASYAR_SURFACETRACKER_HXX__
#include "easyar/surfacetracker.h"
#include "easyar/frame.hxx"
#include "easyar/matrix.hxx"
#include "easyar/dataflow.hxx"
#include "easyar/image.hxx"
#include "easyar/buffer.hxx"
#include "easyar/cameraparameters.hxx"
#include "easyar/vector.hxx"
namespace easyar {
inline SurfaceTrackerResult::SurfaceTrackerResult(easyar_SurfaceTrackerResult * cdata)
:
FrameFilterResult(static_cast<easyar_FrameFilterResult *>(NULL)),
cdata_(NULL)
{
init_cdata(cdata);
}
inline SurfaceTrackerResult::~SurfaceTrackerResult()
{
if (cdata_) {
easyar_SurfaceTrackerResult__dtor(cdata_);
cdata_ = NULL;
}
}
inline SurfaceTrackerResult::SurfaceTrackerResult(const SurfaceTrackerResult & data)
:
FrameFilterResult(static_cast<easyar_FrameFilterResult *>(NULL)),
cdata_(NULL)
{
easyar_SurfaceTrackerResult * cdata = NULL;
easyar_SurfaceTrackerResult__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_SurfaceTrackerResult * SurfaceTrackerResult::get_cdata() const
{
return cdata_;
}
inline easyar_SurfaceTrackerResult * SurfaceTrackerResult::get_cdata()
{
return cdata_;
}
inline void SurfaceTrackerResult::init_cdata(easyar_SurfaceTrackerResult * cdata)
{
cdata_ = cdata;
{
easyar_FrameFilterResult * cdata_inner = NULL;
easyar_castSurfaceTrackerResultToFrameFilterResult(cdata, &cdata_inner);
FrameFilterResult::init_cdata(cdata_inner);
}
}
inline Matrix44F SurfaceTrackerResult::transform()
{
if (cdata_ == NULL) {
return Matrix44F();
}
easyar_Matrix44F _return_value_ = easyar_SurfaceTrackerResult_transform(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 void SurfaceTrackerResult::tryCastFromFrameFilterResult(FrameFilterResult * v, /* OUT */ SurfaceTrackerResult * * Return)
{
if (v == NULL) {
*Return = NULL;
return;
}
easyar_SurfaceTrackerResult * cdata = NULL;
easyar_tryCastFrameFilterResultToSurfaceTrackerResult(v->get_cdata(), &cdata);
if (cdata == NULL) {
*Return = NULL;
return;
}
*Return = new SurfaceTrackerResult(cdata);
}
inline SurfaceTracker::SurfaceTracker(easyar_SurfaceTracker * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline SurfaceTracker::~SurfaceTracker()
{
if (cdata_) {
easyar_SurfaceTracker__dtor(cdata_);
cdata_ = NULL;
}
}
inline SurfaceTracker::SurfaceTracker(const SurfaceTracker & data)
:
cdata_(NULL)
{
easyar_SurfaceTracker * cdata = NULL;
easyar_SurfaceTracker__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_SurfaceTracker * SurfaceTracker::get_cdata() const
{
return cdata_;
}
inline easyar_SurfaceTracker * SurfaceTracker::get_cdata()
{
return cdata_;
}
inline void SurfaceTracker::init_cdata(easyar_SurfaceTracker * cdata)
{
cdata_ = cdata;
}
inline bool SurfaceTracker::isAvailable()
{
bool _return_value_ = easyar_SurfaceTracker_isAvailable();
return _return_value_;
}
inline void SurfaceTracker::inputFrameSink(/* OUT */ InputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSink * _return_value_ = NULL;
easyar_SurfaceTracker_inputFrameSink(cdata_, &_return_value_);
*Return = new InputFrameSink(_return_value_);
}
inline int SurfaceTracker::bufferRequirement()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_SurfaceTracker_bufferRequirement(cdata_);
return _return_value_;
}
inline void SurfaceTracker::outputFrameSource(/* OUT */ OutputFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OutputFrameSource * _return_value_ = NULL;
easyar_SurfaceTracker_outputFrameSource(cdata_, &_return_value_);
*Return = new OutputFrameSource(_return_value_);
}
inline void SurfaceTracker::create(/* OUT */ SurfaceTracker * * Return)
{
easyar_SurfaceTracker * _return_value_ = NULL;
easyar_SurfaceTracker_create(&_return_value_);
*Return = new SurfaceTracker(_return_value_);
}
inline bool SurfaceTracker::start()
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_SurfaceTracker_start(cdata_);
return _return_value_;
}
inline void SurfaceTracker::stop()
{
if (cdata_ == NULL) {
return;
}
easyar_SurfaceTracker_stop(cdata_);
}
inline void SurfaceTracker::close()
{
if (cdata_ == NULL) {
return;
}
easyar_SurfaceTracker_close(cdata_);
}
inline void SurfaceTracker::alignTargetToCameraImagePoint(Vec2F arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_SurfaceTracker_alignTargetToCameraImagePoint(cdata_, arg0.get_cdata());
}
}
#endif
fileFormatVersion: 2
guid: d4d641f8b91142746a8d674d4ed47dd6
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"
#import "easyar/frame.oc.h"
/// <summary>
/// Result of `SurfaceTracker`_ .
/// </summary>
@interface easyar_SurfaceTrackerResult : easyar_FrameFilterResult
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Camera transform 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.) For the world coordinate system, y is up (to the opposite of gravity). The data arrangement is row-major, not like OpenGL&#39;s column-major.
/// </summary>
- (easyar_Matrix44F *)transform;
@end
/// <summary>
/// SurfaceTracker implements tracking with environmental surfaces.
/// SurfaceTracker occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview &lt;Overview.html&gt;`__ .
/// After creation, you can call start/stop to enable/disable the track process. start and stop are very lightweight calls.
/// When the component is not needed anymore, call close function to close it. It shall not be used after calling close.
/// SurfaceTracker inputs `InputFrame`_ from inputFrameSink. `InputFrameSource`_ shall be connected to inputFrameSink for use. Refer to `Overview &lt;Overview.html&gt;`__ .
/// </summary>
@interface easyar_SurfaceTracker : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Returns true only on Android or iOS when accelerometer and gyroscope are available.
/// </summary>
+ (bool)isAvailable;
/// <summary>
/// `InputFrame`_ input port. InputFrame must have raw image, timestamp, and camera parameters.
/// </summary>
- (easyar_InputFrameSink *)inputFrameSink;
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
- (int)bufferRequirement;
/// <summary>
/// `OutputFrame`_ output port.
/// </summary>
- (easyar_OutputFrameSource *)outputFrameSource;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_SurfaceTracker *)create;
/// <summary>
/// Starts the track algorithm.
/// </summary>
- (bool)start;
/// <summary>
/// Stops the track algorithm. Call start to start the track again.
/// </summary>
- (void)stop;
/// <summary>
/// Close. The component shall not be used after calling close.
/// </summary>
- (void)close;
/// <summary>
/// Sets the tracking target to a point on camera image. For the camera image coordinate system ([0, 1]^2), x-right, y-down, and origin is at left-top corner. `CameraParameters.imageCoordinatesFromScreenCoordinates`_ can be used to convert points from screen coordinate system to camera image coordinate system.
/// </summary>
- (void)alignTargetToCameraImagePoint:(easyar_Vec2F *)cameraImagePoint;
@end
fileFormatVersion: 2
guid: 88f3ece01cfc7e145bf2c51f0e87042a
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_TARGET_H__
#define __EASYAR_TARGET_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Returns the target id. A target id is a integer number generated at runtime. This id is non-zero and increasing globally.
/// </summary>
int easyar_Target_runtimeID(const easyar_Target * This);
/// <summary>
/// Returns the target uid. A target uid is useful in cloud based algorithms. If no cloud is used, you can set this uid in the json config as a alternative method to distinguish from targets.
/// </summary>
void easyar_Target_uid(const easyar_Target * This, /* OUT */ easyar_String * * Return);
/// <summary>
/// Returns the target name. Name is used to distinguish targets in a json file.
/// </summary>
void easyar_Target_name(const easyar_Target * This, /* OUT */ easyar_String * * Return);
/// <summary>
/// Set name. It will erase previously set data or data from cloud.
/// </summary>
void easyar_Target_setName(easyar_Target * This, easyar_String * name);
/// <summary>
/// Returns the meta data set by setMetaData. Or, in a cloud returned target, returns the meta data set in the cloud server.
/// </summary>
void easyar_Target_meta(const easyar_Target * This, /* OUT */ easyar_String * * Return);
/// <summary>
/// Set meta data. It will erase previously set data or data from cloud.
/// </summary>
void easyar_Target_setMeta(easyar_Target * This, easyar_String * data);
void easyar_Target__dtor(easyar_Target * This);
void easyar_Target__retain(const easyar_Target * This, /* OUT */ easyar_Target * * Return);
const char * easyar_Target__typeName(const easyar_Target * This);
void easyar_TargetInstance__ctor(/* OUT */ easyar_TargetInstance * * Return);
/// <summary>
/// Returns current status of the tracked target. Usually you can check if the status equals `TargetStatus.Tracked` to determine current status of the target.
/// </summary>
easyar_TargetStatus easyar_TargetInstance_status(const easyar_TargetInstance * This);
/// <summary>
/// Gets the raw target. It will return the same `Target`_ you loaded into a tracker if it was previously loaded into the tracker.
/// </summary>
void easyar_TargetInstance_target(const easyar_TargetInstance * This, /* OUT */ easyar_OptionalOfTarget * Return);
/// <summary>
/// Returns current pose of the tracked target. Camera coordinate system and target 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_TargetInstance_pose(const easyar_TargetInstance * This);
void easyar_TargetInstance__dtor(easyar_TargetInstance * This);
void easyar_TargetInstance__retain(const easyar_TargetInstance * This, /* OUT */ easyar_TargetInstance * * Return);
const char * easyar_TargetInstance__typeName(const easyar_TargetInstance * This);
/// <summary>
/// Returns the list of `TargetInstance`_ contained in the result.
/// </summary>
void easyar_TargetTrackerResult_targetInstances(const easyar_TargetTrackerResult * This, /* OUT */ easyar_ListOfTargetInstance * * Return);
/// <summary>
/// Sets the list of `TargetInstance`_ contained in the result.
/// </summary>
void easyar_TargetTrackerResult_setTargetInstances(easyar_TargetTrackerResult * This, easyar_ListOfTargetInstance * instances);
void easyar_TargetTrackerResult__dtor(easyar_TargetTrackerResult * This);
void easyar_TargetTrackerResult__retain(const easyar_TargetTrackerResult * This, /* OUT */ easyar_TargetTrackerResult * * Return);
const char * easyar_TargetTrackerResult__typeName(const easyar_TargetTrackerResult * This);
void easyar_castTargetTrackerResultToFrameFilterResult(const easyar_TargetTrackerResult * This, /* OUT */ easyar_FrameFilterResult * * Return);
void easyar_tryCastFrameFilterResultToTargetTrackerResult(const easyar_FrameFilterResult * This, /* OUT */ easyar_TargetTrackerResult * * Return);
void easyar_ListOfTargetInstance__ctor(easyar_TargetInstance * const * begin, easyar_TargetInstance * const * end, /* OUT */ easyar_ListOfTargetInstance * * Return);
void easyar_ListOfTargetInstance__dtor(easyar_ListOfTargetInstance * This);
void easyar_ListOfTargetInstance_copy(const easyar_ListOfTargetInstance * This, /* OUT */ easyar_ListOfTargetInstance * * Return);
int easyar_ListOfTargetInstance_size(const easyar_ListOfTargetInstance * This);
easyar_TargetInstance * easyar_ListOfTargetInstance_at(const easyar_ListOfTargetInstance * This, int index);
#ifdef __cplusplus
}
#endif
#endif
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