KudanAR - Android
ARView Class Reference
+ Inheritance diagram for ARView:
+ Collaboration diagram for ARView:

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 ( Context  context)
inline

Initialises ARView.

Parameters
contextApplications context.
ARView ( Context  context,
AttributeSet  attrs 
)
inline

Initialise ARView with an application context and an attribute set.

Parameters
context
attrs

Member Function Documentation

ARActivity getCameraActivity ( )
inline

Returns the ARActivity that contains this view.

Example of use:

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

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

Returns
ARViewPort The camera view port.
ARViewPort getContentViewPort ( )
inline

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.
ARTextureOES getmCameraTexture ( )
inline

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.
void render ( )
inline

Requests the renderer renders a frame.

Bitmap screenshot ( )
inline

Takes a screenshot of the current ARView.

Returns
Bitmap A Bitmap of the current ARView.
void setCameraActivity ( ARActivity  cameraActivity)
inline

Sets the ARActivity that contains this view.

Example of use:

arView.setCameraActivity(this);
Parameters
cameraActivityThe ARActivity that will contain this ARView.
void setCameraTexture ( ARTextureOES  cameraTexture)
inline

Sets the camera texture associated with this ARView.

Example of use:

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

Creates new ARCameraStream and its ARViewPorts.


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