Class: RuPov::Objects::FiniteSolidPrimitives::Cone

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(leftCentre, leftRadius, rightCentre, rightRadius, open = false) {|_self| ... } ⇒ Cone

Returns a new instance of Cone.

Yields:

  • (_self)

Yield Parameters:



57
58
59
60
61
62
63
# File 'lib/rupov.rb', line 57

def initialize( leftCentre, leftRadius, rightCentre, rightRadius, open = false )
    super( 'cone' )
    self << Methods::VectorRadius.new( leftCentre, leftRadius)
    self << Methods::VectorRadius.new( rightCentre, rightRadius)
    self << "open" if open
    yield(self) if block_given? and self.class == Cone
end