class LIGHT

All features

Direct parents

non-conformant parents

SMART_GL

Summary

creation features

exported features

Details

make (id: INTEGER)
make_with_colors (id: INTEGER, a: GL_COLOR, d: GL_COLOR, s: GL_COLOR)
make (id: INTEGER)
make_with_colors (id: INTEGER, a: GL_COLOR, d: GL_COLOR, s: GL_COLOR)
set_ambient (a: GL_COLOR)

require

  • a /= Void

ensure

  • ambient = a

set_diffuse (d: GL_COLOR)

require

  • d /= Void

ensure

  • diffuse = d

set_specular (s: GL_COLOR)

require

  • s /= Void

ensure

  • specular = s

light_id: INTEGER
select_light (id: INTEGER)

ensure

  • light_id = id
  • has_id = True

ambient: GL_COLOR
diffuse: GL_COLOR
specular: GL_COLOR
set_directional (x: REAL, y: REAL, z: REAL)

require

  • position /= Void and then position.count >= 4

ensure

  • is_directional

set_spot_position (x: REAL, y: REAL, z: REAL)

require

  • position /= Void and then position.count >= 4

ensure

  • is_spot

set_spot_direction (x: REAL, y: REAL, z: REAL)

require

  • direction /= Void and then direction.count >= 3
  • is_spot

is_directional: BOOLEAN

require

  • position /= Void and then position.count >= 4

is_spot: BOOLEAN

require

  • position /= Void and then position.count >= 4

render

require

  • has_id

cutoff: REAL

require

  • is_spot
  • has_cutoff

ensure

  • Result.in_range(0, 180)

set_cutoff (co: REAL)

require

  • is_spot
  • co.in_range(0, 180)

ensure

  • has_cutoff

exponent: REAL

require

  • is_spot
  • has_exponent

set_exponent (exp: REAL)

require

  • is_spot

ensure

  • has_exponent

constant_attenuation: REAL

require

  • is_spot
  • has_constant_attenuation

set_constant_attenuation (att: REAL)

require

  • is_spot

ensure

  • has_constant_attenuation

linear_attenuation: REAL

require

  • is_spot
  • has_linear_attenuation

set_linear_attenuation (att: REAL)

require

  • is_spot

ensure

  • has_linear_attenuation

quadratic_attenuation: REAL

require

  • is_spot
  • has_quadratic_attenuation

set_quadratic_attenuation (att: REAL)

require

  • is_spot

ensure

  • has_quadratic_attenuation

render_directional

require

  • is_directional
  • has_id

render_spot

require

  • is_spot
  • has_id

render_all_colors

require

  • has_id

position: FAST_ARRAY [E_][REAL_32]
direction: FAST_ARRAY [E_][REAL_32]
has_id: BOOLEAN
has_cutoff: BOOLEAN
has_exponent: BOOLEAN
has_constant_attenuation: BOOLEAN
has_linear_attenuation: BOOLEAN
has_quadratic_attenuation: BOOLEAN
internal_cutoff: REAL_32
internal_exponent: REAL_32
internal_constant_attenuation: REAL_32
internal_linear_attenuation: REAL_32
internal_quadratic_attenuation: REAL_32
set_clear_color (red: REAL, green: REAL, blue: REAL, alpha: REAL)
set_clear_depth (depth: REAL)
translate (x: REAL, y: REAL, z: REAL)
rotate (angle: REAL, axis_x: REAL, axis_y: REAL, axis_z: REAL)
scale (x: REAL, y: REAL, z: REAL)
begin_rendering
end_rendering
begin_points

require

  • not has_begun

ensure

  • has_begun

begin_lines

require

  • not has_begun

ensure

  • has_begun

begin_line_strip

require

  • not has_begun

ensure

  • has_begun

begin_line_loop

require

  • not has_begun

ensure

  • has_begun

begin_triangles

require

  • not has_begun

ensure

  • has_begun

begin_triangle_strip

require

  • not has_begun

ensure

  • has_begun

begin_triangle_fan

require

  • not has_begun

ensure

  • has_begun

begin_quads

require

  • not has_begun

ensure

  • has_begun

begin_quad_strip

require

  • not has_begun

ensure

  • has_begun

begin_polygon

require

  • not has_begun

ensure

  • has_begun

end_primitive

require

  • has_begun

ensure

  • not has_begun

vertex (x: REAL, y: REAL, z: REAL)
full_red: GL_COLOR
full_green: GL_COLOR
full_blue: GL_COLOR
full_yellow: GL_COLOR
full_magenta: GL_COLOR
full_cyan: GL_COLOR
full_white: GL_COLOR
full_black: GL_COLOR
clamp (real: REAL): REAL

ensure

  • Result.in_range(0, 1)

has_begun: BOOLEAN
gl: GL
glu: GLU