Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Step 1: Fix the base code to be able to display a mesh from an obj file with multiple shapes. By default the older code
Step 1: Fix the base code to be able to display a mesh from an obj file with multiple "shapes. By default the older code we have worked with on displayed "shape[O]" from the obj file. The new base code is set up so that you can create a "Shape" object for each of the tiny_obj "shapes" You need to fix the code in "initGeom" in main.cpp: you will need access to the entire object, so move code to load the object from the shape class to you will need a collection of shapes, consider using a vector of shapes For every shape loaded from the obj file, create a shape, measure it and do any necessary initialization compute the bounds of the entire mesh (so that you can reposition it and display it at the origin with a reasonable scale). * void initGeom (const sta: :string& resourcebirectorY) /EXAMPLE new set up to read one shape from one obj file - convert to read several // Initialize mesh // Load geometry // Some obj files contain material information.We'11 ignore them for this assignment. vector<:shape t> TOshapes vector
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started