Sha256: df123da24cdfbbbfea71271e00e549b031247d2ed55922b87337007861778b3a
Contents?: true
Size: 619 Bytes
Versions: 7
Compression:
Stored size: 619 Bytes
Contents
require 'mittsu/core' require 'mittsu/math' require 'mittsu/extras/geometries/polyhedron_geometry' module Mittsu class OctahedronGeometry < PolyhedronGeometry def initialize(radius = 1.0, detail = 0) vertices = [ 1, 0, 0, - 1, 0, 0, 0, 1, 0, 0,- 1, 0, 0, 0, 1, 0, 0,- 1 ] indices = [ 0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2 ] super(vertices, indices, radius, detail) @type = 'OctahedronGeometry' @parameters = { radius: radius, detail: detail } end end end
Version data entries
7 entries across 7 versions & 1 rubygems