//============================================================================================================================= // // 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_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. Jpeg and png files are supported. /// 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); /// /// 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_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