Class: RuPov::Objects::FiniteSolidPrimitives::Sphere

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, radius) {|_self| ... } ⇒ Sphere

Returns a new instance of Sphere.

Yields:

  • (_self)

Yield Parameters:



115
116
117
118
119
# File 'lib/rupov.rb', line 115

def initialize( centre, radius )
    super( 'sphere' )
    self << Methods::VectorRadius.new( centre, radius)
    yield(self) if block_given? and self.class == Sphere
end