assimp-ffi 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5df26f6192dcf235b945984cf065ce55e166c67ab36347919847d802d9c9c043
4
- data.tar.gz: cb82f85404159973ab6d31d181b7595e9b2d67bba1ee3e03e809f92c86640526
3
+ metadata.gz: e29eac84b0143ea1a2d99d06f28fe44e26d822cca173572cc067088e1ec7c74c
4
+ data.tar.gz: 353ebafacb488b5614557559af6c5d752ca22b46fd28a51179b9be555b2ef528
5
5
  SHA512:
6
- metadata.gz: 07fd1e1b78d4229b92c2eeb0d58861111cf747422579380447930450512f1d0505503e8ffe5fa690c34b11e7f348243b721784f786331c607ec02751545c25b7
7
- data.tar.gz: 661ea340f42fd455565565adee1d73ff846274a6da4a3e042d18b4e168e137904e88f5606ac402cfa541a2364befcad8452c6d362b6e3e35d9f5e7d01294d52a
6
+ metadata.gz: 792c1266fbe056e30db9fcc38169e92da4df02bbd573fb4e51159f4082398edaab6e44f11e076186c6078b15dfd1ad7ee804c814f93fe02ff0bc1968a5538678
7
+ data.tar.gz: 00550ed5077d97bb8876fc3019f9e94dc4ede996ceeea40a1b5889afdbc66950540cf83604e4970fcdb6d5c88310b16faa12a836ad05c2e8a6df299c1173caed
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -10,6 +10,9 @@ module Assimp
10
10
  typedef :uint, :ai_uint
11
11
  end
12
12
 
13
+ typedef :int32, :ai_int32
14
+ typedef :uint32, :ai_uint32
15
+
13
16
  MATH_PI = 3.141592653589793238462643383279
14
17
  MATH_TWO_PI = MATH_PI * 2.0
15
18
  MATH_HALF_PI = MATH_PI * 0.5
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -35,28 +35,52 @@ module Assimp
35
35
  end
36
36
  end
37
37
 
38
- class String #< FFI::Struct
39
- extend StructAccessors
40
- MAXLEN = 1024
41
- layout :length, :size_t,
42
- :data, [:char, MAXLEN]
43
- struct_attr_reader :length
38
+ if version >= Version::new(5,0,0)
39
+ class String #< FFI::Struct
40
+ extend StructAccessors
41
+ MAXLEN = 1024
42
+ layout :length, :ai_uint32,
43
+ :data, [:char, MAXLEN]
44
+ struct_attr_reader :length
44
45
 
45
- def data
46
- (pointer + Assimp.find_type(:size_t).size).read_string(length)
47
- end
46
+ def data
47
+ (pointer + 4).read_string(length)
48
+ end
48
49
 
49
- def data=(str)
50
- sz = str.bytesize
51
- raise "String too long #{sz} > #{MAXLEN-1}!" if sz > MAXLEN-1
52
- self[:length] = sz
53
- (pointer + Assimp.find_type(:size_t).size).write_string(str+"\x00")
54
- end
50
+ def data=(str)
51
+ sz = str.bytesize
52
+ raise "String too long #{sz} > #{MAXLEN-1}!" if sz > MAXLEN-1
53
+ self[:length] = sz
54
+ (pointer + 4).write_string(str+"\x00")
55
+ end
55
56
 
56
- def to_s
57
- data
57
+ def to_s
58
+ data
59
+ end
58
60
  end
61
+ else
62
+ class String #< FFI::Struct
63
+ extend StructAccessors
64
+ MAXLEN = 1024
65
+ layout :length, :size_t,
66
+ :data, [:char, MAXLEN]
67
+ struct_attr_reader :length
59
68
 
69
+ def data
70
+ (pointer + Assimp.find_type(:size_t).size).read_string(length)
71
+ end
72
+
73
+ def data=(str)
74
+ sz = str.bytesize
75
+ raise "String too long #{sz} > #{MAXLEN-1}!" if sz > MAXLEN-1
76
+ self[:length] = sz
77
+ (pointer + Assimp.find_type(:size_t).size).write_string(str+"\x00")
78
+ end
79
+
80
+ def to_s
81
+ data
82
+ end
83
+ end
60
84
  end
61
85
 
62
86
  Return = enum( :return, [ :SUCCESS, :FAILURE, -1, :OUTOFMEMORY, -3 ] )
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assimp-ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice Videau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-10 00:00:00.000000000 Z
11
+ date: 2020-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.9.19
33
33
  description: FFI bindings of Assimp (Open Asset Import Library bindings) for version
34
34
  4.1.0 onward
35
- email: brice.videau@imag.fr
35
+ email: brice.videau@gmail.com
36
36
  executables: []
37
37
  extensions: []
38
38
  extra_rdoc_files: []
@@ -83,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  requirements: []
86
- rubyforge_project:
87
- rubygems_version: 2.7.6
86
+ rubygems_version: 3.1.2
88
87
  signing_key:
89
88
  specification_version: 4
90
89
  summary: Open Asset Import Library bindings