*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> powerflip (6)              
Title
Content
Arch
Section
 

Contents


POWERFLIP(6D)							 POWERFLIP(6D)


NAME    [Toc]    [Back]

     powerflip - spin 3D objects in a window

SYNOPSIS    [Toc]    [Back]

     powerflip [-rsSCwWLRDh] [-B blurfactor] [-Fdensity] [-f r,g,b] [-T
     title_message] [-m	material,backmaterial] [-p x,y,z] [-o q1,q2,q3,q4] [-c
     r,g,b] [-b	backgroundfile]	modelname [ modelname... ]

DESCRIPTION    [Toc]    [Back]

     powerflip is a replacement	for the	'flip' demo, which was a replacement
     for the 'spin' demo.  It will read	3D models from the named files,
     searching first for the model in the current directory and	then in	the
     /usr/demos/General_Demos/powerflip/data/ directory.  If given a model
     argument of '-', .I powerflip will	try to read a 3D model from standard
     input.  See the YAODL(6d) manual page for a description of	the 3D models'
     file format.

Interaction    [Toc]    [Back]

     powerflip can use either the mouse	or a SpaceBall to control the position
     and orientation of	the models.  If	a SpaceBall is connected to your
     system, it	will be	automatically used (you	may still use the mouse,
     though).

     The left mouse button controls all	of the currently selected objects' x/y
     translation.  Holding down	the button will	stop an	object from spinning
     and make it (roughly) follow the mouse's motion.

     The middle	mouse controls all of the currently selected objects'
     rotation.	The interface is a 'virtual trackball',	centered at the	center
     of	the window.  Essentially, the interface	emulates a track-ball at the
     center of the window, with	the modification that circular motions near
     the edge of the window are	interpreted as z-rotations.  When the middle
     mouse button is let up, the last spin direction is	maintained; this lets
     you 'throw' objects.  It is a lot easier to use than it is	to describe.

     Holding down the left and middle mouse buttons together will control all
     selected objects' z-translation (zoom).  The clipping planes are set
     fairly close to the objects; be careful not to lose them by zooming them
     too far.

     The right mouse button will bring up a rather elaborate series of
     rollover menus.  They are described below.

   Objects    [Toc]    [Back]
     Each object will have its own entry on the	main menu.  The	following
     properties	of objects may be changed:

     Move with Mouse
	  Each object may be individually selected or deselected.  Initially,
	  the first object specified on	the command line is the	only one
	  selected.  If	you deselect everything, powerflip will	ignore the
	  left and middle mouse	buttons.



									Page 1






POWERFLIP(6D)							 POWERFLIP(6D)



     Draw Transparent
	  If your machine supports blending, this option will blend the	object
	  with whatever	is underneath it, giving a transparent affect.	If the
	  object is displayed as wireframe, then this option will display the
	  lines	anti-aliased.

     Draw anti-aliased
	  If brought up	in wireframe mode (see the '-w'	option in the list of
	  command line options below), this option will	replace	the 'Draw
	  Transparent' entry, and allows the lines to be drawn anti-aliased.

     Object Materials
	  This rollover	menu allows you	to assign a material to	an object.
	  Initially all	objects	are a pewter-like material.

   Display Performance    [Toc]    [Back]
     This options turns	on or off a display of the number of polygons drawn
     (if polygonal objects are being displayed), then number of	frames drawn
     per second, and the number	of polygons drawn per second (again, if
     polygonal objects are being displayed).  The numbers are updated every 30
     frames drawn, and will not	be accurate if any time	was spent displaying
     popup menus, if the window	was stowed, etc.  Also note that only frame
     rates are reported	for objects consisting of triangle meshes, nurbs, etc.

   Move	Wireframe
     If	this option is selected, the objects will be displayed as lines	when
     they (or anything else in the scene) are moving, and will be displayed as
     solid objects when	the scene is still.  This is useful on slower machines
     that can draw lines faster	than polygons (but note	that the lines are
     still lit by the light sources in the scene).

   Lights    [Toc]    [Back]
     Unless powerflip is brought up in no-lighting mode	(see the command-line
     options section below), this set of menus allows you to modify the	lights
     that affect the objects in	the scene.

     Sources
	  There	are 8 light sources, arranged at the corners of	a cube.	 Four
	  of these sources are defined to be local lights, and four are
	  infinite lights.  This sub-menu lets you turn	lights on and off.
	  powerflip starts with	one infite white light turned on.

     Lighting Models
	  A lighting model can either assume the viewer	is infinitely far away
	  from the scene, in which case	all light rays hitting a surface and
	  bouncing towards the viewer are parallel, or a lighting model	can be
	  based	on a viewer that has a specific	location near the scene
	  ("local viewer") in which case all light rays	converge on the	viewer
	  after	hitting	a surface.






									Page 2






POWERFLIP(6D)							 POWERFLIP(6D)



     The "local	viewer"	lighting model is more correct,	but it is also
     computationally more complex, which causes	a performance degradation.
     For most models, the visual difference between the	two lighting models is
     very subtle.

     Move with Mouse
	  This option allows you to change the position	and orientation	of the
	  lights.  You can't move the lights independently (they all move
	  together), but you can move the lights independent of	the object by
	  deselecting the objects (by choosing the 'Move with Mouse' menu
	  entry	on each	object's menu) and then	choosing this menu entry.

   Fog    [Toc]    [Back]
     If	your machine supports it, this set of rollover menus allows you	to
     control fog paramaters.

     Clear Air    [Toc]    [Back]
	  Choosing this	entry (the default) turns off fog effects, setting fog
	  density to zero.

     Fog  This sets the	fog color to grey, and,	if the fog density was zero,
	  it resets it to be moderately	foggy.

     Haze Simulate haze	by setting the fog color to a blue-grey	color.	Again,
	  if the fog density was zero it is reset to be	moderately hazy.

     Black Fog (depthcue)    [Toc]    [Back]
	  By setting the fog color to black, an	effect called 'depth cueing'
	  is achieved, where the farther away an object	is from	the eye, the
	  darker it is.

     Density    [Toc]    [Back]
	  This submenu allows you to choose the	fogginess of the scene,	from
	  0.0 (which turns fog off and gives clear air), to 1.0	(so foggy you
	  probably won't be able to see	anything).

   Motion Blur    [Toc]    [Back]
     If	your machine has hardware support for an 'accumulation buffer',
     powerflip will optionally motion blur objects as they move.  The effect
     is	greatly	exaggerated here for demonstration purposes; a real
     application would make the	effect much more subtle.  Note that powerflip
     automatically does	full-scene anti-aliasing when the scene	is still on
     machines with hardware accumulation buffers.

   Clipping Planes    [Toc]    [Back]
     If	your machine supports arbitrary	clipping planes, this option lets you
     turn one on.  Parts of objects on one side	of the clipping	plane will be
     displayed transparently; the other	side will be displayed solid (the
     objects must be drawn twice to achieve this), unless the object is	drawn
     in	wireframe; in that case, half of the object will be drawn with antialiased
 lines, and	half with non-anti-aliased lines.  You can control the
     clipping plane's orientation and position with the	mouse if you select



									Page 3






POWERFLIP(6D)							 POWERFLIP(6D)



     the 'Move with Mouse' option; initially the clipping plane	is given a
     random spin.

   Select All    [Toc]    [Back]
     This entry	will show up only if you have chosen more than one object;
     choosing it will select all objects (but it does not affect the lights).

   Exit    [Toc]    [Back]
     Quit the program.	The ESC	key will also make the program exit.

COMMAND	LINE OPTIONS
     -s	  Everything will be still if this object is given; objects will not
	  get a	random rotation, and will come up in the same position and
	  orientation every time.

     -S	  Stereo mode.	powerflip will open up a full-screen window and	put
	  the system into 120HZ	stereo mode.  You can use the up and down
	  arrow	keys to	control	the eye	separation of the stereo projection
	  (up increases, down decreases).  The system is put back into normal
	  video	mode when powerflip exits (unless it is	somehow	terminated
	  abnormally; for example, by the 'kill' command).

     -C	  Turns	clipping plane on by default.  The clipping planes are
	  normally off.

     -w	  Draw all models in wireframe (line) mode.

     -W	  Turn on move wireframe mode by default.  The scene will be drawn as
	  lines	when anything in the scene is moving.

     -L	  No lighting mode.  All lighting commands and popup menus will	not
	  appear.  The default color for all objects will be white.  This
	  option is useful in conjunction with the -w command, to draw models
	  as plain, unlit lines.

     -B	number
	  Turns	on motion blur,	with the given number used to set how much to
	  blur (larger numbers blur more).

     -F	density
	  Sets the initial fog density.

     -f	red,green,blue
	  Sets the initial fog color.

     -m	material[,backmaterial]
	  Gives	objects	the given material by default.	The number corresponds
	  to one of the	materials in the 'Materials' menu; the default is 3.
	  If backmaterial is given, and	your machine supports two-sided
	  lighting, it will be used as the material for	back-facing polygons.
	  Note that many of the	models in the
	  /usr/demos/General_Demos/powerflip/data directory do not have



									Page 4






POWERFLIP(6D)							 POWERFLIP(6D)



	  correctly oriented polygons, so specifying a back material will
	  result in incorrect results.	Three models that do have correctly
	  oriented polygons are	'nurb.ydl', 'xlogo.ydl'	and 'can.ydl'.

     -T	message
	  The given message will be displayed while loading the	data files.
	  Several -T arguments may be given to display several lines (but long
	  lines	are not	automatically wrapped).

     -b	file
	  Use the given	file as	a background image.  Backgrounds are drawn in
	  a coordinate system of -1.0 to 1.0 in	both the X and Y directions.
	  See /usr/demos/General_Demos/powerflip/data/background[1234].defs
	  for examples of simple backgrounds.

     -R	  This option causes powerflip to be the 'root'	window,	the window
	  that is always underneath all	other windows.	Unless you can afford
	  the CPU time,	it is best to use this option along with the -s
	  option.  No interaction is allowed when in this mode.

     -p	x,y,z
	  Sets the initial position of objects.	 When experimenting with this
	  option, keep your initial guesses in the range of -2.0 to 2.0	or you
	  might	lose your objects.

     -o	q1,q2,q3,q4
	  Sets the initial orientation of objects.  The	4 numbers represent a
	  quaternion rotation.	To convert from	an axis	and an angle into a
	  quaternion, use the following	formulas:  Given axis x,y,z and	angle
	  a (in	radians), q1=x/sin(a/2), q2=y/sin(a/2),	q3=z/sin(a/2),
	  q4=cos(a/2).	Ok, so you probably want to know why I would make you
	  specify this as a quaternion.	 The reason is because powerflip
	  represents rotations as quaternions internally, and it is easy to
	  position the model and then use the debugger to dump out the
	  quaternions value.  I	apologize, and maybe I'll fix it sometime...

     -c	red,green,blue
	  Specifies the	background color for the window.  The default
	  background color is black (0.0,0.0,0.0).  Colors range from 0.0 to
	  1.0.

     -r	  This (not very useful) option	will cause the scene to	be constantly
	  be redrawn, even when	nothing	is changing.  Normally powerflip will
	  notice when nothing is changing, and will wait for user-input	events
	  and not consume any CPU time.

     -D	  Debug	mode.  Another not-very-useful option that brings up powerflip
	  in a fixed-size window, and keeps it from forking off	a process and
	  freeing up the program it was	invoked	from.






									Page 5






POWERFLIP(6D)							 POWERFLIP(6D)



     -h	  Help;	prints a short list of all the command-line options available.

FILES    [Toc]    [Back]

     /usr/demos/General_Demos/powerflip/data/	data files & texture maps
						for powerflip

SEE ALSO    [Toc]    [Back]

      
      
     YAODL(6D)

BUGS    [Toc]    [Back]

     Anti-aliased lines	are not	drawn properly for many	of the models because
     edges shared between polygons are drawn twice.  Two models	that do	not
     have this problem are 'f15_wire.ydl' and 'can.ydl'.


									PPPPaaaaggggeeee 6666
[ Back ]
 Similar pages
Name OS Title
perlobj IRIX Perl objects
perlobj OpenBSD Perl objects
RSA_free Tru64 Allocate and free RSA objects
DSA_new Tru64 Allocate and free DSA objects
DSA_free Tru64 Allocate and free DSA objects
DSA_new NetBSD allocate and free DSA objects
RSA_new NetBSD allocate and free RSA objects
RSA_new OpenBSD allocate and free RSA objects
DH_new NetBSD allocate and free DH objects
DH_free Tru64 Allocate and free DH objects
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service