Table of Contents

Class SparseSpatialMap

Namespace
easyar

Bietet die Hauptfunktionen des SparseSpatialMap-Systems: Kartengenerierung und -speicherung, Kartenladen und Lokalisierung. Ermöglicht außerdem das Abrufen von Umgebungsinformationen wie Punktwolken und Ebenen sowie Hit-Tests. SparseSpatialMap belegt 2 camera-Buffer. Verwenden Sie camera.setBufferCapacity, um eine Kapazität einzustellen, die nicht geringer ist als die von allen Komponenten insgesamt belegte Anzahl an camera-Buffern.

SparseSpatialMap

Methoden

isAvailable

Prüft, ob SparseSpatialMap verfügbar ist. Gibt immer true zurück.

bool easyar_SparseSpatialMap_isAvailable(void)
static bool isAvailable()
public static boolean isAvailable()
companion object fun isAvailable(): Boolean
+ (bool)isAvailable
public static func isAvailable() -> Bool
public static bool isAvailable()

Rückgabewert

Typ Beschreibung
Boolean

inputFrameSink

Eingabeport für Eingaberahmen. Ein SparseSpatialMap-Eingaberahmen muss Kameraparameter, Zeitstempelinformationen und Rauminformationen (cameraTransform und trackingStatus) enthalten. Siehe InputFrameSink. Hinweis: Unterstützt Loch- und Fischaugen-Kameramodelle. Die Verwendung eines Fischaugenmodells kann die Leistung beeinträchtigen.

void easyar_SparseSpatialMap_inputFrameSink(easyar_SparseSpatialMap * This, easyar_InputFrameSink * * Return)
std::shared_ptr<InputFrameSink> inputFrameSink()
public @Nonnull InputFrameSink inputFrameSink()
fun inputFrameSink(): InputFrameSink
- (easyar_InputFrameSink *)inputFrameSink
public func inputFrameSink() -> InputFrameSink
public virtual InputFrameSink inputFrameSink()

Rückgabewert

Typ Beschreibung
InputFrameSink

bufferRequirement

Die Anzahl der von dieser Komponente belegten camera-Buffer.

int easyar_SparseSpatialMap_bufferRequirement(easyar_SparseSpatialMap * This)
int bufferRequirement()
public int bufferRequirement()
fun bufferRequirement(): Int
- (int)bufferRequirement
public func bufferRequirement() -> Int32
public virtual int bufferRequirement()

Rückgabewert

Typ Beschreibung
Int32

outputFrameSource

Ausgabeport für Ausgaberahmen. Siehe OutputFrameSource.

void easyar_SparseSpatialMap_outputFrameSource(easyar_SparseSpatialMap * This, easyar_OutputFrameSource * * Return)
std::shared_ptr<OutputFrameSource> outputFrameSource()
public @Nonnull OutputFrameSource outputFrameSource()
fun outputFrameSource(): OutputFrameSource
- (easyar_OutputFrameSource *)outputFrameSource
public func outputFrameSource() -> OutputFrameSource
public virtual OutputFrameSource outputFrameSource()

Rückgabewert

Typ Beschreibung
OutputFrameSource

create

Konstruiert ein SparseSpatialMap-Objekt.

void easyar_SparseSpatialMap_create(easyar_SparseSpatialMap * * Return)
static std::shared_ptr<SparseSpatialMap> create()
public static @Nonnull SparseSpatialMap create()
companion object fun create(): SparseSpatialMap
+ (easyar_SparseSpatialMap *)create
public static func create() -> SparseSpatialMap
public static SparseSpatialMap create()

Rückgabewert

Typ Beschreibung
SparseSpatialMap

setResultPoseType

Legt den Typ der Ergebnispose fest. Standardmäßig ist enableStabilization false. Nur wirksam, wenn InputFrame Rauminformationen enthält.

void easyar_SparseSpatialMap_setResultPoseType(easyar_SparseSpatialMap * This, bool enableStabilization)
void setResultPoseType(bool enableStabilization)
public void setResultPoseType(boolean enableStabilization)
fun setResultPoseType(enableStabilization: Boolean): Unit
- (void)setResultPoseType:(bool)enableStabilization
public func setResultPoseType(_ enableStabilization: Bool) -> Void
public virtual void setResultPoseType(bool enableStabilization)

Parameter

Name Typ Beschreibung
enableStabilization Boolean

Rückgabewert

Typ Beschreibung
Void

setResultAsyncMode

Legt den asynchronen Ergebnis-Modus fest. Sollte auf true gesetzt werden, wenn Ergebnisse über outputFrameSource ausgegeben werden, und auf false, wenn Ergebnisse über getSyncResult abgerufen werden. Standardmäßig ist enableAsync true. Der synchrone Modus ist nur wirksam, wenn der Eingaberahmen Rauminformationen enthält und eine XR-Lizenz verwendet wird.

bool easyar_SparseSpatialMap_setResultAsyncMode(easyar_SparseSpatialMap * This, bool enableAsync)
bool setResultAsyncMode(bool enableAsync)
public boolean setResultAsyncMode(boolean enableAsync)
fun setResultAsyncMode(enableAsync: Boolean): Boolean
- (bool)setResultAsyncMode:(bool)enableAsync
public func setResultAsyncMode(_ enableAsync: Bool) -> Bool
public virtual bool setResultAsyncMode(bool enableAsync)

Parameter

Name Typ Beschreibung
enableAsync Boolean

Rückgabewert

Typ Beschreibung
Boolean

start

Startet den SparseSpatialMap-Algorithmus.

bool easyar_SparseSpatialMap_start(easyar_SparseSpatialMap * This)
bool start()
public boolean start()
fun start(): Boolean
- (bool)start
public func start() -> Bool
public virtual bool start()

Rückgabewert

Typ Beschreibung
Boolean

stop

Stoppt den SparseSpatialMap-Algorithmus. Rufen Sie start auf, um ihn neu zu starten.

void easyar_SparseSpatialMap_stop(easyar_SparseSpatialMap * This)
void stop()
public void stop()
fun stop(): Unit
- (void)stop
public func stop() -> Void
public virtual void stop()

Rückgabewert

Typ Beschreibung
Void

close

Schließt SparseSpatialMap. Nach dem close sollte es nicht weiter verwendet werden.

void easyar_SparseSpatialMap_close(easyar_SparseSpatialMap * This)
void close()
public void close()
fun close(): Unit
- (void)close
public func close() -> Void
public virtual void close()

Rückgabewert

Typ Beschreibung
Void

getPointCloudBuffer

Ruft die Positionsinformationen der aktuellen Punktwolken-Daten ab. Die Positionen der Punktwolken sind im Weltkoordinatensystem angegeben. Jeder Punkt im Buffer wird durch drei aufeinanderfolgende Werte dargestellt, die die Koordinaten auf der X-, Y- und Z-Achse repräsentieren. Jeder Wert belegt 4 Bytes.

void easyar_SparseSpatialMap_getPointCloudBuffer(easyar_SparseSpatialMap * This, easyar_Buffer * * Return)
std::shared_ptr<Buffer> getPointCloudBuffer()
public @Nonnull Buffer getPointCloudBuffer()
fun getPointCloudBuffer(): Buffer
- (easyar_Buffer *)getPointCloudBuffer
public func getPointCloudBuffer() -> Buffer
public virtual Buffer getPointCloudBuffer()

Rückgabewert

Typ Beschreibung
Buffer

getMapPlanes

Ruft die erkannten Ebenen ab, vom Typ PlaneType.

void easyar_SparseSpatialMap_getMapPlanes(easyar_SparseSpatialMap * This, easyar_ListOfPlaneData * * Return)
std::vector<std::shared_ptr<PlaneData>> getMapPlanes()
public java.util.@Nonnull ArrayList<@Nonnull PlaneData> getMapPlanes()
fun getMapPlanes(): ArrayList<PlaneData>
- (NSArray<easyar_PlaneData *> *)getMapPlanes
public func getMapPlanes() -> [PlaneData]
public virtual List<PlaneData> getMapPlanes()

Rückgabewert

Typ Beschreibung
List<PlaneData>

hitTestAgainstPointCloud

Führt einen Hit-Test in der aktuellen Punktwolke durch und erhält n (n>=0) Positionskoordinaten entlang eines Strahls von der Kamera aus, sortiert von nah nach fern.

void easyar_SparseSpatialMap_hitTestAgainstPointCloud(easyar_SparseSpatialMap * This, easyar_Vec2F cameraImagePoint, easyar_ListOfVec3F * * Return)
std::vector<Vec3F> hitTestAgainstPointCloud(Vec2F cameraImagePoint)
public java.util.@Nonnull ArrayList<@Nonnull Vec3F> hitTestAgainstPointCloud(@Nonnull Vec2F cameraImagePoint)
fun hitTestAgainstPointCloud(cameraImagePoint: Vec2F): ArrayList<Vec3F>
- (NSArray<easyar_Vec3F *> *)hitTestAgainstPointCloud:(easyar_Vec2F *)cameraImagePoint
public func hitTestAgainstPointCloud(_ cameraImagePoint: Vec2F) -> [Vec3F]
public virtual List<Vec3F> hitTestAgainstPointCloud(Vec2F cameraImagePoint)

Parameter

Name Typ Beschreibung
cameraImagePoint Vec2F

Rückgabewert

Typ Beschreibung
List<Vec3F>

hitTestAgainstPlanes

Führt einen Hit-Test auf der aktuell erkannten Ebene durch und erhält n (n>=0) Positionskoordinaten entlang eines Strahls von der Kamera aus, sortiert von nah nach fern. Das Eingabe-Bildkoordinatensystem ([0, 1]^2) hat x nach rechts, y nach unten, mit dem Ursprung oben links. Verwenden Sie imageCoordinatesFromScreenCoordinates, um Bildschirmkoordinaten in Bildkoordinaten umzuwandeln. Die Ausgabe sind die Koordinaten der Punktwolke im Weltkoordinatensystem.

void easyar_SparseSpatialMap_hitTestAgainstPlanes(easyar_SparseSpatialMap * This, easyar_Vec2F cameraImagePoint, easyar_ListOfVec3F * * Return)
std::vector<Vec3F> hitTestAgainstPlanes(Vec2F cameraImagePoint)
public java.util.@Nonnull ArrayList<@Nonnull Vec3F> hitTestAgainstPlanes(@Nonnull Vec2F cameraImagePoint)
fun hitTestAgainstPlanes(cameraImagePoint: Vec2F): ArrayList<Vec3F>
- (NSArray<easyar_Vec3F *> *)hitTestAgainstPlanes:(easyar_Vec2F *)cameraImagePoint
public func hitTestAgainstPlanes(_ cameraImagePoint: Vec2F) -> [Vec3F]
public virtual List<Vec3F> hitTestAgainstPlanes(Vec2F cameraImagePoint)

Parameter

Name Typ Beschreibung
cameraImagePoint Vec2F

Rückgabewert

Typ Beschreibung
List<Vec3F>

getMapVersion

Ruft die aktuelle Kartenversion von SparseSpatialMap ab.

void easyar_SparseSpatialMap_getMapVersion(easyar_String * * Return)
static std::string getMapVersion()
public static java.lang.@Nonnull String getMapVersion()
companion object fun getMapVersion(): String
+ (NSString *)getMapVersion
public static func getMapVersion() -> String
public static string getMapVersion()

Rückgabewert

Typ Beschreibung
String

unloadMap

Entlädt die angegebenen SparseSpatialMap-Kartendaten über einen Callback. Der Rückgabewert des Callbacks zeigt an, ob das Entladen erfolgreich war (true) oder nicht (false).

void easyar_SparseSpatialMap_unloadMap(easyar_SparseSpatialMap * This, easyar_String * mapID, easyar_CallbackScheduler * callbackScheduler, easyar_OptionalOfFunctorOfVoidFromBool resultCallBack)
void unloadMap(std::string mapID, std::shared_ptr<CallbackScheduler> callbackScheduler, std::optional<std::function<void(bool)>> resultCallBack)
public void unloadMap(java.lang.@Nonnull String mapID, @Nonnull CallbackScheduler callbackScheduler, @Nullable FunctorOfVoidFromBool resultCallBack)
fun unloadMap(mapID: String, callbackScheduler: CallbackScheduler, resultCallBack: FunctorOfVoidFromBool?): Unit
- (void)unloadMap:(NSString *)mapID callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler resultCallBack:(void (^)(bool))resultCallBack
public func unloadMap(_ mapID: String, _ callbackScheduler: CallbackScheduler, _ resultCallBack: ((Bool) -> Void)?) -> Void
public virtual void unloadMap(string mapID, CallbackScheduler callbackScheduler, Optional<Action<bool>> resultCallBack)

Parameter

Name Typ Beschreibung
mapID String
callbackScheduler CallbackScheduler
resultCallBack Optional<Action<>>

Rückgabewert

Typ Beschreibung
Void

setConfig

Legt die SparseSpatialMap-bezogene Konfiguration fest. Siehe SparseSpatialMapConfig.

void easyar_SparseSpatialMap_setConfig(easyar_SparseSpatialMap * This, easyar_SparseSpatialMapConfig * config)
void setConfig(std::shared_ptr<SparseSpatialMapConfig> config)
public void setConfig(@Nonnull SparseSpatialMapConfig config)
fun setConfig(config: SparseSpatialMapConfig): Unit
- (void)setConfig:(easyar_SparseSpatialMapConfig *)config
public func setConfig(_ config: SparseSpatialMapConfig) -> Void
public virtual void setConfig(SparseSpatialMapConfig config)

Parameter

Name Typ Beschreibung
config SparseSpatialMapConfig

Rückgabewert

Typ Beschreibung
Void

getConfig

Ruft die SparseSpatialMap-bezogene Konfiguration ab. Siehe SparseSpatialMapConfig.

void easyar_SparseSpatialMap_getConfig(easyar_SparseSpatialMap * This, easyar_SparseSpatialMapConfig * * Return)
std::shared_ptr<SparseSpatialMapConfig> getConfig()
public @Nonnull SparseSpatialMapConfig getConfig()
fun getConfig(): SparseSpatialMapConfig
- (easyar_SparseSpatialMapConfig *)getConfig
public func getConfig() -> SparseSpatialMapConfig
public virtual SparseSpatialMapConfig getConfig()

Rückgabewert

Typ Beschreibung
SparseSpatialMapConfig

startLocalization

Beginnt mit dem Lokalisierungsversuch in den geladenen Karten. Zuvor müssen die erforderlichen Konfigurationsparameter festgelegt werden. Siehe LocalizationMode.

bool easyar_SparseSpatialMap_startLocalization(easyar_SparseSpatialMap * This)
bool startLocalization()
public boolean startLocalization()
fun startLocalization(): Boolean
- (bool)startLocalization
public func startLocalization() -> Bool
public virtual bool startLocalization()

Rückgabewert

Typ Beschreibung
Boolean

stopLocalization

Stoppt den aktuellen Lokalisierungsvorgang.

void easyar_SparseSpatialMap_stopLocalization(easyar_SparseSpatialMap * This)
void stopLocalization()
public void stopLocalization()
fun stopLocalization(): Unit
- (void)stopLocalization
public func stopLocalization() -> Void
public virtual void stopLocalization()

Rückgabewert

Typ Beschreibung
Void

getSyncResult

Ruft das synchrone Ausgabeergebnis ab. Gibt null zurück, wenn SparseSpatialMap pausiert ist oder der asynchrone Ergebnis-Modus nicht über setResultAsyncMode auf false gesetzt wurde.

void easyar_SparseSpatialMap_getSyncResult(easyar_SparseSpatialMap * This, easyar_MotionInputData * motionInputData, easyar_OptionalOfSparseSpatialMapResult * Return)
std::optional<std::shared_ptr<SparseSpatialMapResult>> getSyncResult(std::shared_ptr<MotionInputData> motionInputData)
public @Nullable SparseSpatialMapResult getSyncResult(@Nonnull MotionInputData motionInputData)
fun getSyncResult(motionInputData: MotionInputData): SparseSpatialMapResult?
- (easyar_SparseSpatialMapResult *)getSyncResult:(easyar_MotionInputData *)motionInputData
public func getSyncResult(_ motionInputData: MotionInputData) -> SparseSpatialMapResult?
public virtual Optional<SparseSpatialMapResult> getSyncResult(MotionInputData motionInputData)

Parameter

Name Typ Beschreibung
motionInputData MotionInputData

Rückgabewert

Typ Beschreibung
Optional<SparseSpatialMapResult>