Class: VORuby::STC::V1_30::PosVector3CoordinateType
- Inherits:
-
Vector3CoordinateType
- Object
- STCBaseType
- CoordinateType
- Vector3CoordinateType
- VORuby::STC::V1_30::PosVector3CoordinateType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
Position 3-D coordinate type. Single CError3, CResolution3, CSize3, CPixSize3 elements indicate definite values; pairs indicate ranges.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#coord_system_id ⇒ Object
Returns the value of attribute coord_system_id.
-
#unit ⇒ Object
Returns the value of attribute unit.
Attributes inherited from Vector3CoordinateType
#error, #name1, #name2, #name3, #pix_size, #resolution, #size, #value
Attributes inherited from CoordinateType
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Vector3CoordinateType
Methods inherited from CoordinateType
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
Constructor Details
This class inherits a constructor from VORuby::STC::V1_30::STCBaseType
Instance Attribute Details
#coord_system_id ⇒ Object
Returns the value of attribute coord_system_id.
2688 2689 2690 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2688 def coord_system_id @coord_system_id end |
#unit ⇒ Object
Returns the value of attribute unit.
2688 2689 2690 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2688 def unit @unit end |
Class Method Details
.from_xml(xml) ⇒ Object
2733 2734 2735 2736 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2733 def self.from_xml(xml) root = element_from(xml) self.new(pos_vector3_coordinate_from_xml(root)) end |
.pos_vector3_coordinate_from_xml(root) ⇒ Object
2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2721 def self.pos_vector3_coordinate_from_xml(root) = Vector3CoordinateType.vector3_coordinate_from_xml(root) cis = root.attributes.get_attribute_ns(obj_ns.uri, 'coord_system_id') [:coord_system_id] = IdRef.new(cis.value) if cis unit = root.attributes.get_attribute_ns(obj_ns.uri, 'unit') [:unit] = PosUnitType.new(unit.value) if unit end |
Instance Method Details
#==(c) ⇒ Object
2706 2707 2708 2709 2710 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2706 def ==(c) super(c) and self.coord_system_id == c.coord_system_id and self.unit == c.unit end |
#to_xml(name = nil) ⇒ Object
2712 2713 2714 2715 2716 2717 2718 2719 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2712 def to_xml(name=nil) el = super(name) el.attributes["#{obj_ns.prefix}:coord_system_id"] = self.coord_system_id.to_s if self.coord_system_id el.attributes["#{obj_ns.prefix}:unit"] = self.unit.to_s if self.unit el end |