Package | laya.d3.graphics |
Class | public class VertexBuffer3D |
Inheritance | VertexBuffer3D Buffer laya.resource.Resource |
VertexBuffer3D
类用于创建顶点缓冲。
Property | Defined By | ||
---|---|---|---|
_bindActive : Object [static] | Buffer | ||
_bindVertexBuffer : * [static] | Buffer | ||
bufferUsage : int [read-only] | Buffer | ||
_byteLength : int = 0 | Buffer | ||
canRead : Boolean [read-only]
获取是否可读。
| VertexBuffer3D | ||
create : Function [static]
创建VertexBuffer3D。
| VertexBuffer3D | ||
_enableAtributes : Array [static] | Buffer | ||
vertexCount : int [read-only]
获取顶点个数。
| VertexBuffer3D | ||
vertexDeclaration : VertexDeclaration [read-only]
获取顶点结构声明。
| VertexBuffer3D |
Method | Defined By | ||
---|---|---|---|
VertexBuffer3D(vertexDeclaration:VertexDeclaration, vertexCount:int, bufferUsage:int, canRead:Boolean = false)
创建一个 VertexBuffer3D,不建议开发者使用并用VertexBuffer3D.create()代替 实例。
| VertexBuffer3D | ||
_bind():void | Buffer | ||
bindWithIndexBuffer(ib:IndexBuffer3D):void
和索引缓冲一起绑定。
| VertexBuffer3D | ||
getData():Float32Array
获取顶点数据。
| VertexBuffer3D | ||
setData(data:Float32Array, bufferOffset:int = 0, dataStartIndex:int = 0, dataCount:uint = 4294967295):void
设置数据。
| VertexBuffer3D |
Method | Defined By | ||
---|---|---|---|
detoryResource():void [override] 销毁顶点缓冲。 | VertexBuffer3D | ||
recreateResource():void [override] | Buffer |
canRead | property |
canRead:Boolean
[read-only] 获取是否可读。
public function get canRead():Boolean
create | property |
public static var create:Function
创建VertexBuffer3D。
vertexCount | property |
vertexCount:int
[read-only] 获取顶点个数。
public function get vertexCount():int
vertexDeclaration | property |
vertexDeclaration:VertexDeclaration
[read-only] 获取顶点结构声明。
public function get vertexDeclaration():VertexDeclaration
VertexBuffer3D | () | Constructor |
public function VertexBuffer3D(vertexDeclaration:VertexDeclaration, vertexCount:int, bufferUsage:int, canRead:Boolean = false)
创建一个 VertexBuffer3D,不建议开发者使用并用VertexBuffer3D.create()代替
实例。
vertexDeclaration:VertexDeclaration — 顶点声明。
| |
vertexCount:int — 顶点个数。
| |
bufferUsage:int — VertexBuffer3D用途类型。
| |
canRead:Boolean (default = false ) — 是否可读。
|
bindWithIndexBuffer | () | method |
public function bindWithIndexBuffer(ib:IndexBuffer3D):void
和索引缓冲一起绑定。
Parameters
ib:IndexBuffer3D — 索引缓冲。
|
detoryResource | () | method |
override protected function detoryResource():void
销毁顶点缓冲。
getData | () | method |
public function getData():Float32Array
获取顶点数据。
ReturnsFloat32Array — 顶点数据。
|
setData | () | method |
public function setData(data:Float32Array, bufferOffset:int = 0, dataStartIndex:int = 0, dataCount:uint = 4294967295):void
设置数据。
Parameters
data:Float32Array — 顶点数据。
| |
bufferOffset:int (default = 0 ) — 顶点缓冲中的偏移。
| |
dataStartIndex:int (default = 0 ) — 顶点数据的偏移。
| |
dataCount:uint (default = 4294967295 ) — 顶点数据的数量。
|