Class: VORuby::STC::V1_30::VelVector3CoordinateType

Inherits:
PosVector3CoordinateType show all
Defined in:
lib/voruby/stc/1.30/stc.rb

Overview

Velocity 3-D coordinate type. Single CError3, CResolution3, CSize3, CPixSize3 elements indicate definite values; pairs indicate ranges.

Direct Known Subclasses

Velocity3D

Instance Attribute Summary collapse

Attributes inherited from PosVector3CoordinateType

#coord_system_id, #unit

Attributes inherited from Vector3CoordinateType

#error, #name1, #name2, #name3, #pix_size, #resolution, #size, #value

Attributes inherited from CoordinateType

#frame_id, #name

Attributes included from STCReference

#id, #idref, #ucd, #xlink_href, #xlink_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PosVector3CoordinateType

pos_vector3_coordinate_from_xml

Methods inherited from Vector3CoordinateType

vector3_coordinate_from_xml

Methods inherited from CoordinateType

coordinate_from_xml

Methods inherited from STCBaseType

#initialize, stc_base_from_xml

Methods included from STCReference

#stc_reference_eq, stc_reference_from_xml, #stc_reference_to_xml

Methods included from SerializableToXml

#element

Constructor Details

This class inherits a constructor from VORuby::STC::V1_30::STCBaseType

Instance Attribute Details

#vel_time_unitObject

Returns the value of attribute vel_time_unit.



2812
2813
2814
# File 'lib/voruby/stc/1.30/stc.rb', line 2812

def vel_time_unit
  @vel_time_unit
end

Class Method Details

.from_xml(xml) ⇒ Object



2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
# File 'lib/voruby/stc/1.30/stc.rb', line 2832

def self.from_xml(xml)
  root = element_from(xml)
  
  options = PosVector3CoordinateType.pos_vector3_coordinate_from_xml(root)
  
  vtu = root.attributes.get_attribute_ns(obj_ns.uri, 'vel_time_unit')
  options[:vel_time_unit] = VelTimeUnitType.new(vtu.value) if vtu
  
  self.new(options)
end

Instance Method Details

#==(c) ⇒ Object



2822
2823
2824
# File 'lib/voruby/stc/1.30/stc.rb', line 2822

def ==(c)
  super(c) and self.vel_time_unit == c.vel_time_unit
end

#to_xml(name = nil) ⇒ Object



2826
2827
2828
2829
2830
# File 'lib/voruby/stc/1.30/stc.rb', line 2826

def to_xml(name=nil)
  el = super(name)
  el.attributes["#{obj_ns.prefix}:vel_time_unit"] = self.vel_time_unit.to_s if self.vel_time_unit
  el
end