Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

the spheres has cometh

Sign in to follow this  


Thats right, dynamic addition of spheres works. I had a few implimention issues of the linked list to get it to really do what I needed. I was having trouble with clearing the ->Next pointer, so I made the Clear() goto the end and use ->Prev to walk back to _Root. It seems to work now, I forgot to update the node count at first, and that caused a problem when I was searching thru more nodes than I had. I'm sure you can imagine.

Time to get the plane objects in a similar list, thankfully I make the linked list use void* pointers. And when I created a new entry I simply newed it in the call to add. But I like the way it works, because I should be able to simply create another linked list with a different name, and I would have a function to add a plane to the list, which would take care of the type, and just pass the address to the generic link data pointer. Anyways, it might be pretty portable for someone. I need to fix the filename, because when I started with the class it was going to be just a linked list for the textures. I decided to make it a base class for others to use it too. It's inside TextureList.cpp/h in the source.zip.

I hope to add a TTL value to the object base, and that will require that I can delete linked-list entries that are anywhere in the list. So thats going to get done sometime in here too. But I'm really excited how well the linked list works for the momment. I'm a little concerned about the searching time when doing collision tests, but I guess thats where other methods come into play.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!