<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/3748" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2009-11-12T03:58:16+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/3748</id>

		<entry>
		<author><name><![CDATA[Chris Simson]]></name></author>
		<updated>2009-11-12T03:58:16+00:00</updated>

		<published>2009-11-12T03:58:16+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16008#p16008</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16008#p16008"/>
		<title type="html"><![CDATA[Re: Serializing to and from platform-specific binary files]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16008#p16008"><![CDATA[
After further investigation, it seems that (some of the) Bullet classes do not support RTTI (eg try and do a typeid(v), or dynamic_cast&lt;...&gt;(v) where v is of type btCollisionObject&amp;).  Hence the Boost serialization library groans; you get __non_rtti_object exceptions thrown.  It seems that serialization via Boost is a no go.  Rethink required.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=5900">Chris Simson</a> — Thu Nov 12, 2009 3:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Chris Simson]]></name></author>
		<updated>2009-11-10T12:12:26+00:00</updated>

		<published>2009-11-10T12:12:26+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=15984#p15984</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=15984#p15984"/>
		<title type="html"><![CDATA[Re: Serializing Bullet Physics]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=15984#p15984"><![CDATA[
Hi Everyone,<br><br>RE: BULLET SERIALIZATION <br><br>I have seen that there is a Collada converter which allows the persistent storage of the Bullet system, but there are a couple of drawbacks:<br>- not all Bullet shapes are (yet) supported, eg the btCapsuleShape as used in the Ragdoll Bullet demo is not supported.<br>- there does not appear to be any way to link the serialized Bullet objects to other code (via a unique identifier system?), eg if you have another external class instance associated with a btRigidBody, how to you re-associate once the Bullet system has been read in from the .dae file?<br>- slow<br><br>An alternative, which I feel would be highly expandable (as the Bullet system evolves) would be to use the Boost serialization library.  This would overcome the problems mentioned above.  This would require that a serialize() function be written for each Bullet class, but once done, this is a very versatile system; the serialized objects could be sent to any 'media', whether that be file, clipboard, an aligned memory region or whereever.<br><br>I must say I have tried to undertake the serialization via this method of the btBoxShape (and its base class hierarchy) but have stumbled - it seems that if you try something like: BOOST_CLASS_EXPORT_GUID(btBoxShape, "btBoxShape") (in order to make this Bullet class 'visible' to the serilaization system) you get compile time errors.  These errors are due to the placement new operators defined within BT_DECLARE_ALIGNED_ALLOCATOR. Instead of declaring placement new operators within this macro, an alternative could be to use the new overload declared in &lt;new&gt;, eg<br>#ifdef BT_USE_PLACEMENT_NEW<br>   <span style="color:#40FF00">//new (&amp;dest<em class="text-italics">) T(m_data<em class="text-italics">);</em></em></span><em class="text-italics"><em class="text-italics"><br>   ::new (&amp;dest<em class="text-italics">) T(m_data<em class="text-italics">);//this calls the new placement operator declared in &lt;new&gt;, line 58.<br>...<br><br>I believe this would then allow the Bullet system to be serialized via the well respected Boost library.<br><br>What do you think?<br><br>Regards,<br>Chris Simson</em></em></em></em><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=5900">Chris Simson</a> — Tue Nov 10, 2009 12:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2009-06-24T19:50:22+00:00</updated>

		<published>2009-06-24T19:50:22+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14116#p14116</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14116#p14116"/>
		<title type="html"><![CDATA[Re: Serializing to and from platform-specific binary files]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14116#p14116"><![CDATA[
I've been playing with the idea of binary serialization, and was thinking of using the chunk-based binary IFF format for this (in Bullet/Extras/iff is a first starting point for binary read/write based on IFF, with some info).<br><br>If you have another solution, that you can share with others, please let us know. We could add it in the Bullet/Extras folder.<br>Thanks,<br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Wed Jun 24, 2009 7:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[RulonR]]></name></author>
		<updated>2009-06-23T19:20:27+00:00</updated>

		<published>2009-06-23T19:20:27+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14102#p14102</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14102#p14102"/>
		<title type="html"><![CDATA[Serializing to and from platform-specific binary files]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14102#p14102"><![CDATA[
Has anyone tried to serialize Bullet objects directly to a platform specific binary data file (through reflection or otherwise)?  This avoids COLLADA, etc. but allows for the de-serialization process to be extremely fast as there are little or no allocations required, and needs only a handful of pointer fix-ups to prepare the data for runtime use.  It's a pretty daunting task to code up support for all the possible objects so I'd be very interested to hear if anyone else has tried this or if there are some tips regarding something I might have missed in the current source.  Thanks!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=5307">RulonR</a> — Tue Jun 23, 2009 7:20 pm</p><hr />
]]></content>
	</entry>
	</feed>
