loadClips This function is used to load a series of animation files making up an animation. This function receives as pa

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

loadClips This function is used to load a series of animation files making up an animation. This function receives as pa

Post by answerhappygod »

Loadclips This Function Is Used To Load A Series Of Animation Files Making Up An Animation This Function Receives As Pa 1
Loadclips This Function Is Used To Load A Series Of Animation Files Making Up An Animation This Function Receives As Pa 1 (51.2 KiB) Viewed 31 times
Loadclips This Function Is Used To Load A Series Of Animation Files Making Up An Animation This Function Receives As Pa 2
Loadclips This Function Is Used To Load A Series Of Animation Files Making Up An Animation This Function Receives As Pa 2 (24.69 KiB) Viewed 31 times
loadClips This function is used to load a series of animation files making up an animation. This function receives as parameters the List of clips and a base filename. The function should erase the list since it will be creating a new list from the files it reads. The filename it receives should be of the form: SavedFiles\example. This function should form the rest of the filename, such as SavedFiles\example-1.txt, create a new node in the list, and then call the loadCanvas to read this file and load it into the newly created node. The function should create the next filename, such as SavedFiles\example-2.txt, create another new node in the list, and then call the loadCanvas to read this file and load it into the newly created node. This process continues as long as the files exist and can be loaded. For example the walk animation has 16 files: SavedFiles\walk-1.txt through SavedFiles\walk-16.txt. All of these should be able to be opened and loaded. When you attempt to open SavedFiles\walk-17.txt, it will fail because it does not exist. This is the signal that the entire animation has been loaded. The function returns false if the FIRST file cannot be read (we're assuming that the filename given was incorrect), and returns true if any of the files can be read successfully.
133 134 135 Ebool loadClips (List& clips, char filename[]) 136 { 137 B // loads the clips from your desired animation 138 // if user loads "box", this function will also load box-1, box-2 and etc. // don't forget to update clipCount as well 139 140 // test this function with "walk" and "tunnel" animation 141 142 return true; 143 www }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply