NAME

PDL::Graphics::TriD::Rout - Helper routines for Three-dimensional graphics

DESCRIPTION

This module is for miscellaneous PP-defined utility routines for the PDL::Graphics::TriD module.

EOD

sub trid { my ($par,$ind) = @_; join ',', map {"\$$par($ind => $_)"} (0..2); }

pp_def('vrmlcoordsvert', Pars => 'vertices(n=3)', OtherPars => 'char* space; PerlIO *fp', GenericTypes => ['F','D'], Code => q@ PDL_Byte *buf, *bp; char *spc = $COMP(space); char formchar = $TFD(' ','l'); char formatstr[25]; sprintf(formatstr,"%s%%.3%cf %%.3%cf %%.3%cf,\n",spc, formchar,formchar,formchar); broadcastloop %{ PerlIO_printf($COMP(fp),formatstr,@.trid('vertices','n').'); %}' );

pp_addpm({At=>'Bot'},<<'EOD');

AUTHOR

Copyright (C) 2000 James P. Edwards Copyright (C) 1997 Tuomas J. Lukka. All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file.