Box2D Forums

It is currently Wed May 22, 2013 9:51 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Cloning a b2World
PostPosted: Mon May 28, 2012 4:29 am 
Offline

Joined: Mon May 28, 2012 4:27 am
Posts: 10
Hey guys,

I'm trying to work out if Box2D is the right tool for me. I need to often clone b2World objects - is this straight forward?

Thanks in advance,
Ian


Top
 Profile  
 
 Post subject: Re: Cloning a b2World
PostPosted: Mon May 28, 2012 6:58 am 
Online

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1517
Location: Tokyo
You could try this: http://www.iforce2d.net/b2djson/
This converts to a text representation so it's not really performance oriented.


Top
 Profile  
 
 Post subject: Re: Cloning a b2World
PostPosted: Mon May 28, 2012 7:02 am 
Offline

Joined: Mon May 28, 2012 4:27 am
Posts: 10
Hey irresistable force, thanks for replying.

I think I need it faster than that to be honest..


Top
 Profile  
 
 Post subject: Re: Cloning a b2World
PostPosted: Mon May 28, 2012 10:08 am 
Online

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1517
Location: Tokyo
How large is the world, and how often do you need to clone it? Now I'm intrigued by what you're doing here...


Top
 Profile  
 
 Post subject: Re: Cloning a b2World
PostPosted: Tue Jul 03, 2012 5:32 am 
Offline

Joined: Sat Feb 06, 2010 10:55 am
Posts: 37
I suppose that you need your own function to copy every body. It will be faster that b2JSON because there are will no number-string-number conversions. As far as i remember there are no built-in functions to copy the whole world and even won't be released.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group