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)
Sourcecheck_error!(clear = 1)
Sourceclear
Sourcecreateheightmapmesh(heightmap, num_columns, num_rows)
Sourcecreateindexedmesh(number_of_vertices, vertices, normals, colors, number_of_indices, indices)
Sourcecreateindexedmesh_nocopy(number_of_vertices, vertices, normals, colors, number_of_indices, indices)
Sourcecreateisosurfacemesh(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)
Sourcecreatemesh(n, vertices, normals, colors)
Sourcecreatemesh_nocopy(n, vertices, normals, colors)
Sourcecreatesurface3dmesh(ncols, nrows, px, py, pz)
Sourcecreatesurfacemesh(nx, ny, px, py, pz, option)
Sourcecreatetubemesh(n, points, colors, radii, num_steps, num_segments)
Sourcecreatexslicemesh(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)
Sourcecreateyslicemesh(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)
Sourcecreatezslicemesh(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)
Sourcedeletemesh(mesh)
Sourcedrawconemesh(n, positions, directions, colors, radii, lengths)
Sourcedrawcubemesh(n, positions, directions, ups, colors, scales)
Sourcedrawcylindermesh(n, positions, directions, colors, radii, lengths)
Sourcedrawheightmap(heightmap, num_columns, num_rows, positions, scales)
Sourcedrawimage(xmin, xmax, ymin, ymax, width, height, drawable_type)
Sourcedrawmesh(mesh, n, positions, directions, ups, colors, scales)
Sourcedrawmesh_grlike(mesh, n, positions, directions, ups, colors, scales)
Sourcedrawmolecule(n, positions, colors, radii, bond_radius, bond_color, bond_delta)
Sourcedrawspheremesh(n, positions, colors, radii)
Sourcedrawspins(n, positions, directions, colors, cone_radius, cylinder_radius, cone_height, cylinder_height)
Sourcedrawsurface(mesh)
Sourcedrawtrianglesurface(n, triangles)
Sourcedrawtubemesh(n, points, colors, radii, num_steps, num_segments)
Sourcedrawxslicemesh(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)
Sourcedrawyslicemesh(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)
Sourcedrawzslicemesh(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)
Sourceexport(filename, width, height)
Sourcefree(pointer)
Sourcegetalphamode(mode)
Sourcegetcameraprojectionparameters(vfov, znear, zfar)
Sourcegetclipping(xmin, xmax, ymin, ymax, zmin, zmax)
Sourcegeterror(clear, line, file)
Sourcegeterrorstring(error)
Sourcegetimage(width, height, use_alpha, pixels)
Sourcegetimage(width, height, use_alpha = true)
Sourcegetlightparameters(ambient, diffuse, specular, specular_power)
Sourcegetlightsources(max_num_lights, positions, colors)
Sourcegetprojectiontype
Sourcegetrenderpathstring
Sourcegetsurfaceoption
Sourcegetviewmatrix(m)
Sourceinit(attrib_list = nil)
Sourceisosurface(nx, ny, nz, data, isovalue, color, strides)
Sourcesave(filename, width, height)
Sourceselectid(x, y, width, height, selection_id)
Sourcesetalphamode(mode)
Sourcesetbackgroundcolor(red, green, blue, alpha)
Sourcesetcameraprojectionparameters(vertical_field_of_view, znear, zfar)
Sourcesetclipping(xmin, xmax, ymin, ymax, zmin, zmax)
Sourcesetdefaultlightparameters
Sourcesetlightdirection(x, y, z)
Sourcesetlightparameters(ambient, diffuse, specular, specular_power)
Sourcesetlightsources(num_lights, positions, colors)
Sourcesetlogcallback(log_func)
Sourcesetobjectid(id)
Sourcesetorthographicprojection(left, right, bottom, top, znear, zfar)
Sourcesetprojectiontype(type)
Sourcesetquality(quality)
Sourcesetsurfaceoption(option)
Sourcesetviewmatrix(m)
Sourcesurface(nx, ny, px, py, pz, option)
Sourceterminate
Sourcetriangulate(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)
Sourcetriangulateindexed(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)
Sourceusecurrentframebuffer
Sourceuseframebuffer(framebuffer)
Sourcevolume(nx, ny, nz, data, algorithm, dmin_ptr, dmax_ptr)
Sourcevolume_2pass(nx, ny, nz, data, algorithm, dmin_ptr, dmax_ptr, context)
Sourcewith_error_check
Source