class Crysna::SiteWithPosition
Public Class Methods
new(name, global_vector, internal_vector)
click to toggle source
Calls superclass method
Crysna::Site::new
# File lib/crysna/sitewithposition.rb, line 11 def initialize(name, global_vector, internal_vector) #, polyhedron = nil) @internal_vector = internal_vector.to_v3di if internal_vector super(name, global_vector) end
Public Instance Methods
coordinates()
click to toggle source
Return coordinates as a sum of global and internal vectors.
# File lib/crysna/sitewithposition.rb, line 17 def coordinates #unless @internal_vector # raise NotSetInternalVectorError, "@internal_vector is not set." #end @global_vector + @internal_vector end