Working with the Code

Objects

Leia currently provides two main objects in the LeiaNativeSDK. These are the following:

  • LeiaCameraData

  • LeiaCameraView

Together, they allow applications to make full use of the Leia display with minimal changes to their current applications.

There are also 2 Java objects to note:

  • LeiaDisplayManager

  • SimpleDisplayQuery

While these are not strictly part of the LeiaNativeSDK, these are the classes that allow you to get information about the Leia hardware from the Android system, and this information is needed by the LeiaNativeSDK. Usage of these objects are discussed at the end of this section.

LeiaCameraData

The LeiaCameraData struct is a storage variable that the rest of the Native SDK can use to better understand the application. It stores values relevant to the perspective matrices which will be generated for your application later. By keeping this data together, it allows the LeiaCameraView struct to stay small, enabling it to scale better based on the necessary number of cameras and removing duplicate data.

LeiaCameraView

An important part of the LeiaNativeSDK is to provide perspective matrice, simplifying the work behind creating 3D effects. Each LeiaCameraView struct contains a perspective matrix. Your application will use a 2D array of these and the LeiaNativeSDK library will be able to properly fill the matrices inside for you to use in your render loop. This matrix will replace the standard camera projection matrix your application would normally use.

Last updated

Copyright © 2023 Leia Inc. All Rights Reserved