functions in dlist3d.i -
clear3d
|
clear3d Clear the 3D "cached" and "direct" display lists. Clear the screen. |
clear3d_cache
|
clear3d_cache Clear the 3D "cached" display list. |
clear3d_direct
|
clear3d_direct Clear the 3D "direct" display list. |
CollapseTri
|
CollapseTri(tris) This function is used to collapse an arbitrary number of triangle arrays into a single triangle array. tris must be a TriArrayGrp (which can point to another TriArrayGrp, etc.). | |
SEE ALSO: | pltrilists3d, sortTri |
draw3d
|
draw3d Draw the current 3D "cached" and "direct" display lists. (Ordinarily triggered automatically when the drawing changes.) |
get_centroid3d
|
get_centroid3d(xyz, nxyz) or get_centroid3d(xyz) return 3D centroids for polygons with vertices XYZ. If NXYZ is specified, XYZ should be 3-by-sum(nxyz), with NXYZ being the list of numbers of vertices for each polygon (as for the plfp function). If NXYZ is not specified, XYZ should be a quadrilateral mesh, 3-by-ni-by-nj (as for the plf function). In the first case, the return value is 3-by-numberof(NXYZ); in the second case, the return value is 3-by-(ni-1)-by-(nj-1). The centroids are constructed as the mean value of all vertices of each polygon. | |
SEE ALSO: | get_normal3d, get_light3d |
get_lims3d
|
get_lims3d Compute and return a bounding box containing everything in the "cached" 3D display list. |
get_normal3d
|
get_normal3d(xyz, nxyz) or get_normal3d(xyz) return 3D normals for polygons with vertices XYZ. If NXYZ is specified, XYZ should be 3-by-sum(nxyz), with NXYZ being the list of numbers of vertices for each polygon (as for the plfp function). If NXYZ is not specified, XYZ should be a quadrilateral mesh, 3-by-ni-by-nj (as for the plf function). In the first case, the return value is 3-by-numberof(NXYZ); in the second case, the return value is 3-by-(ni-1)-by-(nj-1). The normals are constructed from the cross product of the lines joining the midpoints of two edges which as nearly quarter the polygon as possible (the medians for a quadrilateral). No check is made that these not be parallel; the returned "normal" is [0,0,0] in that case. Also, if the polygon vertices are not coplanar, the "normal" has no precisely definable meaning. | |
SEE ALSO: | get_centroid3d |
getpix3d
|
getpix3d Read pixels from an OpenGL window. |
light3d
|
light3d, ambient=a_level, diffuse=d_level, specular=s_level, spower=n, sdir=xyz Sets lighting properties for 3D shading effects. A surface will be shaded according to its orientation relative to the viewing direction. The ambient level A_LEVEL is a light level (arbitrary units) that is added to every surface independent of its orientation. The diffuse level D_LEVEL is a light level which is proportional to cos(theta), where theta is the angle between the surface normal and the viewing direction, so that surfaces directly facing the viewer are bright, while surfaces viewed edge on are unlit (and surfaces facing away, if drawn, are shaded as if they faced the viewer). The specular level S_LEVEL is a light level proportional to a high power spower=N of 1+cos(alpha), where alpha is the angle between the specular reflection angle and the viewing direction. The light source for the calculation of alpha lies in the direction XYZ (a 3 element vector) in the viewer's coordinate system at infinite distance. EXAMPLES: light3d, diffuse=.1, specular=1., sdir=[0,0,-1] (dramatic "tail lighting" effect) light3d, diffuse=.5, specular=1., sdir=[1,.5,1] (classic "over your right shoulder" lighting) |
lookat3d
|
lookat3d(eye,center,up) Sets the 3D viewing transform so that the viewer is at "eye, the center of the view is "center", and "up" points upward. | |
SEE ALSO: | stdview3, prtview3 |
palette3d
|
palette3d, palette_name Select a color palette to be used, for example, to color slices through 3D meshes. Uses the same palettes as the 2D graphics package. | |
SEE ALSO: | palette |
plcell3d
|
plcell3d(corners, color) Draws a cell array in 3D using OpenGL. | |
SEE ALSO: | plpoly3d, lookat3d, light3d, win3d |
plcolrsurf3d
|
plcolrsurf3d(xyz, norm, color, flip=) Draws a lit 2D mesh in 3D using OpenGL. Color varies across the mesh and is specified at mesh vertices. | |
SEE ALSO: |
plsurf3d,
plm3d,
plpoly3d,
plcell3d,
lookat3d, light3d, win3d |
plf3d
|
plf3d(xyz, color) Fills a logically 2D mesh in 3D using OpenGL. color is (3 or 4)-by-(nx-1)-by-(ny-1). The initial index of color is 3 (for RGB colors) or 4 (for translucent RGBA colors). Each zone is filled with a single color. The surface does not "reflect" light, so there will not be any shiny highlights. | |
SEE ALSO: |
plm3d,
plsurf3d,
plcolrsurf3d,
plcell3d,
lookat3d, light3d, win3d |
plglyphs3d
|
plglyphs3d(xyz, scal, theta, phi, color) Draws a set of Glyphs using OpenGL. The glyphs are located at xyz and have color "color". The base glyph size is multiplied scal and the glyph axis points in the direction (theta, phi). | |
SEE ALSO: | plpoints3d, lookat3d, light3d, win3d |
pllines3d
|
pllines3d(xyz, color) Draws a Polyline in 3D using OpenGL. | |
SEE ALSO: | plpoly3d, plcell3d, lookat3d, light3d, win3d |
plm3d
|
plm3d(xyz, color) Draws a logically 2D mesh in 3D using OpenGL. | |
SEE ALSO: | plpoly3d, plcell3d, lookat3d, light3d, win3d |
plpoints3d
|
plpoints3d(xyz, color) Draws a set of Points in 3D using OpenGL. | |
SEE ALSO: | plpoly3d, plcell3d, lookat3d, light3d, win3d |
plpoly3d
|
plpoly3d(nv, xyz, color, norm, draw_edge=) Draws a set of filled polygons in 3D using OpenGL. | |
SEE ALSO: | plcell3d, lookat3d, light3d, win3d |
plqarray3d
|
plqarray3d(xyz, norm, color, nquad, draw_edge=) Draws a Quadrangle Array in 3D using OpenGL. | |
SEE ALSO: |
pltarray3d,
plqstrips3d,
lookat3d,
light3d,
win3d |
plqstrips3d
|
plqstrips3d(nv, xyz, color, norm, draw_edge=) Draws a set of quad-strips in 3D using OpenGL. xyz is 3-by-2-by-nvert. nv is the number of vertices per quad strip (i.e. the length of the run in the last index of xyz). nvert= sum(nv) nstrip= numberof(nv); nquad= nvert-nstrip; color is 3-by-ncolor. ncolor can be 1 (all quads the same color), numberof(nv) (one color per strip), or nquad (one color per quad). color will always be increased in size to nquad before being stored. norm can be 3-by-nquad for flat shading or 3-by-2-by-nvert for smooth shading. If norm is not specified, lighting will not be used (the specified color will be used directly). | |
SEE ALSO: |
pltrilists3d,
pltstrips3d,
lookat3d,
light3d,
win3d |
plsurf3d
|
plsurf3d(xyz, norm, color, flip=) Draws a lit 2D mesh in 3D using OpenGL. | |
SEE ALSO: |
plcolrsurf3d,
plm3d,
plpoly3d,
plcell3d,
lookat3d, light3d, win3d |
pltarray3d
|
pltarray3d(xyz, norm, color, ntri, cubemap, emit, draw_edge=) Draws a Triangle Array in 3D using OpenGL. pltrilists3d is normally called instead of this lower level routine. If cubemap is non-zero, specular lighting is handled by cube map textures. | |
SEE ALSO: | pltrilists3d, lookat3d, light3d, win3d |
pltex2dvol
|
pltex2dvol Draws a volume visualization of a 3D cell array using OpenGL. Uses 2D textures. | |
SEE ALSO: |
pltex3dvol,
lookat3d,
light3d,
win3d,
pltex3dvol |
pltex3dvol
|
pltex3dvol Draws a volume visualization of a 3D cell array using OpenGL. Uses 3D textures. | |
SEE ALSO: | pltex2dvol, lookat3d, light3d, win3d |
pltivarray3d
|
pltivarray3d Draws a Triangle Array in 3D using OpenGL. Triangles are specified using indices into a list of vertices, normals, and colors. pltrilists3d is normally called instead of this lower level routine. | |
SEE ALSO: | pltarray3d, lookat3d, pltrilists3d |
pltivstrips3d
|
pltivstrips3d(nv, ndx, xyz, norm, color, draw_edge=) Draws a set of triangle-strips in 3D using OpenGL. pltrilists3d is normally called instead of this lower level routine. xyz and norm are 3-by-nvert. ndx holds the vertex numbers (indices into xyz or norm) of the vertices in the tristrips. nv is the number of vertices per triangle strip (i.e. the length of the run in the last index of ndx). nvert= sum(nv) nstrip= numberof(nv); ntri= nvert-2*nstrip; color is normally 3-by-ncolor. ncolor can be 1 (all tris the same color), numberof(nv) (one color per strip), or ntri (one color per triangle). color will always be increased in size to ntri before being stored. If color is 4-by-ncolor, the 4th element is the alpha value. | |
SEE ALSO: |
pltrilists3d,
pltristrips3d,
lookat3d,
light3d, win3d |
pltrilists3d
|
pltrilists3d(tris,flip=,offset=,cubemap=,emit=) This function is used to display an arbitrary number of triangle strips or arrays in 3D. An example is the output of an iso-surface routine. tris is either a TriStripGrp, a TriArrayGrp, or a TriVertexGrp. flip, if present, is a 3 element vector that multiplies the x, y, and z coords of every point and normal. Ordinarily, all elements are either +1 or -1. If cubemap is non-zero, perform specular lighting using cube map textures. A TriStripGrp is composed of several triangle strips. It has a pointer to the next TriStripGrp. A TriArrayGrp is an array of triangles with a pointer to the next TriArrayGrp. A TriVertexGrp is like a TriArrayGrp except that the vertices and normals have been gathered into vectors and each triangle is specified by three indices into these vectors. | |
SEE ALSO: | plcell3d, lookat3d, light3d, win3d |
pltstrips3d
|
pltstrips3d(nv, xyz, color, norm, draw_edge=) Draws a set of triangle-strips in 3D using OpenGL. pltrilists3d is normally called instead of this lower level routine. xyz is 3-by-nvert. nv is the number of vertices per triangle strip (i.e. the length of the run in the last index of xyz). nvert= sum(nv) nstrip= numberof(nv); ntri= nvert-2*nstrip; color is normally 3-by-ncolor. ncolor can be 1 (all tris the same color), numberof(nv) (one color per strip), or ntri (one color per triangle). color will always be increased in size to ntri before being stored. If color is 4-by-ncolor, the 4th element is the alpha value. norm can be 3-by-ntri for flat shading or 3-by-nvert for smooth shading. If norm is not specified, lighting will not be used (the specified color will be used directly). | |
SEE ALSO: | pltrilists3d, lookat3d, light3d, win3d |
pltvarray3d
|
pltvarray3d Draws a Triangle Array in 3D using OpenGL. Triangles are specified using indices into a list of vertices, normals, and colors. pltrilists3d is normally called instead of this lower level routine. | |
SEE ALSO: |
pltarray3d,
pltivarray3d,
lookat3d,
pltrilists3d |
prtview3d
|
prtview3d Print the parameters for the current viewing transformation. | |
SEE ALSO: | lookat3d, stdview3 |
putpix3d
|
putpix3d Draws pixels into an OpenGL window. | |
SEE ALSO: | clear3 |
SortTri
|
SortTri(tris) This function performs a depth sort of a triangle array. It uses the current viewpoint. The resulting triangle array should display correctly with translucency when viewed from the same point. Rotating the scene may lead to incorrect results if the triangles are translucent. tris must be a TriArrayGrp. | |
SEE ALSO: | pltrilists3d, collapseTri |
stdview3d
|
stdview3d Sets the 3D viewing transform to a default value that makes the whole scene visible. | |
SEE ALSO: | lookat3d, prtview3d |