class Mittsu::BufferGeometry

Defined in:

mittsu/core/buffer_geometry.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def [](key) #

[View source]
def []=(key, value) #

[View source]
def add_draw_call(start, count, index_offset = 0) #

[View source]
def apply_matrix(matrix) #

[View source]
def attributes : Hash(Symbol, Mittsu::BufferAttribute) #

[View source]
def bounding_box : Mittsu::Box3? #

[View source]
def bounding_sphere : Mittsu::Sphere? #

[View source]
def center #

[View source]
def clone #

[View source]
def compute_bounding_box #

[View source]
def compute_bounding_sphere #

[View source]
def compute_offsets(size = 65535) #

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.


[View source]
def compute_tangents #

[View source]
def compute_vertex_normals #

[View source]
def dispose #

[View source]
def draw_calls : Array(Mittsu::BufferGeometry::DrawCall) #

[View source]
def from_geometry(geometry, settings = {} of Symbol => Bool) #

[View source]
def id : Int32 #

[View source]
def keys #

[View source]
def merge(geometry, offset = 0) #

[View source]
def name : String #

[View source]
def normalize_normals #

[View source]
def reorder_buffers(index_buffer, index_map, vertex_count) #

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).


[View source]
def set_array2(array, i2, a, b = a, c = b) #

[View source]
def set_array3(array, i3, a, b = a, c = b) #

[View source]
def to_json #

[View source]
def type : String #

[View source]
def uuid : UUID #

[View source]