Class: RuPov::Objects::FinitePatchPrimitives::Disc

Inherits:
Base
  • Object
show all
Defined in:
lib/rupov.rb

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#<<, #to_s

Constructor Details

#initialize(centre, normal, radius, holeRadius = 0.0) {|_self| ... } ⇒ Disc

Returns a new instance of Disc.

Yields:

  • (_self)

Yield Parameters:



191
192
193
194
195
196
197
# File 'lib/rupov.rb', line 191

def initialize( centre, normal, radius, holeRadius=0.0 )
    super( 'disc' )
    multivalue = [centre,normal,radius]
    multivalue << holeRadius if holeRadius != 0.0
    self << Methods::MultiValue.new( multivalue )
    yield(self) if block_given? and self.class == Disc
end