gl_wtriangle (3)
draw a shadowed pixmap mapped on a triangle
SYNOPSIS
#include <triangle.h>
typedef struct {
unsigned char * bitmap1 ;
unsigned char * bitmap2 ;
int bf ;
} TD_tridata ;
void gl_wtriangle(int x0 , int y0 , int xd0 , int yd0 , int z0
, int x1 , int y1 , int xd1 , int yd1 , int z1
, int x2 , int y2 , int xd2 , int yd2 , int z2 , TD_tridata * tri );
DESCRIPTION
Draws a triangle at points 0, 1, 2 by mapping the pixmaps defined
in the
TD_triangle
structure into the triangle.
The
xd and yd
values represent the triangle on the
bitmap and the
x and y
values represent the triangle
on the screen. The
z
values represent an additional
value which will be added to the color that is looked
up from the pixmap data. Once again, if the
current context is more than 8 bits then the result
is interpreted as an index to the same lookup table. See
gl_triangle (3)
for more details on shadowing.
gl_wtriangle
is used to draw wrapped surfaces
with
shadowing interpolation. The function
gl_swtriangle (3)
does it without shadowing.
bitmap1
defines the back side of the triangle,
bitmap2
the front.
The
bf
value is used to tell the routine to draw the backside
if it is facing the other way.
bf
tells
which way the triangle should be facing to show the front,
since you will more than likely require both
combinations.
bf " = 2"
defines the back to be drawn when the points are arranged clockwise,
bf " = 3"
defines the back to be drawn when the points are arranged counter clockwise,
bf " = -1"
will probably always draw the front.
Beware, these functions are not a direct part of the svgalib library.
Instead their source is part of svgalib and can be found in the
threeDkit/
subdirectory of the original svgalib distribution. However, it is not
installed in the system by default, s.t. it is unclear where you can find it
if your svgalib was installed by some
linux distribution.
In case of any such problem, simply get an svgalib distribution from the net. Yo
don't need to install it. Just
make
in the
threeDkit/
subdirectory. As of this writing,
svgalib-1.2.12.tar.gz
is the latest version and can be retrieved by ftp from
sunsite.unc.edu at /pub/Linux/libs/graphics
and
tsx-11.mit.edu at /pub/linux/sources/libs
which will most probably be mirrored by a site close to you.
The functions are defined in the
tri.o and triangl.o
files (or their resp. sources) which you must link to your program.
SEE ALSO
AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The
demos, the initial documentation and the whole threedkit stuff was done by
Paul Sheer <psheer@icon.co.za>.
Paper mail:
Paul Sheer
P O BOX 890507
Lyndhurst
Johannesburg 2106
South Africa
Donations (by check or postal order) will be appreciated and will encourage
further development of this software. However this is strictly on a voluntary
basis where this software falls under the GNU LIBRARY GENERAL PUBLIC LICENSE.
man3/ctime.3
man3/vga_getgraphmem.3
'\"
'\" Copyright (c) 1990-1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: HandleEvent.3,v 1.2 1998/09/14 18:22:52 stanton Exp $
'\"
'\" The definitions below are for supplemental macros used in Tcl/Tk
'\" manual entries.
'\"
'\" .AP type name in/out ?indent?
'\" Start paragraph describing an argument to a library procedure.
'\" type is type of argument (int, etc.), in/out is either "in", "out",
'\" or "in/out" to describe whether procedure reads or modifies arg,
'\" and indent is equivalent to second arg of .IP (shouldn't ever be
'\" needed; use .AS below instead)
'\"
'\" .AS ?type? ?name?
'\" Give maximum sizes of arguments for setting tab stops. Type and
'\" name are examples of largest possible arguments that will be passed
'\" to .AP later. If args are omitted, default tab stops are used.
'\"
'\" .BS
'\" Start box enclosure. From here until next .BE, everything will be
'\" enclosed in one large box.
'\"
'\" .BE
'\" End of box enclosure.
'\"
'\" .CS
'\" Begin code excerpt.
'\"
'\" .CE
'\" End code excerpt.
'\"
'\" .VS ?version? ?br?
'\" Begin vertical sidebar, for use in marking newly-changed parts
'\" of man pages. The first argument is ignored and used for recording
'\" the version when the .VS was added, so that the sidebars can be
'\" found and removed when they reach a certain age. If another argument
'\" is present, then a line break is forced before starting the sidebar.
'\"
'\" .VE
'\" End of vertical sidebar.
'\"
'\" .DS
'\" Begin an indented unfilled display.
'\"
'\" .DE
'\" End of indented unfilled display.
'\"
'\" .SO
'\" Start of list of standard options for a Tk widget. The
'\" options follow on successive lines, in four columns separated
'\" by tabs.
'\"
'\" .SE
'\" End of list of standard options for a Tk widget.
'\"
'\" .OP cmdName dbName dbClass
'\" Start of description of a specific option. cmdName gives the
'\" option's name as specified in the class command, dbName gives
'\" the option's name in the option database, and dbClass gives
'\" the option's class in the option database.
'\"
'\" .UL arg1 arg2
'\" Print arg1 underlined, then print arg2 normally.
'\"
'\" RCS: @(#) $Id: man.macros,v 1.2 1998/09/14 18:39:54 stanton Exp $
'\"
'\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
t .wh -1.3i ^B
^l \n(.l
b
'\" # Start an argument description
AP
!"\\$4"" .TP \\$4
\{\
!"\\$2"" .TP \\n()Cu
.TP 15
|
|