ruby-procedural 0.0.1-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -0
- data/README.md +29 -0
- data/Rakefile +65 -0
- data/bindings/procedural/interface/ProceduralBoxGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralCapsuleGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralConeGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralCylinderGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralExtruder.i +8 -0
- data/bindings/procedural/interface/ProceduralGeometryHelpers.i +15 -0
- data/bindings/procedural/interface/ProceduralHeader.i +8 -0
- data/bindings/procedural/interface/ProceduralIcoSphereGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralLathe.i +8 -0
- data/bindings/procedural/interface/ProceduralMeshGenerator.i +9 -0
- data/bindings/procedural/interface/ProceduralMultiShape.i +8 -0
- data/bindings/procedural/interface/ProceduralPath.i +8 -0
- data/bindings/procedural/interface/ProceduralPathGenerators.i +10 -0
- data/bindings/procedural/interface/ProceduralPlaneGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralPlatform.i +8 -0
- data/bindings/procedural/interface/ProceduralRoot.i +23 -0
- data/bindings/procedural/interface/ProceduralRoundedBoxGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralShape.i +8 -0
- data/bindings/procedural/interface/ProceduralShapeGenerators.i +10 -0
- data/bindings/procedural/interface/ProceduralSphereGenerator.i +11 -0
- data/bindings/procedural/interface/ProceduralSplines.i +8 -0
- data/bindings/procedural/interface/ProceduralStableHeaders.i +8 -0
- data/bindings/procedural/interface/ProceduralTorusGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralTorusKnotGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralTrack.i +8 -0
- data/bindings/procedural/interface/ProceduralTriangleBuffer.i +13 -0
- data/bindings/procedural/interface/ProceduralTriangulator.i +8 -0
- data/bindings/procedural/interface/ProceduralTubeGenerator.i +12 -0
- data/bindings/procedural/interface/ProceduralUtils.i +8 -0
- data/bindings/procedural/interface/Rakefile +22 -0
- data/bindings/procedural/interface/procedural.i +41 -0
- data/bindings/procedural/interface/procedural_wrap.cpp +36079 -0
- data/bindings/procedural/interface/procedural_wrap.h +19 -0
- data/bindings/procedural/interface/procedural_wrap.o +0 -0
- data/deps/include/OgreProcedural/Procedural.h +54 -0
- data/deps/include/OgreProcedural/ProceduralBoxGenerator.h +110 -0
- data/deps/include/OgreProcedural/ProceduralCapsuleGenerator.h +103 -0
- data/deps/include/OgreProcedural/ProceduralConeGenerator.h +90 -0
- data/deps/include/OgreProcedural/ProceduralCylinderGenerator.h +99 -0
- data/deps/include/OgreProcedural/ProceduralExtruder.h +131 -0
- data/deps/include/OgreProcedural/ProceduralGeometryHelpers.h +171 -0
- data/deps/include/OgreProcedural/ProceduralIcoSphereGenerator.h +76 -0
- data/deps/include/OgreProcedural/ProceduralLathe.h +129 -0
- data/deps/include/OgreProcedural/ProceduralMeshGenerator.h +286 -0
- data/deps/include/OgreProcedural/ProceduralMultiShape.h +126 -0
- data/deps/include/OgreProcedural/ProceduralPath.h +322 -0
- data/deps/include/OgreProcedural/ProceduralPathGenerators.h +281 -0
- data/deps/include/OgreProcedural/ProceduralPlaneGenerator.h +93 -0
- data/deps/include/OgreProcedural/ProceduralPlatform.h +54 -0
- data/deps/include/OgreProcedural/ProceduralRoot.h +65 -0
- data/deps/include/OgreProcedural/ProceduralRoundedBoxGenerator.h +118 -0
- data/deps/include/OgreProcedural/ProceduralShape.h +532 -0
- data/deps/include/OgreProcedural/ProceduralShapeGenerators.h +362 -0
- data/deps/include/OgreProcedural/ProceduralSphereGenerator.h +80 -0
- data/deps/include/OgreProcedural/ProceduralSplines.h +168 -0
- data/deps/include/OgreProcedural/ProceduralStableHeaders.h +28 -0
- data/deps/include/OgreProcedural/ProceduralTorusGenerator.h +88 -0
- data/deps/include/OgreProcedural/ProceduralTorusKnotGenerator.h +106 -0
- data/deps/include/OgreProcedural/ProceduralTrack.h +122 -0
- data/deps/include/OgreProcedural/ProceduralTriangleBuffer.h +328 -0
- data/deps/include/OgreProcedural/ProceduralTriangulator.h +173 -0
- data/deps/include/OgreProcedural/ProceduralTubeGenerator.h +96 -0
- data/deps/include/OgreProcedural/ProceduralUtils.h +185 -0
- data/deps/lib/libOgreProcedural.so +0 -0
- data/lib/procedural.so +0 -0
- data/lib/ruby-procedural/version.rb +5 -0
- data/lib/ruby-procedural.rb +27 -0
- data/ruby-procedural.gemspec +33 -0
- metadata +138 -0
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Ruby::Procedural
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'ruby-procedural'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install ruby-procedural
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'rake/clean'
|
2
|
+
require 'ruby-ois'
|
3
|
+
require 'ruby-ogre'
|
4
|
+
|
5
|
+
task :download do
|
6
|
+
FileUtils::mkdir_p("deps/src")
|
7
|
+
chdir('deps/src') {
|
8
|
+
if /mingw/ =~ RUBY_PLATFORM
|
9
|
+
sh "wget http://ogre-procedural.googlecode.com/files/OgreProceduralSDK_MingW_v0.2.7z"
|
10
|
+
sh "C:\Program Files (x86)\7-Zip\7z.exe x OgreProceduralSDK_MingW_v0.2.7z"
|
11
|
+
FileUtils::mkdir_p("./")
|
12
|
+
sh "cp -a OgreProceduralSDK_MingW_v0.2/include ../"
|
13
|
+
sh "cp -a OgreProceduralSDK_MingW_v0.2/lib ../"
|
14
|
+
else
|
15
|
+
sh "hg clone -b v0-2 https://code.google.com/p/ogre-procedural/ ogre-procedural"
|
16
|
+
end
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
task :compile do
|
21
|
+
unless /mingw/ =~ RUBY_PLATFORM
|
22
|
+
chdir("deps/src/ogre-procedural/") {
|
23
|
+
sh "cmake -DOGRE_HOME=#{Ruby::Ogre::get_top_path}/deps -DOIS_HOME=#{Ruby::Ois::get_top_path}/deps/ -DCMAKE_INSTALL_PREFIX:PATH=../.. -DOgreProcedural_BUILD_SAMPLES:BOOL=ON"
|
24
|
+
sh "make -j4 && make -i install"
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
DLEXT = RbConfig::MAKEFILE_CONFIG['DLEXT']
|
30
|
+
|
31
|
+
## lib/*.#{DLEXT}
|
32
|
+
file "lib/procedural.#{DLEXT}" => "bindings/procedural/procedural.#{DLEXT}" do |f|
|
33
|
+
cp f.prerequisites, "lib/", :preserve => true
|
34
|
+
end
|
35
|
+
|
36
|
+
## ext/**/*.#{DLEXT}
|
37
|
+
file "bindings/procedural/procedural.#{DLEXT}" => FileList["bindings/procedural/Makefile"] do |f|
|
38
|
+
sh 'cd bindings/procedural/ && make clean && make'
|
39
|
+
end
|
40
|
+
CLEAN.include 'bindings/procedural/*.{o,so,dll}'
|
41
|
+
|
42
|
+
|
43
|
+
## ext/**/Makefile
|
44
|
+
file 'bindings/procedural/Makefile' => FileList['bindings/procedural/interface/procedural_wrap.cpp'] do
|
45
|
+
chdir('bindings/procedural/') { ruby 'extconf.rb' }
|
46
|
+
end
|
47
|
+
CLEAN.include 'bindings/procedural/Makefile'
|
48
|
+
|
49
|
+
## make wrappers with swig.
|
50
|
+
file 'bindings/procedural/interface/procedural_wrap.cpp' do
|
51
|
+
chdir('bindings/procedural/interface') { sh 'rake' }
|
52
|
+
end
|
53
|
+
CLEAN.include 'bindings/procedural/interface/procedural_wrap.{cpp,h,o}'
|
54
|
+
|
55
|
+
desc "Compile an ogre procedural library."
|
56
|
+
task :build => "lib/procedural.#{DLEXT}"
|
57
|
+
|
58
|
+
#
|
59
|
+
# Document
|
60
|
+
#
|
61
|
+
desc 'Create documents'
|
62
|
+
task :doc => ['bindings/procedural/interface/procedural_wrap.cpp'] do |f|
|
63
|
+
sh "rdoc #{f.prerequisites.join(' ')}"
|
64
|
+
end
|
65
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
%{
|
2
|
+
#include <ProceduralGeometryHelpers.h>
|
3
|
+
%}
|
4
|
+
|
5
|
+
%ignore Procedural::Plane::intersect;
|
6
|
+
%ignore Procedural::Line2D::findIntersect;
|
7
|
+
%ignore Procedural::Segment2D::findIntersect;
|
8
|
+
%ignore Procedural::Segment2D::intersects;
|
9
|
+
%ignore Procedural::Line::shortestPathToPoint;
|
10
|
+
%ignore Procedural::Circle::Circle;
|
11
|
+
|
12
|
+
%include ProceduralGeometryHelpers.h
|
13
|
+
|
14
|
+
%{
|
15
|
+
%}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
%{
|
2
|
+
#include <Ogre.h>
|
3
|
+
#include <ProceduralRoot.h>
|
4
|
+
%}
|
5
|
+
|
6
|
+
%freefunc Procedural::Root "debug_free_ProcRoot";
|
7
|
+
|
8
|
+
%include ProceduralRoot.h
|
9
|
+
|
10
|
+
%{
|
11
|
+
|
12
|
+
// hmm... someting wrong about GC.
|
13
|
+
|
14
|
+
static void debug_free_ProcRoot(void* ptr) {
|
15
|
+
Procedural::Root* obj = (Procedural::Root*) ptr;
|
16
|
+
|
17
|
+
std::cout << __PRETTY_FUNCTION__ << std::endl;
|
18
|
+
|
19
|
+
// delete obj;
|
20
|
+
}
|
21
|
+
%}
|
22
|
+
|
23
|
+
|