KudanAR - Android  1.6.0
ARActivity Class Reference

Inherits Activity.

Public Member Functions

int getRotation ()
 
void setup ()
 
ARView getARView ()
 
boolean hasCameraPermission ()
 

Static Public Member Functions

static Context getContext ()
 

Protected Member Functions

void onCreate (Bundle savedInstanceState)
 

Detailed Description

The ARActivity class is an extension of the Activity class, used for displaying the camera feed and AR content. Make sure any activities in your project used to display AR content are extensions of ARActivity.

Member Function Documentation

◆ getARView()

ARView ARActivity.getARView ( )

Returns the ARView associated with this ARActivity.

Returns
This activity's ARView.

◆ getContext()

static Context ARActivity.getContext ( )
static

Returns the activity's current context.

Returns
The Context of this Activity.

◆ getRotation()

int ARActivity.getRotation ( )

Returns the current orientation of the default display. This rotation is relative to its "natural orientation". On Android phones, this is usually portrait. On Android tablets, this is usually landscape left. A value of 0 means no rotation, the device is in its natural orientation (Portrait / Landscape left). A value of 1 means a 90 degree clockwise rotation (Landscape right / Portrait). A value of 2 means a 180 degree rotation (Portrait upside-down / Landscape right). A value of 3 means a 270 degree clockwise rotation, or 90 degree counterclockwise rotation (Landscape left / Portrait upside down).

Returns
An integer representing the current orientation of the display.

◆ hasCameraPermission()

boolean ARActivity.hasCameraPermission ( )

Returns whether camera permissions have been granted. These need to be granted in order to display AR content.

Returns
True if permission has been granted for this app, false if not.

◆ setup()

void ARActivity.setup ( )

Empty method called when an ARActivity is loaded. This must be overridden in any user-defined subclass. This method is mainly used to setup AR content when a view is loaded. It runs on the render thread so can be used to setup graphics content.


The documentation for this class was generated from the following file: