How can I rotate a 3d Object (cone) ?

A set of vertices together represent a cone. Imagine that the Tip of the inverted cone is on the origin, and I have a the axis of the cone. I have to rotate the cone in such a way that the axis of the cone becomes same as z-axis.

I know there are many transformation matrices available on internet, but I am not at all sure which angle to use for the rotation. I have the axis of the cone, I can calculate the angle it makes with x,y,z axes (lets name them alpha,beta,gamme resp.). All I need to do is transform each vertex with some angles. I am just totally confused now, how do I get to build the transformation matrix.

Somebody please help.
You need to read up on 3D coordinate manipulations. Part one here gives the basics to understand how to do it.
http://www.cprogramming.com/tutorial/3d/theBasics.html

Good luck!
Topic archived. No new replies allowed.