KudanAR - Android  1.6.0
ARViewPort Class Reference

Public Member Functions

 ARViewPort ()
 
 ARViewPort (int offsetX, int offsetY, int width, int height)
 
void setCamera (ARCamera camera)
 
int getOffsetX ()
 
int getOffsetY ()
 
int getWidth ()
 
int getHeight ()
 
void setViewportParms (int offsetX, int offsetY, int width, int height)
 
ARCamera getCamera ()
 
void setZOrder (int zOrder)
 
int getZOrder ()
 

Detailed Description

ARViewPort represents a viewport into the scene. It can be used for cropping the rendered image or for zoom.

Constructor & Destructor Documentation

◆ ARViewPort() [1/2]

ARViewPort.ARViewPort ( )

Initialises the ARViewPort.

◆ ARViewPort() [2/2]

ARViewPort.ARViewPort ( int  offsetX,
int  offsetY,
int  width,
int  height 
)

Initialises an instance of an ARViewPort with the given X and Y offset values and the given height and width values.

Parameters
offsetXBottom left x coordinate.
offsetYBottom left y coordinate.
heightViewport height.
widthViewport width.

Member Function Documentation

◆ getCamera()

ARCamera ARViewPort.getCamera ( )

Returns the ARViewPorts ARCamera.

Returns
ARCamera

◆ getHeight()

int ARViewPort.getHeight ( )

Returns the height of the viewport, in pixels, including any that extend beyond edge of the screen.

Returns
The height of the viewport in pixels.

◆ getOffsetX()

int ARViewPort.getOffsetX ( )

Returns the offset of the viewport in the X direction. This can be negative to crop horizontally.

Returns
The offset of the viewport in the X direction.

◆ getOffsetY()

int ARViewPort.getOffsetY ( )

Returns the offset of the viewport in the Y direction. This can be negative to crop vertically.

Returns
The offset of the viewport in the Y direction.

◆ getWidth()

int ARViewPort.getWidth ( )

Returns the width of the viewport, in pixels, including any that extend beyond edge of the screen.

Returns
The width of the viewport.

◆ getZOrder()

int ARViewPort.getZOrder ( )

Gets the value determining the order when there are multiple viewports added to a render target. Lower values get rendered first. Negative integers are OK.

Returns
The order of this viewport.

◆ setCamera()

void ARViewPort.setCamera ( ARCamera  camera)

Sets the ARViewPort's ARCamera. This acts as the root of the viewport's scene graph.

Parameters
cameraARCamera to use

◆ setViewportParms()

void ARViewPort.setViewportParms ( int  offsetX,
int  offsetY,
int  width,
int  height 
)

Sets ARViewport's parameters.

Parameters
offsetXBottom left x coordinate.
offsetYBottom left y coordinate.
heightViewport height.
widthViewport width.

◆ setZOrder()

void ARViewPort.setZOrder ( int  zOrder)

When there are multiple viewports added to a render target, this value determines the order. Lower values get rendered first. Negative integers are OK.

Parameters
zOrder

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