class Mittsu::BufferGeometry
- Mittsu::BufferGeometry
- Reference
- Object
Defined in:
mittsu/core/buffer_geometry.crConstructors
Instance Method Summary
- #[](key)
- #[]=(key, value)
- #add_draw_call(start, count, index_offset = 0)
- #apply_matrix(matrix)
- #attributes : Hash(Symbol, Mittsu::BufferAttribute)
- #bounding_box : Mittsu::Box3?
- #bounding_sphere : Mittsu::Sphere?
- #center
- #clone
- #compute_bounding_box
- #compute_bounding_sphere
-
#compute_offsets(size = 65535)
Compute the draw offset for large models by chunking the index buffer into chunks of 65k addressable vertices.
- #compute_tangents
- #compute_vertex_normals
- #dispose
- #draw_calls : Array(Mittsu::BufferGeometry::DrawCall)
- #from_geometry(geometry, settings = {} of Symbol => Bool)
- #id : Int32
- #keys
- #merge(geometry, offset = 0)
- #name : String
- #normalize_normals
-
#reorder_buffers(index_buffer, index_map, vertex_count)
reoderBuffers: Reorder attributes based on a new indexBuffer and indexMap.
- #set_array2(array, i2, a, b = a, c = b)
- #set_array3(array, i3, a, b = a, c = b)
- #to_json
- #type : String
- #uuid : UUID
Constructor Detail
Instance Method Detail
Compute the draw offset for large models by chunking the index buffer into chunks of 65k addressable vertices. This method will effectively rewrite the index buffer and remap all attributes to match the new indices.
WARNING This method will also expand the vertex count to prevent sprawled triangles across draw offsets. size - Defaults to 65535, but allows for larger or smaller chunks.
reoderBuffers: Reorder attributes based on a new indexBuffer and indexMap. indexBuffer - Uint16Array of the new ordered indices. indexMap - Int32Array where the position is the new vertex ID and the value the old vertex ID for each vertex. vertexCount - Amount of total vertices considered in this reordering (in case you want to grow the vertice stack).