Class: Assimp::MetadataEntry
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Assimp::MetadataEntry
- Extended by:
- StructAccessors
- Defined in:
- lib/assimp/metadata.rb
Instance Method Summary collapse
Methods included from StructAccessors
extended, has_ref?, struct_array_attr_accessor, struct_array_attr_checker, struct_array_attr_reader, struct_array_attr_writer, struct_attr_accessor, struct_attr_reader, struct_attr_writer, struct_ref_array_attr_accessor, struct_ref_array_attr_reader, struct_ref_array_attr_writer
Instance Method Details
#data ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/assimp/metadata.rb', line 19 def data d = self[:data] case type when :BOOL d.read_uint != 0 when :INT32 d.read_int when :UINT64 d.read(find_type(:uint64)) when :FLOAT d.read_float when :DOUBLE d.read_double when :AISTRING s = d.read_uint self[:data].get_string(4, s) when :AIVECTOR3D Vector3D::new(d) else raise "Unknown MetadataType : #{type}!" end end |