csg 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/src/vector.h ADDED
@@ -0,0 +1,35 @@
1
+ #include <string.h>
2
+ #include <math.h>
3
+
4
+ #include "klist.h"
5
+
6
+ #ifndef __VECTOR_H
7
+ #define __VECTOR_H
8
+
9
+ // Wrappers
10
+ typedef float float3[3];
11
+ #define FLOAT3_INIT {0.0, 0.0, 0.0}
12
+ #define FLOAT3_INIT_MAX {INFINITY, INFINITY, INFINITY}
13
+ #define FLOAT3_INIT_MIN {-INFINITY, -INFINITY, -INFINITY}
14
+ #define FLOAT3_FORMAT(x) (x)[0], (x)[1], (x)[2]
15
+ #define f3X(x) (x)[0]
16
+ #define f3Y(x) (x)[1]
17
+ #define f3Z(x) (x)[2]
18
+
19
+ float3 *clone_f3(float3 f);
20
+
21
+ // Vector Updating operations
22
+ float3 *f3_normalize(float3 *v);
23
+ float3 *f3_scale(float3 *f, float c);
24
+
25
+ // Non-destructive
26
+ float3 *f3_cross(float3 *result, float3 v1, float3 v2);
27
+ float f3_dot(float3 v1, float3 v2);
28
+ float3 *f3_sub(float3 *result, float3 v1, float3 v2);
29
+ float3 *f3_interpolate(float3 *result, float3 start, float3 v, float alpha);
30
+
31
+ // Containers
32
+ #define mp_float3_free(x) free(kl_val(x))
33
+ KLIST_INIT(float3, float3*, mp_float3_free)
34
+
35
+ #endif
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: csg
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Yaroslav Shirokov
9
+ - Sean Bryant
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-06-11 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: ffi
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ description: A fast library for Constructive Solid Geometry
32
+ email:
33
+ - sshirokov@github.com
34
+ - sbryant@github.com
35
+ executables: []
36
+ extensions:
37
+ - ext/Rakefile
38
+ extra_rdoc_files: []
39
+ files:
40
+ - Makefile
41
+ - lib/csg.rb
42
+ - src/bsp.c
43
+ - src/dbg.c
44
+ - src/export.c
45
+ - src/poly.c
46
+ - src/stl.c
47
+ - src/vector.c
48
+ - src/bsp.h
49
+ - src/dbg.h
50
+ - src/export.h
51
+ - src/klist.h
52
+ - src/poly.h
53
+ - src/stl.h
54
+ - src/vector.h
55
+ - ext/Rakefile
56
+ homepage: https://github.com/sshirokov/csgtool/
57
+ licenses: []
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubyforge_project:
76
+ rubygems_version: 1.8.23
77
+ signing_key:
78
+ specification_version: 3
79
+ summary: A fast library for Constructive Solid Geometry
80
+ test_files: []