Augmented Reality (AR) is an enhanced version of reality where live views of physical real-world environments are augmented with superimposed computer-generated images over a user's view of the real-world, thus enhancing the current perception of reality.
Show a 3D model of some object and how it would fit to a place (augment the given reality).
To cover this scenario, the following API is available in GeneXus:
Type |
Boolean |
Description |
Indicates if the device supports the 3D models |
Description |
Displays the 3D Model |
Parameters |
3D object: URL domain |
Returns |
None |
The file URL can be a local URL (i.e. offline applications), or a remote (http/https) URL. When using remote URLs, the content is downloaded before displaying it.
iOS |
USDZ |
Android |
3D assets files (glTF), Sceneform binary assets (SFB) |
These file formats group all the information needed to represent a 3D model. There are several sites with models available to download, for example, AR Quick Look Gallery or https://poly.google.com/
Event '3D'
&URL3D = !"https://developer.apple.com/arkit/gallery/models/wateringcan/wateringcan.usdz"
if ARPreview.IsAvailable // Check if device supports 3D models
ARPreview.PreviewObject(&URL3D) // Display the 3D model of the URL
else
msg("Your device doesn't support Augmented Reality")
endif
Endevent

This property is available since GeneXus 16 upgrade 9.