module

GR3

Inherits GRCommon::Utils

Constants

DRAWABLE_GKS = 2
DRAWABLE_OPENGL = 1
ERROR_CAMERA_NOT_INITIALIZED = 7
ERROR_CANNOT_OPEN_FILE = 9
ERROR_EXPORT = 10
ERROR_INIT_FAILED = 3
ERROR_INVALID_ATTRIBUTE = 2
ERROR_INVALID_VALUE = 1
ERROR_MESSAGES = ["none", "invalid value", "invalid attribute", "init failed", "OpenGL error", "out of memory", "not initialized", "camera not initialized", "unknown file extension", "cannot open file", "export failed"]
ERROR_MUTEX = Mutex.new
ERROR_NONE = 0
ERROR_NOT_INITIALIZED = 6
ERROR_OPENGL_ERR = 4
ERROR_OUT_OF_MEM = 5
ERROR_UNKNOWN_FILE_EXTENSION = 8
IA_END_OF_LIST = 0
IA_FRAMEBUFFER_HEIGHT = 2
IA_FRAMEBUFFER_WIDTH = 1
IA_NUM_THREADS = 3
QUALITY_OPENGL_16X_SSAA = 16
QUALITY_OPENGL_2X_SSAA = 2
QUALITY_OPENGL_4X_SSAA = 4
QUALITY_OPENGL_8X_SSAA = 8
QUALITY_OPENGL_NO_SSAA = 0
QUALITY_POVRAY_16X_SSAA = 17
QUALITY_POVRAY_2X_SSAA = 3
QUALITY_POVRAY_4X_SSAA = 5
QUALITY_POVRAY_8X_SSAA = 9
QUALITY_POVRAY_NO_SSAA = 1
SURFACE_DEFAULT = 0
SURFACE_FLAT = 2
SURFACE_GRCOLOR = 8
SURFACE_GRTRANSFORM = 4
SURFACE_GRZSHADED = 16
SURFACE_NORMALS = 1

Instance methods

cameralookat(camera_x, camera_y, camera_z, center_x, center_y, center_z, up_x, up_y, up_z)
Source
check_error!(clear = 1)
Source
clear
Source
createheightmapmesh(heightmap, num_columns, num_rows)
Source
createindexedmesh(number_of_vertices, vertices, normals, colors, number_of_indices, indices)
Source
createindexedmesh_nocopy(number_of_vertices, vertices, normals, colors, number_of_indices, indices)
Source
createisosurfacemesh(data, isolevel, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z)
Source
createmesh(n, vertices, normals, colors)
Source
createmesh_nocopy(n, vertices, normals, colors)
Source
createsurface3dmesh(ncols, nrows, px, py, pz)
Source
createsurfacemesh(nx, ny, px, py, pz, option)
Source
createtubemesh(n, points, colors, radii, num_steps, num_segments)
Source
createxslicemesh(data, ix, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z)
Source
createyslicemesh(data, iy, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z)
Source
createzslicemesh(data, iz, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z)
Source
deletemesh(mesh)
Source
drawconemesh(n, positions, directions, colors, radii, lengths)
Source
drawcubemesh(n, positions, directions, ups, colors, scales)
Source
drawcylindermesh(n, positions, directions, colors, radii, lengths)
Source
drawheightmap(heightmap, num_columns, num_rows, positions, scales)
Source
drawimage(xmin, xmax, ymin, ymax, width, height, drawable_type)
Source
drawmesh(mesh, n, positions, directions, ups, colors, scales)
Source
drawmesh_grlike(mesh, n, positions, directions, ups, colors, scales)
Source
drawmolecule(n, positions, colors, radii, bond_radius, bond_color, bond_delta)
Source
drawspheremesh(n, positions, colors, radii)
Source
drawspins(n, positions, directions, colors, cone_radius, cylinder_radius, cone_height, cylinder_height)
Source
drawsurface(mesh)
Source
drawtrianglesurface(n, triangles)
Source
drawtubemesh(n, points, colors, radii, num_steps, num_segments)
Source
drawxslicemesh(data, ix, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z)
Source
drawyslicemesh(data, iy, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z)
Source
drawzslicemesh(data, iz, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z)
Source
export(filename, width, height)
Source
free(pointer)
Source
getalphamode(mode)
Source
getcameraprojectionparameters(vfov, znear, zfar)
Source
getclipping(xmin, xmax, ymin, ymax, zmin, zmax)
Source
geterror(clear, line, file)
Source
geterrorstring(error)
Source
getimage(width, height, use_alpha, pixels)
Source
getimage(width, height, use_alpha = true)
Source
getlightparameters(ambient, diffuse, specular, specular_power)
Source
getlightsources(max_num_lights, positions, colors)
Source
getprojectiontype
Source
getrenderpathstring
Source
getsurfaceoption
Source
getviewmatrix(m)
Source
init(attrib_list = nil)
Source
isosurface(nx, ny, nz, data, isovalue, color, strides)
Source
save(filename, width, height)
Source
selectid(x, y, width, height, selection_id)
Source
setalphamode(mode)
Source
setbackgroundcolor(red, green, blue, alpha)
Source
setcameraprojectionparameters(vertical_field_of_view, znear, zfar)
Source
setclipping(xmin, xmax, ymin, ymax, zmin, zmax)
Source
setdefaultlightparameters
Source
setlightdirection(x, y, z)
Source
setlightparameters(ambient, diffuse, specular, specular_power)
Source
setlightsources(num_lights, positions, colors)
Source
setlogcallback(log_func)
Source
setobjectid(id)
Source
setorthographicprojection(left, right, bottom, top, znear, zfar)
Source
setprojectiontype(type)
Source
setquality(quality)
Source
setsurfaceoption(option)
Source
setviewmatrix(m)
Source
surface(nx, ny, px, py, pz, option)
Source
terminate
Source
triangulate(data, isolevel, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z, triangles_p)
Source
triangulateindexed(data, isolevel, dim_x, dim_y, dim_z, stride_x, stride_y, stride_z, step_x, step_y, step_z, offset_x, offset_y, offset_z, num_vertices, vertices, normals, num_indices, indices)
Source
usecurrentframebuffer
Source
useframebuffer(framebuffer)
Source
volume(nx, ny, nz, data, algorithm, dmin_ptr, dmax_ptr)
Source
volume_2pass(nx, ny, nz, data, algorithm, dmin_ptr, dmax_ptr, context)
Source
with_error_check
Source

Nested types