glShapeP2p - draw cylinders or Blocks from point 1 to point 2
use OpenGL::QEng::glShapeP2p;
To draw cylinders
drawCyl(1.1,0.2,0.0, 2.5,-1.2,0.5); drawCyl($x1,$y1,$z1,$x2,$y2,$z2,$dia1,$dia2);
To draw blocks
drawBlock(1.1,0.2,0.0, 2.5,-1.2,0.5); drawBlock($x1,$y1,$z1,$x2,$y2,$z2,$dia1,$dia2);
drawCyl
Draw a cylinder in the current color from point 1 (x1,y1,z1) to point 2 (x2,y2,z2). The diameter at point 1 is dia1 (default 0.03). The diameter at point 2 is dia2 (default 0.03).
drawBlock
Draw a block in the current color from point 1 (x1,y1,z1) to point 2 (x2,y2,z2). The points define a diagonal of the block.
Uses OpenGL and Math::Trig.
To install OpenGL::QEng, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenGL::QEng
CPAN shell
perl -MCPAN -e shell install OpenGL::QEng
For more information on module installation, please visit the detailed CPAN module installation guide.