X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=helper.c;h=d7c6291b1ade4f1b6f9d99a0d51d8b1617625fb3;hb=6050088f70bb80701c08dcee9ad786b6c62acf7a;hp=b80a513ea35dd8d76d7b69dc5ef06f0a3be238af;hpb=a73bfc78d5ebac0c1cb851ed8b619fbd13acea9c;p=atyndall%2Fcits2231.git diff --git a/helper.c b/helper.c index b80a513..d7c6291 100644 --- a/helper.c +++ b/helper.c @@ -263,7 +263,7 @@ void drawLine() { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glColor3f( 0.0, 0.0, 0.0 ); - float arrowLength = 1.0; + float arrowLength = 0.5; glBegin(GL_LINES); // x arrow @@ -272,11 +272,21 @@ void drawLine() { // x arrowheads glVertex3i( lineLength, 0.0, 0.0 ); - glVertex3i( lineLength - arrowLength, 0.0, arrowLength ); + glVertex3i( lineLength - arrowLength, 0.0, 0.9 ); + + glVertex3i( lineLength, 0.0, 0.0 ); + glVertex3i( lineLength - arrowLength, 0.0, -1.0 ); // z arrow - glVertex3i( 0.0, 0.0, lineLength ); - glVertex3i( 0.0, 0.0, -lineLength ); + glVertex3i( 0.0, 0.0, lineLength ); + glVertex3i( 0.0, 0.0, -lineLength ); + + // z arrowheads + glVertex3i( 0.0, 0.0, lineLength ); + glVertex3i( 1.0, 0.0, lineLength - arrowLength ); + + glVertex3i( 0.0, 0.0, lineLength ); + glVertex3i( -1.0, 0.0, lineLength - arrowLength ); glEnd(); glDisable(GL_BLEND);