Write an OpenGL program to read and display a 3D mesh .obj file
$10-30 USD
已关闭
已发布大约 6 年前
$10-30 USD
货到付款
Write an OpenGL program to read and display a 3D mesh (in .obj format).
There is a skeleton code to be used, and these are the parameters.
1. Implement the “bool ReadOBJFile(const char filename[])”
function, to read in an obj file and store the elements.
2. Implement the “ComputeBoundingBox()” function, to compute the
bounding box, its diagonal axis length, and its center, then put the camera
at:
x_cam = x_BCenter;
y_cam = y_BCenter;
z_cam = z_BCenter + 1.5 *BoundingBoxDiagonalAxisLength;
and look towards the bounding box center.
3. Implement the “Render_Mesh()” function to finish the OpenGL rendering.
4. Finish the rotation (mouse left button), panning (mouse middle button),
and zooming (mouse right button) functions.