Module: GR3
- Extended by:
- CheckError, GRCommons::GRCommonUtils, GRCommons::JupyterSupport
- Defined in:
- lib/gr3.rb,
lib/gr3.rb,
lib/gr3/ffi.rb,
lib/gr3/gr3base.rb
Defined Under Namespace
Modules: CheckError, FFI
Constant Summary collapse
- IA_END_OF_LIST =
0- IA_FRAMEBUFFER_WIDTH =
1- IA_FRAMEBUFFER_HEIGHT =
2- ERROR_NONE =
0- ERROR_INVALID_VALUE =
1- ERROR_INVALID_ATTRIBUTE =
2- ERROR_INIT_FAILED =
3- ERROR_OPENGL_ERR =
4- ERROR_OUT_OF_MEM =
5- ERROR_NOT_INITIALIZED =
6- ERROR_CAMERA_NOT_INITIALIZED =
7- ERROR_UNKNOWN_FILE_EXTENSION =
8- ERROR_CANNOT_OPEN_FILE =
9- ERROR_EXPORT =
10- QUALITY_OPENGL_NO_SSAA =
0- QUALITY_OPENGL_2X_SSAA =
2- QUALITY_OPENGL_4X_SSAA =
4- QUALITY_OPENGL_8X_SSAA =
8- QUALITY_OPENGL_16X_SSAA =
16- QUALITY_POVRAY_NO_SSAA =
0 + 1
- QUALITY_POVRAY_2X_SSAA =
2 + 1
- QUALITY_POVRAY_4X_SSAA =
4 + 1
- QUALITY_POVRAY_8X_SSAA =
8 + 1
- QUALITY_POVRAY_16X_SSAA =
16 + 1
- DRAWABLE_OPENGL =
1- DRAWABLE_GKS =
2- SURFACE_DEFAULT =
0- SURFACE_NORMALS =
1- SURFACE_FLAT =
2- SURFACE_GRTRANSFORM =
4- SURFACE_GRCOLOR =
8- SURFACE_GRZSHADED =
16
Class Attribute Summary collapse
-
.ffi_lib ⇒ Object
readonly
Returns the value of attribute ffi_lib.
Class Method Summary collapse
- .createindexedmesh(num_vertices, vertices, normals, colors, num_indices, indices) ⇒ Object
- .createindexedmesh_nocopy(num_vertices, vertices, normals, colors, num_indices, indices) ⇒ Object
- .createmesh(_n, vertices, normals, colors) ⇒ Object
- .createmesh_nocopy(_n, vertices, normals, colors) ⇒ Object
-
.createsurfacemesh(nx, ny, px, py, pz, option = 0) ⇒ Object
gr3_gr.
-
.drawtubemesh(n, points, colors, radii, num_steps = 10, num_segments = 20) ⇒ Object
gr3_convenience.
- .getimage(width, height, use_alpha = true) ⇒ Object
Methods included from GRCommons::JupyterSupport
Class Attribute Details
.ffi_lib ⇒ Object (readonly)
Returns the value of attribute ffi_lib.
7 8 9 |
# File 'lib/gr3.rb', line 7 def ffi_lib @ffi_lib end |
Class Method Details
.createindexedmesh(num_vertices, vertices, normals, colors, num_indices, indices) ⇒ Object
70 71 72 73 74 |
# File 'lib/gr3.rb', line 70 def createindexedmesh(num_vertices, vertices, normals, colors, num_indices, indices) inquiry_int do |mesh| super(mesh, num_vertices, vertices, normals, colors, num_indices, indices) end end |
.createindexedmesh_nocopy(num_vertices, vertices, normals, colors, num_indices, indices) ⇒ Object
64 65 66 67 68 |
# File 'lib/gr3.rb', line 64 def createindexedmesh_nocopy(num_vertices, vertices, normals, colors, num_indices, indices) inquiry_int do |mesh| super(mesh, num_vertices, vertices, normals, colors, num_indices, indices) end end |
.createmesh(_n, vertices, normals, colors) ⇒ Object
58 59 60 61 62 |
# File 'lib/gr3.rb', line 58 def createmesh(_n, vertices, normals, colors) inquiry_int do |mesh| super(mesh, vertices, normals, colors) end end |
.createmesh_nocopy(_n, vertices, normals, colors) ⇒ Object
52 53 54 55 56 |
# File 'lib/gr3.rb', line 52 def createmesh_nocopy(_n, vertices, normals, colors) inquiry_int do |mesh| super(mesh, vertices, normals, colors) end end |
.createsurfacemesh(nx, ny, px, py, pz, option = 0) ⇒ Object
gr3_gr
85 86 87 88 89 |
# File 'lib/gr3.rb', line 85 def createsurfacemesh(nx, ny, px, py, pz, option = 0) inquiry_int do |mesh| super(mesh, nx, ny, px, py, pz, option) end end |
.drawtubemesh(n, points, colors, radii, num_steps = 10, num_segments = 20) ⇒ Object
gr3_convenience
93 94 95 |
# File 'lib/gr3.rb', line 93 def drawtubemesh(n, points, colors, radii, num_steps = 10, num_segments = 20) super(n, points, colors, radii, num_steps, num_segments) end |
.getimage(width, height, use_alpha = true) ⇒ Object
76 77 78 79 80 81 |
# File 'lib/gr3.rb', line 76 def getimage(width, height, use_alpha = true) bpp = use_alpha ? 4 : 3 inquiry(uint8: width * height * bpp) do |bitmap| super(width, height, (use_alpha ? 1 : 0), bitmap) end end |