Sha256: da758f5e18c7841e62987ea2b86983ea01916b2fff795ee479d37a361e8c282b

Contents?: true

Size: 569 Bytes

Versions: 7

Compression:

Stored size: 569 Bytes

Contents

require 'mittsu/core'
require 'mittsu/math'
require 'mittsu/extras/geometries/polyhedron_geometry'

module Mittsu
  class TetrahedronGeometry < PolyhedronGeometry
    def initialize(radius = 1.0, detail = 0)
      vertices = [
        1,  1,  1,   - 1, - 1,  1,   - 1,  1, - 1,    1, - 1, - 1
      ]

      indices = [
         2,  1,  0,    0,  3,  2,    1,  3,  0,    2,  3,  1
      ]

      super(vertices, indices, radius, detail)

      @type = 'TetrahedronGeometry'

      @parameters = {
        radius: radius,
        detail: detail
      }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mittsu-0.5.0 lib/mittsu/extras/geometries/tetrahedron_geometry.rb
mittsu-0.4.1 lib/mittsu/extras/geometries/tetrahedron_geometry.rb
mittsu-0.4.0 lib/mittsu/extras/geometries/tetrahedron_geometry.rb
mittsu-0.3.3 lib/mittsu/extras/geometries/tetrahedron_geometry.rb
mittsu-0.3.2 lib/mittsu/extras/geometries/tetrahedron_geometry.rb
mittsu-0.3.1 lib/mittsu/extras/geometries/tetrahedron_geometry.rb
mittsu-0.3.0 lib/mittsu/extras/geometries/tetrahedron_geometry.rb