How do you initialize the vertex buffer and index buffer for a cone in DirectX 9 in C++?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well its fairly easy.
A cone has a single point at one end.
At the other end you have a circle. Obviously the more points you have in that circle the more circular it looks.
You can plot a circle using
To make any triangle you can do it by plugging theta and theta plus some small epsilon (2Pi / 60 would give you 60 points round the base of the cone). Your final coordinate is the top 1. Bung each set of the 3 indices into an index buffer and you are good to go.