Package jgl.gle.render
Class gle_phong
- java.lang.Object
-
- jgl.context.render.gl_render
-
- jgl.context.render.gl_depth
-
- jgl.gle.render.gle_phong
-
- Direct Known Subclasses:
gle_phong_z
public class gle_phong extends gl_depth
gle_phong is the rendering class for phong shading as an extension of jGL 2.5.- Version:
- 0.5, 23 Dev 2002
- Author:
- Robin Bing-Yu Chen
-
-
Field Summary
Fields Modifier and Type Field Description protected float
LeftPointNX
protected float
LeftPointNY
protected float
LeftPointNZ
protected float
LeftPointPX
protected float
LeftPointPY
protected float
LeftPointPZ
protected float
nx
protected float
ny
protected float
nz
protected float
px
protected float
py
protected float
pz
-
Constructor Summary
Constructors Constructor Description gle_phong(gle_context cc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dec_x()
protected void
draw_horizontal_line(int y)
protected void
draw_horizontal_line(int x1, int x2, int y, float nx1, float ny1, float nz1, float px1, float py1, float pz1)
protected int
get_color()
protected void
inc_x()
protected void
inc_y()
protected void
inc_y_more()
protected void
inc_y_once()
protected void
init(gl_vertex v1, gl_vertex v2)
protected void
init(gl_vertex v1, gl_vertex v2, gl_vertex v3)
protected void
init_dx(int dx)
protected void
init_dx_dy(int area, int left, int right, int top)
protected void
init_dy(int dy)
protected void
init_other(boolean delta, int dy)
protected void
init_phong(gle_vertex v1, gle_vertex v2)
protected void
init_phong(gle_vertex v1, gle_vertex v2, gle_vertex v3)
protected void
init_phong_dx(int dx)
protected void
init_phong_dx_dy(int area, int left, int right, int top)
protected void
init_phong_dy(int dy)
protected void
init_phong_other(boolean delta, int dy)
protected void
phong_dec_x()
protected void
phong_inc_x()
protected void
phong_inc_y()
protected void
phong_inc_y_more()
protected void
phong_inc_y_once()
protected void
put_pixel()
Will color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel()
protected void
put_pixel_by_index()
Will color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel_by_index()
protected void
set_first_phong()
protected void
set_first_point()
protected void
set_left(int pos)
protected void
set_left_phong(int pos)
-
Methods inherited from class jgl.context.render.gl_depth
draw_horizontal_line, init_z, init_z, init_z_dx, init_z_dx_dy, init_z_dy, init_z_other, set_first_z, set_left_z, z_dec_x, z_inc_x, z_inc_y, z_inc_y_more, z_inc_y_once
-
Methods inherited from class jgl.context.render.gl_render
dec_x_inc_y, draw_horizontal_line, draw_horizontal_line, draw_line, draw_line, draw_point, draw_point, draw_polygon, draw_polygon, draw_triangle, draw_triangle, inc_left, inc_left_xy, inc_right, inc_right_xy, inc_x_inc_y, init_dx_dy, init_left, init_left_xy, init_right, init_right_xy, init_xy, init_xy, set_first_xy, set_left_xy, set_pixel, set_right, set_right_xy, x_dec_x, x_inc_x, y_inc_y
-
-
-
-
Field Detail
-
nx
protected float nx
-
ny
protected float ny
-
nz
protected float nz
-
px
protected float px
-
py
protected float py
-
pz
protected float pz
-
LeftPointNX
protected float LeftPointNX
-
LeftPointNY
protected float LeftPointNY
-
LeftPointNZ
protected float LeftPointNZ
-
LeftPointPX
protected float LeftPointPX
-
LeftPointPY
protected float LeftPointPY
-
LeftPointPZ
protected float LeftPointPZ
-
-
Constructor Detail
-
gle_phong
public gle_phong(gle_context cc)
-
-
Method Detail
-
init_phong
protected void init_phong(gle_vertex v1, gle_vertex v2)
-
set_first_phong
protected void set_first_phong()
-
set_first_point
protected void set_first_point()
- Overrides:
set_first_point
in classgl_depth
-
init_phong_dx
protected void init_phong_dx(int dx)
-
init_phong_dy
protected void init_phong_dy(int dy)
-
phong_inc_x
protected void phong_inc_x()
-
phong_dec_x
protected void phong_dec_x()
-
phong_inc_y
protected void phong_inc_y()
-
get_color
protected int get_color()
-
put_pixel
protected void put_pixel()
Description copied from class:gl_render
Will color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel()
-
put_pixel_by_index
protected void put_pixel_by_index()
Description copied from class:gl_render
Will color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel_by_index()
- Overrides:
put_pixel_by_index
in classgl_depth
-
draw_horizontal_line
protected void draw_horizontal_line(int x1, int x2, int y, float nx1, float ny1, float nz1, float px1, float py1, float pz1)
-
init_phong
protected void init_phong(gle_vertex v1, gle_vertex v2, gle_vertex v3)
-
set_left_phong
protected void set_left_phong(int pos)
-
init_phong_dx_dy
protected void init_phong_dx_dy(int area, int left, int right, int top)
-
init_dx_dy
protected void init_dx_dy(int area, int left, int right, int top)
- Overrides:
init_dx_dy
in classgl_depth
-
init_phong_other
protected void init_phong_other(boolean delta, int dy)
-
init_other
protected void init_other(boolean delta, int dy)
- Overrides:
init_other
in classgl_depth
-
phong_inc_y_once
protected void phong_inc_y_once()
-
inc_y_once
protected void inc_y_once()
- Overrides:
inc_y_once
in classgl_depth
-
phong_inc_y_more
protected void phong_inc_y_more()
-
inc_y_more
protected void inc_y_more()
- Overrides:
inc_y_more
in classgl_depth
-
draw_horizontal_line
protected void draw_horizontal_line(int y)
- Overrides:
draw_horizontal_line
in classgl_depth
-
-