new()
bounds:Bounds
commands:InstanceBuffer
inlineaddInstanceBounds(absPos:Matrix):Void
initBounds():Void
setMesh(m:MeshPrimitive):Void
buffer:Buffer
The primitive vertex buffer, holding its vertexes data.
@:value(-1)forcedLod:Int = -1
Allow user to force a specific lod index. If set to -1, forced lod will be ignored.
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.
incref
decref
alloc(engine:Engine):Void
Allocate the primitive on GPU. Used for internal usage.
getCollider():Collider
Return a local collider for the primitive
getMaterialIndexes(material:Int):{start:Int, count:Int}
Returns the number and offset of indexes for the specified material
lodCount():Int
Return the LOD count.
screenRatioToLod(screenRatio:Float):Int
selectMaterial(material:Int, lod:Int):Void
Select the specified sub material before drawin. Used for internal usage.
toString():Null<String>
Return the primitive type.
triCount():Int
The number of triangles the primitive has.
vertexCount():Int
The number of vertexes the primitive has.