Jump to content
  • Advertisement
Sign in to follow this  
Nanook

Visitor pattern performance

This topic is 2451 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've implemented my bounding volume with the visitor pattern so I can do boundingvol0->collide(boundingvol1) and it don't need to know the concrete type.. but hows the performance of the visitor pattern? Whats a good alternative?

I was thinking of having a map of eg. obb's and a map of bounding spheres and then store the key and type of boundingvolume in the physics object and then calling the correct function from the types..

Share this post


Link to post
Share on other sites
Advertisement

but hows the performance of the visitor pattern?

Yes.

Whats a good alternative?[/quote]Also yes.

I was thinking of having a map of eg. obb's and a map of bounding spheres and then store the key and type of boundingvolume in the physics object and then calling the correct function from the types..
[/quote]
Sure.

And as always, profile. Improve if needed, then profile again.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!