A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/vr/reference/android/com/google/vr/ndk/base/BufferViewport below:

BufferViewport | Google VR | Google for Developers

Skip to main content BufferViewport

Stay organized with collections Save and categorize content based on your preferences.

Encapsulated information about where to find the data in the client's target for a given region (e.g., the region for a particular eye).

This includes the viewport bounds for that region, the field of view, and the type of eye that has been rendered. This latter is used to calculate what kind of distortion to apply when the region is distorted to the screen.

A BufferViewport instance can be created via GvrApi, and populated via BufferViewportList.

Nested Classes Constants int BUFFER_INDEX_EXTERNAL_SURFACE Source buffer index that indicates that the viewport contents should be taken directly from its external surface rather than from one of the frame's buffers. int EXTERNAL_SURFACE_ID_NONE External surface ID that represents a nonexistent surface. Public Methods boolean int float getOpacity

()

Gets the opacity to apply to the specified viewport.

int getReprojection

()

Gets the type of reprojection to perform on the viewport.

int void void getSourceUv

(

RectF

sourceUvOut)

Gets the UV coordinates within the buffer where this viewport's pixels are located.

int void getTransform

(float[] transform)

Gets the matrix that transforms a quad with vertices (-1, -1, 0), (1, -1, 0), (-1, 1, 0), (1, 1, 0) representing the viewport contents to its desired position in eye space for the target eye.

void setExternalSurfaceId

(int id)

Sets the ID of the externally-managed Surface texture from which this viewport reads.

void setOpacity

(float opacity)

Sets the opacity to apply to the specified viewport.

void setReprojection

(int reprojection)

Sets the type of reprojection to perform on the viewport.

void setSourceBufferIndex

(int index)

Sets the index of the source buffer that contains the viewport's pixels.

void void setSourceLayer

(int layerIndex)

Sets the layer in a multiview buffer from which the viewport should sample.

void setSourceUv

(

RectF

sourceUv)

Sets the UV range within the buffer where this viewport's pixels are located.

void void setTransform

(float[] transform)

Sets the matrix that transforms a quad with vertices (-1, -1, 0), (1, -1, 0), (-1, 1, 0), (1, 1, 0) that represents the viewport contents to its correct position in eye space for the target eye.

void shutdown

()

Shuts down the BufferViewport instance, freeing associated resources.

Inherited Methods From class java.lang.Object boolean final Class<?>

getClass()

int

hashCode()

final void

notify()

final void

notifyAll()

String

toString()

final void

wait(long arg0, int arg1)

final void

wait(long arg0)

final void

wait()

Constants public static final int BUFFER_INDEX_EXTERNAL_SURFACE

Source buffer index that indicates that the viewport contents should be taken directly from its external surface rather than from one of the frame's buffers.

Constant Value: -1

public static final int EXTERNAL_SURFACE_ID_NONE

External surface ID that represents a nonexistent surface.

Constant Value: -1

Public Methods public boolean equals (Object other) public int getExternalSurfaceId () public float getOpacity ()

Gets the opacity to apply to the specified viewport.

Returns public int getReprojection ()

Gets the type of reprojection to perform on the viewport.

public int getSourceBufferIndex ()

Gets the index of the source buffer that contains the viewport's pixels.

public void getSourceFov (RectF sourceFovOut)

Gets the eye's field of view in degrees.

Parameters sourceFovOut The rect to populate with the eye's field-of-view. public void getSourceUv (RectF sourceUvOut)

Gets the UV coordinates within the buffer where this viewport's pixels are located.

Parameters sourceUvOut The rect to populate with the current source UV coordinates. public int getTargetEye () public void getTransform (float[] transform)

Gets the matrix that transforms a quad with vertices (-1, -1, 0), (1, -1, 0), (-1, 1, 0), (1, 1, 0) representing the viewport contents to its desired position in eye space for the target eye.

Parameters transform The array in which the transform matrix should be returned. public void setExternalSurfaceId (int id)

Sets the ID of the externally-managed Surface texture from which this viewport reads.

public void setOpacity (float opacity)

Sets the opacity to apply to the specified viewport.

Parameters opacity The opacity that will be applied to the viewport, it should be within [0,1]. public void setReprojection (int reprojection)

Sets the type of reprojection to perform on the viewport. Viewports that display world content should use full reprojection. Viewports that display head-locked UI should disable reprojection to avoid excessive judder. The default is to perform full reprojection.

public void setSourceBufferIndex (int index)

Sets the index of the source buffer that contains the viewport's pixels.

Parameters index The new buffer index. This is either an index into the array of BufferSpec objects passed when creating the swap chain or BUFFER_INDEX_EXTERNAL_SURFACE when an external surface is used as the image source. public void setSourceFov (RectF sourceFov)

Sets the eye's field of view in degrees.

Parameters sourceFov The new field of view. public void setSourceLayer (int layerIndex)

Sets the layer in a multiview buffer from which the viewport should sample.

Parameters layerIndex The layer in the array texture that distortion samples from. Must be non-negative. Defaults to 0. public void setSourceUv (RectF sourceUv)

Sets the UV range within the buffer where this viewport's pixels are located.

Parameters sourceUv The rect with new source UV coordinates. The coordinates must satisfy left <= right and bottom <= top. public void setTargetEye (int eye) public void setTransform (float[] transform)

Sets the matrix that transforms a quad with vertices (-1, -1, 0), (1, -1, 0), (-1, 1, 0), (1, 1, 0) that represents the viewport contents to its correct position in eye space for the target eye. This is a more general version of setSourceFov.

Parameters transform The new projection matrix to set. public void shutdown ()

Shuts down the BufferViewport instance, freeing associated resources.

Note: The caller is responsible for ensuring that this BufferViewport isn't used after shutdown.

All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-09 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["`BufferViewport` stores information about a region's data location in the client's target, including viewport bounds, field of view, and eye type for distortion calculations."],["It is created using `GvrApi` and populated via `BufferViewportList`, offering methods to manage eye type, reprojection, source buffer, field of view, UV coordinates, and transform matrix."],["Constants `BUFFER_INDEX_EXTERNAL_SURFACE` and `EXTERNAL_SURFACE_ID_NONE` represent specific buffer and surface states."],["Developers can manipulate viewport properties like opacity and reprojection type for optimal rendering."],["`shutdown()` releases resources, and the caller is responsible for not using the instance afterward."]]],["`BufferViewport` manages data location within a client's target for a specific region, like an eye. It stores viewport bounds, field of view, and eye type for distortion calculations. Key actions include getting and setting: source buffer index, external surface ID, opacity, reprojection type, source field of view (FOV), source UV coordinates, and target eye. It also allows setting the transformation matrix. The class has a shutdown method to free resources and constants are used for a buffer and surface index.\n"]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4