#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include <math.h>
#include <signal.h>
#include "tcl.h"
#include "machine.h"
#include "cmd.h"
#include "vmath.h"
#include "mater.h"
#include "nmg.h"
#include "raytrace.h"
Include dependency graph for vdraw.c:
Go to the source code of this file.
Defines | |
#define | M_SQRT2 1.41421356237309504880 |
#define | REV_BU_LIST_FOR(p, structure, hp) |
Functions | |
int | dgo_invent_solid (struct dg_obj *dgop, Tcl_Interp *interp, char *name, struct bu_list *vhead, long int rgb, int copy, fastf_t transparency, int dmode) |
void | dgo_notify (struct dg_obj *dgop, Tcl_Interp *interp) |
Variables | |
bu_cmdtab | vdraw_cmds [] |
OPEN COMMAND vdraw open - with no argument, asks if there is an open vlist (1 yes, 0 no)
name - opens the specified vlist returns 1 if creating new vlist 0 if opening an existing vlist
EDITING COMMANDS - no return value
vdraw write i c x y z - write params into i-th vector next c x y z - write params to end of vector list
vdraw insert i c x y z - insert params in front of i-th vector
vdraw delete i - delete i-th vector last - delete last vector on list all - delete all vectors on list
PARAMETER SETTING COMMAND - no return value vdraw params color - set the current color with 6 hex digits representing rrggbb name - change the name of the current vlist
QUERY COMMAND vdraw read i - returns contents of i-th vector "c x y z" color - return the current color in hex length - return number of vectors in list name - return name of current vlist
DISPLAY COMMAND - vdraw send - send the current vlist to the display returns 0 on success, -1 if the name conflicts with an existing true solid
CURVE COMMANDS vdraw vlist list - return list of all existing vlists delete name - delete the named vlist
All textual arguments can be replaced by their first letter. (e.g. "vdraw d a" instead of "vdraw delete all"
In the above listing: "i" refers to an integer "c" is an integer representing one of the following rt_vlist commands: RT_VLIST_LINE_MOVE 0 / begin new line / RT_VLIST_LINE_DRAW 1 / draw line / RT_VLIST_POLY_START 2 / pt[] has surface normal / RT_VLIST_POLY_MOVE 3 / move to first poly vertex / RT_VLIST_POLY_DRAW 4 / subsequent poly vertex / RT_VLIST_POLY_END 5 / last vert (repeats 1st), draw poly / RT_VLIST_POLY_VERTNORM 6 / per-vertex normal, for interpolation /
"x y z" refer to floating point values which represent a point or normal vector. For commands 0,1,3,4, and 5, they represent a point, while for commands 2 and 6 they represent normal vectors
author - Carl Nuzman
Example Use - vdraw open rays vdraw delete all foreach partition $ray { ...stuff... vdraw write next 0 $inpt vdraw write next 1 $outpt } vdraw send
Acknowledgements: Modifications by Bob Parker:
Definition in file vdraw.c.
|
|
|
Value: (p)=BU_LIST_LAST(structure,hp); \ BU_LIST_NOT_HEAD(p,hp); \ (p)=BU_LIST_PLAST(structure,p) |
|
|
|
|