KudanAR - Android  1.6.0
ARView Class Reference

Inherits GLSurfaceView.

Public Member Functions

void setupNewCamera ()
 
 ARView (Context context)
 
 ARView (Context context, AttributeSet attrs)
 
void onSizeChanged (int w, int h, int ow, int oh)
 
void onConfigurationChanged (Configuration config)
 
void onResume ()
 
void onPause ()
 
ARViewPort getCameraViewPort ()
 
ARViewPort getContentViewPort ()
 
void render ()
 
Bitmap screenshot ()
 
void setCameraTexture (ARTextureOES cameraTexture)
 
ARTextureOES getmCameraTexture ()
 
ARActivity getCameraActivity ()
 
void setCameraActivity (ARActivity cameraActivity)
 

Detailed Description

An ARView encapsulates AR activities. It is a custom subclass of UIView that specifically handles the rendering of AR content and any interaction with it. It uses an assocaited render target to draw more complex content that an ordinary UIView is not capable of displaying.

Constructor & Destructor Documentation

◆ ARView() [1/2]

ARView.ARView ( Context  context)

Initialises ARView.

Parameters
contextApplications context.

◆ ARView() [2/2]

ARView.ARView ( Context  context,
AttributeSet  attrs 
)

Initialise ARView with an application context and an attribute set.

Parameters
context
attrs

Member Function Documentation

◆ getCameraActivity()

ARActivity ARView.getCameraActivity ( )

Returns the ARActivity that contains this view.

Example of use:

ARActivity activity = arView.getCameraActivity();
Returns
The ARActivity containing this ARView.

◆ getCameraViewPort()

ARViewPort ARView.getCameraViewPort ( )

The viewport responsible for displaying the camera feed. This has an orthographic projection.

Returns
ARViewPort The camera view port.

◆ getContentViewPort()

ARViewPort ARView.getContentViewPort ( )

The viewport responsible for displaying any AR content, such as images, videos or 3D models, on top of the camera feed. This has a perspective projection.

Returns
ARViewPort The content view port.

◆ getmCameraTexture()

ARTextureOES ARView.getmCameraTexture ( )

Returns the camera texture associated with this ARView.

Example of use:

ARTextureOES cameraTexture = arView.getmCameraTexture();
Returns
The ARTextureOES used as the camera texture for this ARView.

◆ render()

void ARView.render ( )

Requests the renderer renders a frame.

◆ screenshot()

Bitmap ARView.screenshot ( )

Takes a screenshot of the current ARView.

Returns
Bitmap A Bitmap of the current ARView.

◆ setCameraActivity()

void ARView.setCameraActivity ( ARActivity  cameraActivity)

Sets the ARActivity that contains this view.

Example of use:

arView.setCameraActivity(this);
Parameters
cameraActivityThe ARActivity that will contain this ARView.

◆ setCameraTexture()

void ARView.setCameraTexture ( ARTextureOES  cameraTexture)

Sets the camera texture associated with this ARView.

Example of use:

arView.setCameraTexture(cameraTexture);
Parameters
cameraTextureThe texture to assign to this ARView.

◆ setupNewCamera()

void ARView.setupNewCamera ( )

Creates new ARCameraStream and its ARViewPorts.


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