   Getting the result of a rotation
  Hi,In my game i want to make a viewing cone for the player. I thought i could do this by just using a triangle. One of it verticies would allwas be in the centre of the player and the other two would be out in front depending on the angle of the player. Rendering the triangle isnt going to be a probem i think but doing collision detection with it, is.If the player's angle changes i have to useglRotatef();to draw the triange in the correct place but i need to know where the other two verticies are so i can use them to check for collisions.Is there any Open GL function that i can use to get the result of the rotation or will i have to somehow calculate it myself?   
  rephrased my question.   ;  OpenGL's (anyway deprecated) transformation routines alter the top matrix on the current matrix stack, and the matrix stack isn't really thought to be read out although it is possible to do so. Because the matrix stack only stores composed matrices, you need to deal with glPushMarix/glPopMatrix, and glLoadIdentity if you want to get a single transformation matrix, like so://glMatrixMode(GL_MODELVIEW_MATRIX);glPushMatrix();glLoadIdentity();glRotatef(...);glGetDoublev(GL_MODELVIEW_MATRIX, ...);glPopMatrix();(Notice please that this gives you the matrix and leaves the matrix stack as it was before, i.e. the rotation has no effect on any sub-sequent rendering). But IMHO it would be better to deal with matrices in your own code; with OpenGL 3.5 and above you're encouraged to do so anyway.However, if you want to use a cone, what do you want to do with a triangle? After extracting the line-of-sight (usually the forward vector from the avatar's co-ordinate frame) in world, you may use the dot-product with the normalized difference vector from the avatar to the point of interest, and perhaps the length of the difference vector. So you can check for the angle and distance and decide "in viewing cone" if the angle is smaller than the opening angle and the distance is lower than the viewable distance. Wouldn't that be sufficient?   ;  Generally you'll want to perform these sorts of computations yourself, using either your own math code or a third-party math library.   ;  See my sig.   ;If you want to use a cone, what do you want to do with a triangle?With my limited math knowledge i thought that i could use a triangle instead of a cone to make it easier to draw and check for collisions   