Constructor

new(stride:Int)

Variables

@:value(new h3d.col.Bounds())bounds:Bounds = new h3d.col.Bounds()

@:value(0)minISize:Int = 0

Minimum number of elements in index index buffer

@:value(0)minVSize:Int = 0

Minimum number of elements in vertex buffer

Methods

flush():Void

getBuffer(vertices:Int):FloatBuffer

Inherited Variables

Defined by Primitive

buffer:Buffer

The primitive vertex buffer, holding its vertexes data.

indexes:Indexes

The primitive indexes buffer, holding its triangles indices.

@:value(0)read onlyrefCount:Int = 0

Current amount of references to this Primitive.
Use incref and decref methods to affect this value. If it reaches 0, it will be atuomatically disposed.

Inherited Methods

Defined by Primitive

alloc(engine:Engine):Void

Allocate the primitive on GPU. Used for internal usage.

decref():Void

Decrease reference count of the Primitive.
If recount reaches zero, Primitive is automatically disposed when last referencing mesh is removed from scene.

getCollider():Collider

Return a local collider for the primitive

incref():Void

Increase reference count of the Primitive.

selectMaterial(material:Int):Void

Select the specified sub material before drawin. Used for internal usage.

toString():Null<String>

Return the primitive type.

vertexCount():Int

The number of vertexes the primitive has.