rmath3d 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 8ba56d50a0d57ad2687e2d3fb34278961e0524e5
4
- data.tar.gz: d12e16143db7abb2ceb3018ebba52081b72631dd
3
+ metadata.gz: 9a700202c9e7eef16d28ce463264f47a59ba3faf
4
+ data.tar.gz: d49ce789c770777cf1e326d1e32c50c0d50d8b80
5
5
  SHA512:
6
- metadata.gz: 442b329ea744cafb2ed79b33e1443d604dce6770dbe2f2fb39cda1921a738a84f20ae4575ef837ff8a93d030d53285fb387e80b7d9a06323a9674ed8862703a0
7
- data.tar.gz: 801f92748ee33a253fbb0bf232ed1879d99ff6ee2fd76b34673fa7dadcd4a7d69e1166f094d917c04786b3ee06f7ed790d716ffe3a777642a6bc658369b48773
6
+ metadata.gz: 62d369ef680312199f91933deaea5f6aea82512ed7c075debd74bfa18fd027d2324dc878f29a77cf7f2fc8fa553510999479fbc5d3a98ad01cf64cbff169b1d5
7
+ data.tar.gz: 77bf3ebfe50445d49c5cfb6108b2e034a4bcbc414f2aa2ad2ed43c62a918d162697d453af602fb0033e445af1dbf13ba3d364a2261fced89b17e9efffe0cd3ca
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2013-09-21 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * README.txt: Updated tested environment and information about building native extension.
4
+ * README.md: Renamed from README.txt
5
+
1
6
  2013-09-16 vaiorabbit <http://twitter.com/vaiorabbit>
2
7
 
3
8
  * sample/opengl-bingings: Added sample using my opengl-bindings gem ( https://rubygems.org/gems/opengl-bindings ).
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ gemspec
2
+ gem "rake"
data/LICENSE.txt CHANGED
File without changes
data/README.md ADDED
@@ -0,0 +1,174 @@
1
+ <!-- -*- mode:markdown; coding:utf-8; -*- -->
2
+
3
+ # rmath3d : Ruby Math Module for 3D Applications #
4
+
5
+ rmath3d is a math module for 3D game programming and computer graphics.
6
+
7
+ * Last Update: Sep 21, 2013
8
+ * Since: Jul 20, 2008
9
+
10
+ ## Features ##
11
+
12
+ ### Supports frequently-used vector and matrix classes ###
13
+
14
+ * RMtx3 (3x3 matrix)
15
+ * RMtx4 (4x4 matrix)
16
+ * RQuat (Quaternion)
17
+ * RVec3 (3 element vector)
18
+ * RVec4 (4 element vector)
19
+
20
+ ### Two implementations that are interchangeable with each other ###
21
+
22
+ 1. rmath3d.{so|bundle} : Ruby extension library for faster execution.
23
+ 2. rmath3d_plain.rb : Ruby implemantation for debugging use.
24
+
25
+
26
+ ## Tested Environment ##
27
+
28
+ Notice: This library provides native extension. You must setup develop environment (or DevKit) before installation.
29
+
30
+ * Ruby
31
+ * ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
32
+ * ruby 2.0.0p247 (2013-06-27) [i386-mingw32] With Development Kit installed.
33
+ * I used: DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
34
+ * Unpack the archive -> "> ruby dk.rb init" -> edit config.yml (just add your ruby foldier) -> "> ruby dk.rb install"
35
+ * Ref.: http://blog.mattwynne.net/2010/10/12/installing-ruby-gems-with-native-extensions-on-windows/
36
+
37
+ ## Building rmath3d.{so|bundle} ##
38
+
39
+ Via RubyGems ( https://rubygems.org/gems/opengl-bindings ):
40
+
41
+ $ gem install opengl-bindings
42
+
43
+ ### From source package ###
44
+
45
+ $ rake install
46
+
47
+ ### For mkmf users ###
48
+
49
+ $ ruby extconf.rb
50
+ $ make
51
+
52
+ For Windows users, type commands below via the "Visual Studio 200{5|8}
53
+ Command Prompt". This process requires "cl.exe", "link.exe and
54
+ "mt.exe" to be exist in the program PATH:
55
+
56
+ X:\> ruby extconf.rb
57
+ X:\> nmake
58
+
59
+ You might encounter the "MSC version unmatch: _MSC_VER: XXXX is
60
+ expected." error at the time compiling "rmath3d.c". See the
61
+ instruction in the extconf.rb to avoid this error.
62
+
63
+
64
+ ### Embedding manifest file (For Windows users) ###
65
+
66
+ Make sure that your rmath3d.so has "rmath3d.so.manifest" embedded into itself.
67
+ Otherwise, while using rmath3d.so in your application, you might come
68
+ across an error dialog saying:
69
+
70
+ ---------------------------
71
+ Microsoft Visual C++ Runtime Library
72
+ ---------------------------
73
+ Runtime Error!
74
+
75
+ Program: d:\ruby\bin\ruby.exe
76
+
77
+ R6034
78
+ An application has made an attempt to load the C runtime library incorrectly.
79
+ Please contact the application's support team for more information.
80
+
81
+ ---------------------------
82
+ OK
83
+ ---------------------------
84
+
85
+ To ensure the file status, try checking if the string "manifest" can
86
+ be found in the file:
87
+
88
+ X:\> strings rmath3d.so | grep manifest
89
+
90
+ If you don't see any outputs, it's time to embed "rmath3d.so.manifest".
91
+
92
+ X:\> mt -manifest rmath3d.so.manifest -outputresource:rmath3d.so;2
93
+
94
+ or run the "embed_manifest.bat" instead. Then check again the status.
95
+
96
+ X:\> strings rmath3d.so | grep manifest
97
+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
98
+
99
+ X:\>
100
+
101
+ If you see some similar output like that, the manifest file
102
+ "rmath3d.so.manifest" is successfully embedded.
103
+
104
+
105
+ ## About rmath3d_plain.rb ##
106
+
107
+ rmath3d_plain.rb is a pure Ruby version of rmath3d.so: all the functionality of
108
+ rmath3d.so is implemented with plain Ruby code.
109
+ It is possible to trace the bugs caused by rmath3d.so by replacing the code
110
+
111
+ gem 'rmath3d'
112
+ require 'rmath3d/rmath3d'
113
+
114
+ with
115
+
116
+ gem 'rmath3d'
117
+ require 'rmath3d/rmath3d_plain'
118
+
119
+ rmath3d_plain.rb performs more strict type checking, that might be some burden
120
+ for its execution speed. So don't expect the performance efficiency
121
+ when you use rmath3d_plain.rb instead of rmath3d.so.
122
+
123
+
124
+ ## Notes ##
125
+
126
+ ### Collaboration with ruby-opengl ###
127
+
128
+ The instances of RMtx4 can be used directly as the arguments of the
129
+ ruby-opengl functions that accept matrices.
130
+
131
+ For example, this code snippet using RMath:
132
+
133
+ eye = RVec3.new(0.0, 15.0, 15.0)
134
+ at = RVec3.new(0.0, 0.0, 0.0)
135
+ up = RVec3.new(0.0, 1.0, 0.0)
136
+ mtxLookAt = RMtx4.new.lookAtRH( eye, at, up )
137
+ glMatrixMode( GL_PROJECTION )
138
+ glLoadMatrix( @mtxProj )
139
+
140
+ mtxProj = RMtx4.new.perspectiveFovRH( 30.0*Math::PI/180.0, WINDOW_WIDTH/WINDOW_HEIGHT, 0.1, 1000.0 )
141
+ glMatrixMode( GL_MODELVIEW )
142
+ glLoadMatrix( @mtxLookAt )
143
+
144
+ has the same transformation effect with the OpenGL fixed pipeline:
145
+
146
+ glMatrixMode( GL_PROJECTION )
147
+ gluPerspective( 30.0*Math::PI/180.0, WINDOW_WIDTH/WINDOW_HEIGHT, 0.1, 1000.0 )
148
+
149
+ glMatrixMode( GL_MODELVIEW )
150
+ gluLookAt( 0.0,15.0,15.0, 0.0,0.0,0.0, 0.0,1.0,0.0 )
151
+
152
+
153
+ ### Compatibility with matrix.rb ###
154
+
155
+ Currently, there is no combenient way to convert between matrix.rb's
156
+ +Matrix+ and +RMtx{3|4}".
157
+
158
+ (The matrix.rb is a standard Ruby library that provides N-dimensional
159
+ +Vector+ class and "N x M" +Matrix+ class.)
160
+
161
+
162
+
163
+ ## Information ##
164
+
165
+ * RubyGems
166
+ * https://rubygems.org/gems/opengl-bindings
167
+ * Github
168
+ * https://github.com/vaiorabbit/rmath3d
169
+
170
+
171
+ ## License ##
172
+
173
+ All source codes are available under the terms of the zlib/libpng license
174
+ (see LICENSE.txt).
File without changes
data/ext/rmath3d/RType.h CHANGED
File without changes
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmath3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-16 00:00:00.000000000 Z
11
+ date: 2013-09-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Provides vector3/4, matrix3x3/4x4 and quaternion in C extension library form (and plain Ruby form with the same interface for debugging use).
15
+ Notice: This library provides native extension. You must setup development environment (or DevKit) before installation.
15
16
  email:
16
17
  - vaiorabbit@gmail.com
17
18
  executables: []
@@ -45,8 +46,9 @@ files:
45
46
  - test/test_RVec4.rb
46
47
  - ChangeLog
47
48
  - LICENSE.txt
48
- - README.txt
49
+ - README.md
49
50
  - Rakefile
51
+ - Gemfile
50
52
  homepage: https://github.com/vaiorabbit/rmath3d
51
53
  licenses:
52
54
  - zlib/libpng
@@ -67,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
69
  version: '0'
68
70
  requirements: []
69
71
  rubyforge_project:
70
- rubygems_version: 2.0.5
72
+ rubygems_version: 2.1.4
71
73
  signing_key:
72
74
  specification_version: 4
73
75
  summary: Ruby Math Module for 3D Applications
data/README.txt DELETED
@@ -1,154 +0,0 @@
1
- = rmath3d : Ruby Math Module for 3D Applications
2
-
3
- rmath3d is a math module for 3D game programming and computer graphics.
4
-
5
- Last Update: Sep 16, 2013
6
- Since: Jul 20, 2008
7
- by vaiorabbit
8
- == Features
9
-
10
- === Supports frequently-used vector and matrix classes
11
-
12
- * RMtx3 (3x3 matrix)
13
- * RMtx4 (4x4 matrix)
14
- * RQuat (Quaternion)
15
- * RVec3 (3 element vector)
16
- * RVec4 (4 element vector)
17
-
18
- === Two implementations that are interchangeable with each other
19
-
20
- 1. rmath3d.{so|bundle} : Ruby extension library for faster execution.
21
- 2. rmath3d_plain.rb : Ruby implemantation for debugging use.
22
-
23
-
24
- == Building rmath3d.{so|bundle}
25
-
26
- === From source package
27
-
28
- $ rake install
29
-
30
- === For mkmf users
31
-
32
- $ ruby extconf.rb
33
- $ make
34
-
35
- For Windows users, type commands below via the "Visual Studio 200{5|8}
36
- Command Prompt". This process requires "cl.exe", "link.exe and
37
- "mt.exe" to be exist in the program PATH:
38
-
39
- X:\> ruby extconf.rb
40
- X:\> nmake
41
-
42
- You might encounter the "MSC version unmatch: _MSC_VER: XXXX is
43
- expected." error at the time compiling "rmath3d.c". See the
44
- instruction in the extconf.rb to avoid this error.
45
-
46
-
47
- === Embedding manifest file (For Windows users)
48
-
49
- Make sure that your rmath3d.so has "rmath3d.so.manifest" embedded into itself.
50
- Otherwise, while using rmath3d.so in your application, you might come
51
- across an error dialog saying:
52
-
53
- ---------------------------
54
- Microsoft Visual C++ Runtime Library
55
- ---------------------------
56
- Runtime Error!
57
-
58
- Program: d:\ruby\bin\ruby.exe
59
-
60
- R6034
61
- An application has made an attempt to load the C runtime library incorrectly.
62
- Please contact the application's support team for more information.
63
-
64
- ---------------------------
65
- OK
66
- ---------------------------
67
-
68
- To ensure the file status, try checking if the string "manifest" can
69
- be found in the file:
70
-
71
- X:\> strings rmath3d.so | grep manifest
72
-
73
- If you don't see any outputs, it's time to embed "rmath3d.so.manifest".
74
-
75
- X:\> mt -manifest rmath3d.so.manifest -outputresource:rmath3d.so;2
76
-
77
- or run the "embed_manifest.bat" instead. Then check again the status.
78
-
79
- X:\> strings rmath3d.so | grep manifest
80
- <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
81
-
82
- X:\>
83
-
84
- If you see some similar output like that, the manifest file
85
- "rmath3d.so.manifest" is successfully embedded.
86
-
87
-
88
- == About rmath3d_plain.rb
89
-
90
- rmath3d_plain.rb is a pure Ruby version of rmath3d.so: all the functionality of
91
- rmath3d.so is implemented with plain Ruby code.
92
- It is possible to trace the bugs caused by rmath3d.so by replacing the code
93
-
94
- gem 'rmath3d'
95
- require 'rmath3d/rmath3d'
96
-
97
- with
98
-
99
- gem 'rmath3d'
100
- require 'rmath3d/rmath3d_plain'
101
-
102
- rmath3d_plain.rb performs more strict type checking, that might be some burden
103
- for its execution speed. So don't expect the performance efficiency
104
- when you use rmath3d_plain.rb instead of rmath3d.so.
105
-
106
-
107
- == Notes
108
-
109
- === Collaboration with ruby-opengl
110
-
111
- The instances of RMtx4 can be used directly as the arguments of the
112
- ruby-opengl functions that accept matrices.
113
-
114
- For example, this code snippet using RMath:
115
-
116
- eye = RVec3.new(0.0, 15.0, 15.0)
117
- at = RVec3.new(0.0, 0.0, 0.0)
118
- up = RVec3.new(0.0, 1.0, 0.0)
119
- mtxLookAt = RMtx4.new.lookAtRH( eye, at, up )
120
- glMatrixMode( GL_PROJECTION )
121
- glLoadMatrix( @mtxProj )
122
-
123
- mtxProj = RMtx4.new.perspectiveFovRH( 30.0*Math::PI/180.0, WINDOW_WIDTH/WINDOW_HEIGHT, 0.1, 1000.0 )
124
- glMatrixMode( GL_MODELVIEW )
125
- glLoadMatrix( @mtxLookAt )
126
-
127
- has the same transformation effect with the OpenGL fixed pipeline:
128
-
129
- glMatrixMode( GL_PROJECTION )
130
- gluPerspective( 30.0*Math::PI/180.0, WINDOW_WIDTH/WINDOW_HEIGHT, 0.1, 1000.0 )
131
-
132
- glMatrixMode( GL_MODELVIEW )
133
- gluLookAt( 0.0,15.0,15.0, 0.0,0.0,0.0, 0.0,1.0,0.0 )
134
-
135
-
136
- === Compatibility with matrix.rb
137
-
138
- Currently, there is no combenient way to convert between matrix.rb's
139
- +Matrix+ and +RMtx{3|4}".
140
-
141
- (The matrix.rb is a standard Ruby library that provides N-dimensional
142
- +Vector+ class and "N x M" +Matrix+ class.)
143
-
144
-
145
-
146
- == Credits
147
-
148
- * vaiorabbit <http://twitter.com/vaiorabbit>
149
-
150
-
151
- == License
152
-
153
- All source codes are available under the terms of the zlib/libpng license
154
- (see LICENSE.txt).