rays 0.1.11 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.doc/ext/rays/bitmap.cpp +22 -76
- data/.doc/ext/rays/bounds.cpp +95 -125
- data/.doc/ext/rays/camera.cpp +88 -0
- data/.doc/ext/rays/color.cpp +223 -45
- data/.doc/ext/rays/color_space.cpp +146 -46
- data/.doc/ext/rays/defs.cpp +183 -0
- data/.doc/ext/rays/font.cpp +69 -21
- data/.doc/ext/rays/image.cpp +26 -37
- data/.doc/ext/rays/matrix.cpp +186 -29
- data/.doc/ext/rays/native.cpp +14 -8
- data/.doc/ext/rays/noise.cpp +53 -0
- data/.doc/ext/rays/painter.cpp +187 -292
- data/.doc/ext/rays/point.cpp +96 -77
- data/.doc/ext/rays/polygon.cpp +313 -0
- data/.doc/ext/rays/polygon_line.cpp +96 -0
- data/.doc/ext/rays/polyline.cpp +167 -0
- data/.doc/ext/rays/rays.cpp +103 -12
- data/.doc/ext/rays/shader.cpp +83 -9
- data/LICENSE +21 -0
- data/README.md +1 -1
- data/Rakefile +24 -9
- data/VERSION +1 -1
- data/ext/rays/bitmap.cpp +22 -80
- data/ext/rays/bounds.cpp +100 -128
- data/ext/rays/camera.cpp +94 -0
- data/ext/rays/color.cpp +231 -51
- data/ext/rays/color_space.cpp +149 -47
- data/ext/rays/defs.cpp +183 -0
- data/ext/rays/defs.h +26 -2
- data/ext/rays/extconf.rb +2 -3
- data/ext/rays/font.cpp +74 -24
- data/ext/rays/image.cpp +28 -40
- data/ext/rays/matrix.cpp +198 -30
- data/ext/rays/native.cpp +14 -8
- data/ext/rays/noise.cpp +55 -0
- data/ext/rays/painter.cpp +203 -298
- data/ext/rays/point.cpp +105 -81
- data/ext/rays/polygon.cpp +329 -0
- data/ext/rays/polygon_line.cpp +99 -0
- data/ext/rays/polyline.cpp +176 -0
- data/ext/rays/rays.cpp +103 -13
- data/ext/rays/shader.cpp +84 -9
- data/include/rays.h +10 -2
- data/include/rays/bitmap.h +14 -26
- data/include/rays/bounds.h +21 -4
- data/include/rays/camera.h +49 -0
- data/include/rays/color.h +25 -14
- data/include/rays/color_space.h +15 -10
- data/include/rays/coord.h +114 -0
- data/include/rays/debug.h +22 -0
- data/include/rays/defs.h +36 -0
- data/include/rays/exception.h +6 -2
- data/include/rays/font.h +4 -4
- data/include/rays/image.h +12 -18
- data/include/rays/matrix.h +50 -24
- data/include/rays/noise.h +42 -0
- data/include/rays/opengl.h +2 -50
- data/include/rays/painter.h +89 -93
- data/include/rays/point.h +44 -51
- data/include/rays/polygon.h +198 -0
- data/include/rays/polyline.h +71 -0
- data/include/rays/rays.h +3 -0
- data/include/rays/ruby.h +7 -1
- data/include/rays/ruby/bounds.h +1 -1
- data/include/rays/ruby/camera.h +41 -0
- data/include/rays/ruby/color.h +1 -1
- data/include/rays/ruby/color_space.h +1 -1
- data/include/rays/ruby/font.h +1 -1
- data/include/rays/ruby/matrix.h +1 -1
- data/include/rays/ruby/point.h +1 -1
- data/include/rays/ruby/polygon.h +52 -0
- data/include/rays/ruby/polyline.h +41 -0
- data/include/rays/ruby/rays.h +8 -0
- data/include/rays/ruby/shader.h +1 -1
- data/include/rays/shader.h +36 -8
- data/lib/rays.rb +7 -2
- data/lib/rays/bitmap.rb +0 -15
- data/lib/rays/bounds.rb +17 -23
- data/lib/rays/camera.rb +21 -0
- data/lib/rays/color.rb +20 -47
- data/lib/rays/color_space.rb +13 -13
- data/lib/rays/image.rb +3 -7
- data/lib/rays/matrix.rb +28 -0
- data/lib/rays/module.rb +4 -19
- data/lib/rays/painter.rb +78 -93
- data/lib/rays/point.rb +13 -21
- data/lib/rays/polygon.rb +58 -0
- data/lib/rays/polygon_line.rb +36 -0
- data/lib/rays/polyline.rb +32 -0
- data/lib/rays/shader.rb +20 -1
- data/rays.gemspec +5 -7
- data/src/bitmap.h +36 -0
- data/src/bounds.cpp +74 -11
- data/src/color.cpp +58 -23
- data/src/color_space.cpp +52 -34
- data/src/color_space.h +22 -0
- data/src/coord.cpp +170 -0
- data/src/coord.h +35 -0
- data/src/font.cpp +118 -0
- data/src/font.h +64 -0
- data/src/frame_buffer.cpp +37 -71
- data/src/frame_buffer.h +4 -4
- data/src/image.cpp +172 -98
- data/src/image.h +25 -0
- data/src/ios/bitmap.h +21 -0
- data/src/ios/bitmap.mm +129 -110
- data/src/ios/camera.mm +236 -0
- data/src/ios/font.mm +50 -62
- data/src/ios/helper.h +2 -2
- data/src/ios/opengl.mm +19 -4
- data/src/ios/rays.mm +3 -0
- data/src/matrix.cpp +111 -26
- data/src/matrix.h +30 -0
- data/src/noise.cpp +74 -0
- data/src/opengl.cpp +9 -27
- data/src/opengl.h +37 -0
- data/src/osx/bitmap.h +21 -0
- data/src/osx/bitmap.mm +129 -110
- data/src/osx/camera.mm +236 -0
- data/src/osx/font.mm +49 -62
- data/src/osx/helper.h +2 -2
- data/src/osx/opengl.mm +19 -83
- data/src/osx/rays.mm +3 -0
- data/src/painter.cpp +845 -671
- data/src/painter.h +24 -0
- data/src/point.cpp +140 -119
- data/src/polygon.cpp +1266 -0
- data/src/polygon.h +32 -0
- data/src/polyline.cpp +160 -0
- data/src/polyline.h +69 -0
- data/src/render_buffer.cpp +11 -4
- data/src/render_buffer.h +2 -2
- data/src/shader.cpp +163 -106
- data/src/shader.h +38 -0
- data/src/shader_program.cpp +533 -0
- data/src/{program.h → shader_program.h} +28 -16
- data/src/shader_source.cpp +140 -0
- data/src/shader_source.h +52 -0
- data/src/texture.cpp +136 -160
- data/src/texture.h +65 -0
- data/src/win32/bitmap.cpp +62 -52
- data/src/win32/font.cpp +11 -13
- data/src/win32/font.h +24 -0
- data/src/win32/gdi.h +6 -6
- data/test/helper.rb +0 -3
- data/test/test_bitmap.rb +31 -7
- data/test/test_bounds.rb +36 -0
- data/test/test_color.rb +59 -19
- data/test/test_color_space.rb +95 -0
- data/test/test_font.rb +5 -0
- data/test/test_image.rb +24 -20
- data/test/test_matrix.rb +106 -0
- data/test/test_painter.rb +157 -51
- data/test/test_painter_shape.rb +102 -0
- data/test/test_point.rb +29 -0
- data/test/test_polygon.rb +234 -0
- data/test/test_polygon_line.rb +167 -0
- data/test/test_polyline.rb +171 -0
- data/test/test_shader.rb +9 -9
- metadata +102 -70
- data/.doc/ext/rays/texture.cpp +0 -138
- data/ext/rays/texture.cpp +0 -149
- data/include/rays/ruby/texture.h +0 -41
- data/include/rays/texture.h +0 -71
- data/lib/rays/texture.rb +0 -24
- data/src/program.cpp +0 -648
- data/test/test_texture.rb +0 -27
data/include/rays.h
CHANGED
@@ -7,15 +7,23 @@
|
|
7
7
|
#include <rays/defs.h>
|
8
8
|
#include <rays/rays.h>
|
9
9
|
#include <rays/exception.h>
|
10
|
+
#include <rays/debug.h>
|
11
|
+
|
12
|
+
#include <rays/coord.h>
|
10
13
|
#include <rays/point.h>
|
14
|
+
#include <rays/bounds.h>
|
15
|
+
#include <rays/color.h>
|
11
16
|
#include <rays/color_space.h>
|
17
|
+
#include <rays/matrix.h>
|
18
|
+
|
19
|
+
#include <rays/polyline.h>
|
20
|
+
#include <rays/polygon.h>
|
12
21
|
#include <rays/bitmap.h>
|
13
|
-
#include <rays/texture.h>
|
14
22
|
#include <rays/image.h>
|
15
23
|
#include <rays/font.h>
|
16
24
|
#include <rays/shader.h>
|
25
|
+
|
17
26
|
#include <rays/painter.h>
|
18
|
-
#include <rays/opengl.h>
|
19
27
|
|
20
28
|
|
21
29
|
#endif//EOH
|
data/include/rays/bitmap.h
CHANGED
@@ -14,9 +14,6 @@ namespace Rays
|
|
14
14
|
{
|
15
15
|
|
16
16
|
|
17
|
-
class Texture;
|
18
|
-
|
19
|
-
|
20
17
|
class Bitmap
|
21
18
|
{
|
22
19
|
|
@@ -30,11 +27,9 @@ namespace Rays
|
|
30
27
|
int width, int height, const ColorSpace& cs = RGBA,
|
31
28
|
const void* pixels = NULL);
|
32
29
|
|
33
|
-
Bitmap (const Texture& texture);
|
34
|
-
|
35
30
|
~Bitmap ();
|
36
31
|
|
37
|
-
Bitmap
|
32
|
+
Bitmap dup () const;
|
38
33
|
|
39
34
|
int width () const;
|
40
35
|
|
@@ -50,19 +45,9 @@ namespace Rays
|
|
50
45
|
|
51
46
|
const void* pixels () const;
|
52
47
|
|
53
|
-
template <typename T> T* at (int x, int y)
|
54
|
-
{
|
55
|
-
return (T*) (((char*) pixels()) + pitch() * y + x * color_space().Bpp());
|
56
|
-
}
|
57
|
-
|
58
|
-
template <typename T> const T* at (int x, int y) const
|
59
|
-
{
|
60
|
-
return const_cast<This*>(this)->at<T>(x, y);
|
61
|
-
}
|
62
|
-
|
63
|
-
bool dirty () const;
|
48
|
+
template <typename T> T* at (int x, int y);
|
64
49
|
|
65
|
-
|
50
|
+
template <typename T> const T* at (int x, int y) const;
|
66
51
|
|
67
52
|
operator bool () const;
|
68
53
|
|
@@ -70,19 +55,22 @@ namespace Rays
|
|
70
55
|
|
71
56
|
struct Data;
|
72
57
|
|
73
|
-
Xot::
|
58
|
+
Xot::PSharedImpl<Data> self;
|
74
59
|
|
75
60
|
};// Bitmap
|
76
61
|
|
77
62
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
63
|
+
template <typename T> T*
|
64
|
+
Bitmap::at (int x, int y)
|
65
|
+
{
|
66
|
+
return (T*) (((char*) pixels()) + pitch() * y + x * color_space().Bpp());
|
67
|
+
}
|
82
68
|
|
83
|
-
|
84
|
-
|
85
|
-
|
69
|
+
template <typename T> const T*
|
70
|
+
Bitmap::at (int x, int y) const
|
71
|
+
{
|
72
|
+
return const_cast<This*>(this)->at<T>(x, y);
|
73
|
+
}
|
86
74
|
|
87
75
|
|
88
76
|
}// Rays
|
data/include/rays/bounds.h
CHANGED
@@ -107,20 +107,28 @@ namespace Rays
|
|
107
107
|
|
108
108
|
coord front () const;
|
109
109
|
|
110
|
-
void
|
111
|
-
|
112
|
-
void set_center (const Point& point);
|
110
|
+
void set_position (coord x, coord y, coord z = 0);
|
113
111
|
|
114
|
-
Point
|
112
|
+
void set_position (const Point& position);
|
115
113
|
|
116
114
|
Point& position ();
|
117
115
|
|
118
116
|
const Point& position () const;
|
119
117
|
|
118
|
+
void set_size (coord width, coord height, coord depth = 0);
|
119
|
+
|
120
|
+
void set_size (const Point& size);
|
121
|
+
|
120
122
|
Point& size ();
|
121
123
|
|
122
124
|
const Point& size () const;
|
123
125
|
|
126
|
+
void set_center (coord x, coord y, coord z = 0);
|
127
|
+
|
128
|
+
void set_center (const Point& center);
|
129
|
+
|
130
|
+
Point center () const;
|
131
|
+
|
124
132
|
String inspect () const;
|
125
133
|
|
126
134
|
Point& operator [] (size_t index);
|
@@ -135,6 +143,8 @@ namespace Rays
|
|
135
143
|
|
136
144
|
Bounds& operator |= (const Bounds& rhs);
|
137
145
|
|
146
|
+
Bounds& operator |= (const Point& rhs);
|
147
|
+
|
138
148
|
friend bool operator == (const Bounds& lhs, const Bounds& rhs);
|
139
149
|
|
140
150
|
friend bool operator != (const Bounds& lhs, const Bounds& rhs);
|
@@ -143,9 +153,16 @@ namespace Rays
|
|
143
153
|
|
144
154
|
friend Bounds operator | (const Bounds& lhs, const Bounds& rhs);
|
145
155
|
|
156
|
+
friend Bounds operator | (const Bounds& lhs, const Point& rhs);
|
157
|
+
|
158
|
+
friend Bounds operator | (const Point& lhs, const Bounds& rhs);
|
159
|
+
|
146
160
|
};// Bounds
|
147
161
|
|
148
162
|
|
163
|
+
Bounds invalid_bounds ();
|
164
|
+
|
165
|
+
|
149
166
|
}// Rays
|
150
167
|
|
151
168
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
// -*- mode: c++ -*-
|
2
|
+
#pragma once
|
3
|
+
#ifndef __RAYS_CAMERA_H__
|
4
|
+
#define __RAYS_CAMERA_H__
|
5
|
+
|
6
|
+
|
7
|
+
#include <xot/pimpl.h>
|
8
|
+
#include <rays/defs.h>
|
9
|
+
#include <rays/image.h>
|
10
|
+
|
11
|
+
|
12
|
+
namespace Rays
|
13
|
+
{
|
14
|
+
|
15
|
+
|
16
|
+
class Camera
|
17
|
+
{
|
18
|
+
|
19
|
+
typedef Camera This;
|
20
|
+
|
21
|
+
public:
|
22
|
+
|
23
|
+
Camera ();
|
24
|
+
|
25
|
+
~Camera ();
|
26
|
+
|
27
|
+
bool start ();
|
28
|
+
|
29
|
+
void stop ();
|
30
|
+
|
31
|
+
bool is_active () const;
|
32
|
+
|
33
|
+
const Image* image () const;
|
34
|
+
|
35
|
+
operator bool () const;
|
36
|
+
|
37
|
+
bool operator ! () const;
|
38
|
+
|
39
|
+
struct Data;
|
40
|
+
|
41
|
+
Xot::PSharedImpl<Data> self;
|
42
|
+
|
43
|
+
};// Camera
|
44
|
+
|
45
|
+
|
46
|
+
}// Rays
|
47
|
+
|
48
|
+
|
49
|
+
#endif//EOH
|
data/include/rays/color.h
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
#include <xot/util.h>
|
8
8
|
#include <rays/defs.h>
|
9
|
-
#include <rays/
|
9
|
+
#include <rays/coord.h>
|
10
10
|
|
11
11
|
|
12
12
|
namespace Rays
|
@@ -16,17 +16,12 @@ namespace Rays
|
|
16
16
|
class ColorSpace;
|
17
17
|
|
18
18
|
|
19
|
-
struct Color
|
19
|
+
struct Color : public Coord4
|
20
20
|
{
|
21
21
|
|
22
22
|
typedef Color This;
|
23
23
|
|
24
|
-
|
25
|
-
{
|
26
|
-
struct {float red, green, blue, alpha;};
|
27
|
-
struct {float r, g, b, a;};
|
28
|
-
float array[4];
|
29
|
-
};
|
24
|
+
typedef Coord4 Super;
|
30
25
|
|
31
26
|
Color (float gray = 0, float alpha = 1);
|
32
27
|
|
@@ -40,9 +35,9 @@ namespace Rays
|
|
40
35
|
|
41
36
|
Color& reset (float red, float green, float blue, float alpha = 1);
|
42
37
|
|
43
|
-
Color& reset8 (
|
38
|
+
Color& reset8 (int gray = 0, int alpha = 255);
|
44
39
|
|
45
|
-
Color& reset8 (
|
40
|
+
Color& reset8 (int red, int green, int blue, int alpha = 255);
|
46
41
|
|
47
42
|
Color& reset (const void* pixel, const ColorSpace& cs);
|
48
43
|
|
@@ -52,16 +47,32 @@ namespace Rays
|
|
52
47
|
|
53
48
|
bool operator ! () const;
|
54
49
|
|
55
|
-
|
50
|
+
friend bool operator == (const This& lhs, const This& rhs);
|
51
|
+
|
52
|
+
friend bool operator != (const This& lhs, const This& rhs);
|
53
|
+
|
54
|
+
static uchar float2uchar (float value)
|
55
|
+
{
|
56
|
+
return (uchar) Xot::clip(0.f, 255.f, value * 255);
|
57
|
+
}
|
56
58
|
|
57
|
-
static float uchar2float (
|
59
|
+
static float uchar2float (int value)
|
60
|
+
{
|
61
|
+
return value / 255.f;
|
62
|
+
}
|
58
63
|
|
59
64
|
};// Color
|
60
65
|
|
61
66
|
|
62
|
-
Color
|
67
|
+
Color gray (float gray, float alpha = 1);
|
68
|
+
|
69
|
+
Color gray8 (int gray, int alpha = 255);
|
70
|
+
|
71
|
+
Color rgb (float red, float green, float blue, float alpha = 1);
|
72
|
+
|
73
|
+
Color rgb8 (int red, int green, int blue, int alpha = 255);
|
63
74
|
|
64
|
-
Color
|
75
|
+
Color hsv (float hue, float saturation, float value, float alpha = 1);
|
65
76
|
|
66
77
|
|
67
78
|
}// Rays
|
data/include/rays/color_space.h
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
#include <rays/defs.h>
|
8
|
-
#include <rays/opengl.h>
|
9
8
|
|
10
9
|
|
11
10
|
namespace Rays
|
@@ -15,9 +14,11 @@ namespace Rays
|
|
15
14
|
enum ColorSpaceType
|
16
15
|
{
|
17
16
|
|
18
|
-
COLORSPACE_UNKNOWN =
|
17
|
+
COLORSPACE_UNKNOWN = 0,
|
19
18
|
|
20
|
-
|
19
|
+
GRAY_8, GRAY_16, GRAY_24, GRAY_32, GRAY_float,
|
20
|
+
|
21
|
+
ALPHA_8, ALPHA_16, ALPHA_24, ALPHA_32, ALPHA_float,
|
21
22
|
|
22
23
|
RGB_888, RGBA_8888, RGBX_8888, ARGB_8888, XRGB_8888,
|
23
24
|
|
@@ -27,15 +28,19 @@ namespace Rays
|
|
27
28
|
|
28
29
|
BGR_float, BGRA_float, ABGR_float,
|
29
30
|
|
30
|
-
|
31
|
+
COLORSPACE_MAX,
|
32
|
+
|
33
|
+
GRAY = GRAY_8,
|
34
|
+
|
35
|
+
ALPHA = ALPHA_8,
|
31
36
|
|
32
|
-
|
37
|
+
RGB = RGB_888, BGR = BGR_888,
|
33
38
|
|
34
|
-
|
39
|
+
RGBA = RGBA_8888, RGBX = RGBX_8888, ARGB = ARGB_8888, XRGB = XRGB_8888,
|
35
40
|
|
36
|
-
|
41
|
+
BGRA = BGRA_8888, BGRX = BGRX_8888, ABGR = ABGR_8888, XBGR = XBGR_8888,
|
37
42
|
|
38
|
-
|
43
|
+
DEFAULT_COLOR_SPACE = RGBA
|
39
44
|
|
40
45
|
};// ColorSpaceType
|
41
46
|
|
@@ -63,6 +68,8 @@ namespace Rays
|
|
63
68
|
|
64
69
|
bool is_gray () const;
|
65
70
|
|
71
|
+
bool is_alpha () const;
|
72
|
+
|
66
73
|
bool is_rgb () const;
|
67
74
|
|
68
75
|
bool is_bgr () const;
|
@@ -83,8 +90,6 @@ namespace Rays
|
|
83
90
|
|
84
91
|
bool is_premult () const;
|
85
92
|
|
86
|
-
void get_gl_enums (GLenum* format, GLenum* type, bool alpha_only) const;
|
87
|
-
|
88
93
|
operator bool () const;
|
89
94
|
|
90
95
|
bool operator ! () const;
|
@@ -0,0 +1,114 @@
|
|
1
|
+
// -*- c++ -*-
|
2
|
+
#pragma once
|
3
|
+
#ifndef __RAYS_COORD_H__
|
4
|
+
#define __RAYS_COORD_H__
|
5
|
+
|
6
|
+
|
7
|
+
#include <rays/defs.h>
|
8
|
+
|
9
|
+
|
10
|
+
namespace Rays
|
11
|
+
{
|
12
|
+
|
13
|
+
|
14
|
+
struct Coord2
|
15
|
+
{
|
16
|
+
|
17
|
+
typedef Coord2 This;
|
18
|
+
|
19
|
+
enum {SIZE = 2};
|
20
|
+
|
21
|
+
union
|
22
|
+
{
|
23
|
+
struct {coord x, y;};
|
24
|
+
struct {coord s, t;};
|
25
|
+
coord array[SIZE];
|
26
|
+
};
|
27
|
+
|
28
|
+
Coord2& reset (coord value = 0);
|
29
|
+
|
30
|
+
Coord2& reset (coord x, coord y);
|
31
|
+
|
32
|
+
size_t size () const;
|
33
|
+
|
34
|
+
String inspect () const;
|
35
|
+
|
36
|
+
coord& operator [] (size_t index);
|
37
|
+
|
38
|
+
const coord& operator [] (size_t index) const;
|
39
|
+
|
40
|
+
};// Coord2
|
41
|
+
|
42
|
+
|
43
|
+
struct Coord3
|
44
|
+
{
|
45
|
+
|
46
|
+
typedef Coord3 This;
|
47
|
+
|
48
|
+
enum {SIZE = 3};
|
49
|
+
|
50
|
+
union
|
51
|
+
{
|
52
|
+
struct {coord x, y, z;};
|
53
|
+
struct {coord s, t, p;};
|
54
|
+
struct {coord r, g, b;};
|
55
|
+
struct {coord red, green, blue;};
|
56
|
+
coord array[SIZE];
|
57
|
+
};
|
58
|
+
|
59
|
+
This& operator = (const Coord2& rhs);
|
60
|
+
|
61
|
+
Coord3& reset (coord value = 0);
|
62
|
+
|
63
|
+
Coord3& reset (coord x, coord y, coord z = 0);
|
64
|
+
|
65
|
+
size_t size () const;
|
66
|
+
|
67
|
+
String inspect () const;
|
68
|
+
|
69
|
+
coord& operator [] (size_t index);
|
70
|
+
|
71
|
+
const coord& operator [] (size_t index) const;
|
72
|
+
|
73
|
+
};// Coord3
|
74
|
+
|
75
|
+
|
76
|
+
struct Coord4
|
77
|
+
{
|
78
|
+
|
79
|
+
typedef Coord4 This;
|
80
|
+
|
81
|
+
enum {SIZE = 4};
|
82
|
+
|
83
|
+
union
|
84
|
+
{
|
85
|
+
struct {coord x, y, z, w;};
|
86
|
+
struct {coord s, t, p, q;};
|
87
|
+
struct {coord r, g, b, a;};
|
88
|
+
struct {coord red, green, blue, alpha;};
|
89
|
+
coord array[SIZE];
|
90
|
+
};
|
91
|
+
|
92
|
+
This& operator = (const Coord2& rhs);
|
93
|
+
|
94
|
+
This& operator = (const Coord3& rhs);
|
95
|
+
|
96
|
+
Coord4& reset (coord value = 0);
|
97
|
+
|
98
|
+
Coord4& reset (coord x, coord y, coord z = 0, coord w = 1);
|
99
|
+
|
100
|
+
size_t size () const;
|
101
|
+
|
102
|
+
String inspect () const;
|
103
|
+
|
104
|
+
coord& operator [] (size_t index);
|
105
|
+
|
106
|
+
const coord& operator [] (size_t index) const;
|
107
|
+
|
108
|
+
};// Coord4
|
109
|
+
|
110
|
+
|
111
|
+
}// Rays
|
112
|
+
|
113
|
+
|
114
|
+
#endif//EOH
|