Viewer.py graphics driver for producing a output file for the Raster3D
ray tracer.
|
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
glr_set_render_program_path(self,
render_path) |
source code
|
|
|
|
|
|
|
glr_init_state(self)
Re-initalizes driver state variables. |
source code
|
|
|
glr_compile_supported(self)
Returns True if draw compiling is supported by the driver. |
source code
|
|
|
glr_render_begin(self,
width=200,
height=100,
zoom=50,
near=0,
far=0,
bg_color_rgbf=( 0.0, 0.0, 0.0) ,
ambient_light=0.2,
diffuse_light=1.0,
specular_light=1.0,
**args)
Sets up lighting and OpenGL options before scene rendering. |
source code
|
|
|
glr_construct_header(self)
Creates the header for the render program. |
source code
|
|
|
glr_render_end(self)
Write out the input file for the render program. |
source code
|
|
|
glr_write_objects(self,
stdin)
Write the graphic objects to the stdin file. |
source code
|
|
|
|
|
|
|
glr_translate(self,
t)
Translates the scene by vector t. |
source code
|
|
|
|
|
glr_mult_matrix_Rt(self,
R,
t)
Return the current matrix as a 3x3 rotation matrix R and 3x1
translation vector t. |
source code
|
|
|
glr_mult_matrix_R(self,
R)
Multiplies the current matrix by rotation matrix R and translates by
t |
source code
|
|
|
|
|
|
|
|
|
|
|
glr_set_material_rgb(self,
r,
g,
b)
Creates a stock rendering material colored according to the given RGB
values. |
source code
|
|
|
glr_set_material_rgba(self,
r,
g,
b,
a)
Creates a stock rendering material colored according to the given RGB
values. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
glr_vertex_triangle_fan_1(self,
vertex)
Get (first) common fan vertex. |
source code
|
|
|
glr_vertex_triangle_fan_2(self,
vertex)
Get second vertex. |
source code
|
|
|
glr_vertex_triangle_fan_3(self,
vertex)
Get third vertex and beyond: construct triangles. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
glr_line(self,
position1,
position2)
Draws a single line. |
source code
|
|
|
glr_text(self,
text,
scale)
Renders a text string. |
source code
|
|
|
glr_axis(self,
position,
axis,
radius)
Draw a vector axis using the current set material at position with
the given radius. |
source code
|
|
|
glr_tube(self,
position1,
position2,
radius)
Draws a hollow tube beginning at pos1, and ending at pos2. |
source code
|
|
|
glr_sphere(self,
position,
radius,
quality)
Draw a atom as a CPK sphere. |
source code
|
|
|
glr_cross(self,
position,
color,
line_width)
Draws atom with a cross of lines. |
source code
|
|
|
glr_Uaxes(self,
position,
U,
prob,
color,
line_width)
Draw the anisotropic axies of the atom at the given probability. |
source code
|
|
|
glr_Uellipse(self,
position,
U,
prob)
Renders the ellipsoid enclosing the given fractional probability
given the gaussian variance-covariance matrix U at the given
position. |
source code
|
|
|
glr_Urms(self,
position,
U)
Renders the root mean square (one standard deviation) surface of the
gaussian variance-covariance matrix U at the given position. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|