Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Array of asteroids

Author
Message
Ace_Lightning
13
Years of Service
User Offline
Joined: 17th Mar 2011
Location:
Posted: 21st Mar 2011 12:09
Hi, everyone I'm making a 3d flight sim in which you have defend the earth against asteroids. I'm trying to make an array of asteroids(using spheres as placeholders for now) but I'm not sure how to do this.

Thanks
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 21st Mar 2011 22:16
I'd use the std::vector class

Also, do you have an asteroid class or are you just going to store the id's?
Ace_Lightning
13
Years of Service
User Offline
Joined: 17th Mar 2011
Location:
Posted: 22nd Mar 2011 14:57
Thanks for getting back to me I have an asteroid class. I'm confused about how to use the dbMakeObjectSphere() command in an array would I have to use the std::vector class or is my asteroid class ok (I've got a lot to learn lol)
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 23rd Mar 2011 02:31
I would add a "makeObject" or something method in your class, then iterate through the array and call it.



Then

Ace_Lightning
13
Years of Service
User Offline
Joined: 17th Mar 2011
Location:
Posted: 26th Mar 2011 15:07
Thanks but I've been having some problems with the std::vector class it keeps giving me errors something to do with unable to update vc90 and because of that i have to copy all of my code on to another file

Login to post a reply

Server time is: 2024-06-15 22:42:10
Your offset time is: 2024-06-15 22:42:10