Google cardBoard Android API (十四):ViewPort

20 篇文章 0 订阅
18 篇文章 0 订阅

Viewport

public class  Viewport

Defines a viewport rectangle.

Fields

public int height    
public int width
   
public int x  
public int y  

Public Constructors

Public Methods

boolean
equals(Object obj)
void
getAsArray(int[] array, int offset)
int
void
void
void
setViewport(int x, int y, int width, int height)
String

Inherited Methods

Fields

public int height

public int width

public int x

public int y

Public Constructors

public Viewport ()

Public Methods

public boolean equals (Object obj)

public void getAsArray (int[] array, int offset)

Stores the viewport parameters into an int array.

Parameters
array Array to store values in.
offset Offset into the array to start writing values in.
Throws
IllegalArgumentException If there is not enough space to write the result.
public int hashCode ()

public void setGLScissor ()

Sets the current OpenGL scissor rect based on the current viewport settings.

public void setGLViewport ()

Sets the current OpenGL viewport based on the current viewport settings.

public void setViewport (int x, int y, int width, int height)

Sets a new viewport based on the provided coordinates and dimensions.

Parameters
x Horizontal pixel coordinate of the bottom-left corner of the viewport.
y Vertical pixel coordinate of the bottom-left corner of the viewport.
width Width of the viewport in pixels.
height Height of the viewport in pixels.
public String toString ()

Returns a string containing a concise, human-readable description of this object.

Returns
  • A printable representation of this object.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值