//============================================================================================================================= // // EasyAR Sense 3.1.0-final-7bf6504c6 // Copyright (c) 2015-2020 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_IMAGETARGET_H__ #define __EASYAR_IMAGETARGET_H__ #include "easyar/types.h" #ifdef __cplusplus extern "C" { #endif void easyar_ImageTargetParameters__ctor(/* OUT */ easyar_ImageTargetParameters * * Return); /// /// Gets image. /// void easyar_ImageTargetParameters_image(easyar_ImageTargetParameters * This, /* OUT */ easyar_Image * * Return); /// /// Sets image. /// void easyar_ImageTargetParameters_setImage(easyar_ImageTargetParameters * This, easyar_Image * image); /// /// Gets target name. It can be used to distinguish targets. /// void easyar_ImageTargetParameters_name(easyar_ImageTargetParameters * This, /* OUT */ easyar_String * * Return); /// /// Sets target name. /// void easyar_ImageTargetParameters_setName(easyar_ImageTargetParameters * This, easyar_String * name); /// /// Gets 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 an alternative method to distinguish from targets. /// void easyar_ImageTargetParameters_uid(easyar_ImageTargetParameters * This, /* OUT */ easyar_String * * Return); /// /// Sets target uid. /// void easyar_ImageTargetParameters_setUid(easyar_ImageTargetParameters * This, easyar_String * uid); /// /// Gets meta data. /// void easyar_ImageTargetParameters_meta(easyar_ImageTargetParameters * This, /* OUT */ easyar_String * * Return); /// /// Sets meta data。 /// void easyar_ImageTargetParameters_setMeta(easyar_ImageTargetParameters * This, easyar_String * meta); /// /// Gets the scale of image. The value is the physical image width divided by 1 meter. The default value is 1. /// float easyar_ImageTargetParameters_scale(easyar_ImageTargetParameters * This); /// /// Sets the scale of image. The value is the physical image width divided by 1 meter. The default value is 1. /// It is needed to set the model scale in rendering engine separately. /// void easyar_ImageTargetParameters_setScale(easyar_ImageTargetParameters * This, float scale); void easyar_ImageTargetParameters__dtor(easyar_ImageTargetParameters * This); void easyar_ImageTargetParameters__retain(const easyar_ImageTargetParameters * This, /* OUT */ easyar_ImageTargetParameters * * Return); const char * easyar_ImageTargetParameters__typeName(const easyar_ImageTargetParameters * This); void easyar_ImageTarget__ctor(/* OUT */ easyar_ImageTarget * * Return); /// /// Creates a target from parameters. /// void easyar_ImageTarget_createFromParameters(easyar_ImageTargetParameters * parameters, /* OUT */ easyar_OptionalOfImageTarget * Return); /// /// Creates a target from an etd file. /// void easyar_ImageTarget_createFromTargetFile(easyar_String * path, easyar_StorageType storageType, /* OUT */ easyar_OptionalOfImageTarget * Return); /// /// Creates a target from an etd data buffer. /// void easyar_ImageTarget_createFromTargetData(easyar_Buffer * buffer, /* OUT */ easyar_OptionalOfImageTarget * Return); /// /// Saves as an etd file. /// bool easyar_ImageTarget_save(easyar_ImageTarget * This, easyar_String * path); /// /// Creates a target from an image file. If not needed, name, uid, meta can be passed with empty string, and scale can be passed with default value 1. /// void easyar_ImageTarget_createFromImageFile(easyar_String * path, easyar_StorageType storageType, easyar_String * name, easyar_String * uid, easyar_String * meta, float scale, /* OUT */ easyar_OptionalOfImageTarget * Return); /// /// Setup all targets listed in the json file or json string from path with storageType. This method only parses the json file or string. /// If path is json file path, storageType should be `App` or `Assets` or `Absolute` indicating the path type. Paths inside json files should be absolute path or relative path to the json file. /// See `StorageType`_ for more descriptions. /// void easyar_ImageTarget_setupAll(easyar_String * path, easyar_StorageType storageType, /* OUT */ easyar_ListOfImageTarget * * Return); /// /// The scale of image. The value is the physical image width divided by 1 meter. The default value is 1. /// float easyar_ImageTarget_scale(const easyar_ImageTarget * This); /// /// The aspect ratio of image, width divided by height. /// float easyar_ImageTarget_aspectRatio(const easyar_ImageTarget * This); /// /// Sets image target scale, this will overwrite the value set in the json file or the default value. The value is the physical image width divided by 1 meter. The default value is 1. /// It is needed to set the model scale in rendering engine separately. /// bool easyar_ImageTarget_setScale(easyar_ImageTarget * This, float scale); /// /// Returns a list of images that stored in the target. It is generally used to get image data from cloud returned target. /// void easyar_ImageTarget_images(easyar_ImageTarget * This, /* OUT */ easyar_ListOfImage * * Return); /// /// Returns the target id. A target id is a integer number generated at runtime. This id is non-zero and increasing globally. /// int easyar_ImageTarget_runtimeID(const easyar_ImageTarget * This); /// /// 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. /// void easyar_ImageTarget_uid(const easyar_ImageTarget * This, /* OUT */ easyar_String * * Return); /// /// Returns the target name. Name is used to distinguish targets in a json file. /// void easyar_ImageTarget_name(const easyar_ImageTarget * This, /* OUT */ easyar_String * * Return); /// /// Set name. It will erase previously set data or data from cloud. /// void easyar_ImageTarget_setName(easyar_ImageTarget * This, easyar_String * name); /// /// Returns the meta data set by setMetaData. Or, in a cloud returned target, returns the meta data set in the cloud server. /// void easyar_ImageTarget_meta(const easyar_ImageTarget * This, /* OUT */ easyar_String * * Return); /// /// Set meta data. It will erase previously set data or data from cloud. /// void easyar_ImageTarget_setMeta(easyar_ImageTarget * This, easyar_String * data); void easyar_ImageTarget__dtor(easyar_ImageTarget * This); void easyar_ImageTarget__retain(const easyar_ImageTarget * This, /* OUT */ easyar_ImageTarget * * Return); const char * easyar_ImageTarget__typeName(const easyar_ImageTarget * This); void easyar_castImageTargetToTarget(const easyar_ImageTarget * This, /* OUT */ easyar_Target * * Return); void easyar_tryCastTargetToImageTarget(const easyar_Target * This, /* OUT */ easyar_ImageTarget * * Return); void easyar_ListOfImageTarget__ctor(easyar_ImageTarget * const * begin, easyar_ImageTarget * const * end, /* OUT */ easyar_ListOfImageTarget * * Return); void easyar_ListOfImageTarget__dtor(easyar_ListOfImageTarget * This); void easyar_ListOfImageTarget_copy(const easyar_ListOfImageTarget * This, /* OUT */ easyar_ListOfImageTarget * * Return); int easyar_ListOfImageTarget_size(const easyar_ListOfImageTarget * This); easyar_ImageTarget * easyar_ListOfImageTarget_at(const easyar_ListOfImageTarget * This, int index); void easyar_ListOfImage__ctor(easyar_Image * const * begin, easyar_Image * const * end, /* OUT */ easyar_ListOfImage * * Return); void easyar_ListOfImage__dtor(easyar_ListOfImage * This); void easyar_ListOfImage_copy(const easyar_ListOfImage * This, /* OUT */ easyar_ListOfImage * * Return); int easyar_ListOfImage_size(const easyar_ListOfImage * This); easyar_Image * easyar_ListOfImage_at(const easyar_ListOfImage * This, int index); #ifdef __cplusplus } #endif #endif