<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/odforceplugins/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/odforceplugins/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 23 Feb 2006 05:13:12 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/odforceplugins/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>Re-organize source into seperate files</title><link>https://sourceforge.net/p/odforceplugins/bugs/7/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It's going to be difficult to work on the solver as a&lt;br /&gt;
group the way it's organized.  Ideally we'd break the&lt;br /&gt;
source up in logical chunks to different files to allow&lt;br /&gt;
parts of the code to version seperatly&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Kramer</dc:creator><pubDate>Thu, 23 Feb 2006 05:13:12 -0000</pubDate><guid>https://sourceforge.net6618e4c64b3f7dc522f60de6b61104f7961976eb</guid></item><item><title>Generate Contact Data</title><link>https://sourceforge.net/p/odforceplugins/bugs/6/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I notice you don't create SIM_Impacts data on the&lt;br /&gt;
objects. This is fine, and I don't even know if the ODE&lt;br /&gt;
Solver is able&lt;br /&gt;
to provide equivalent information. But if it is&lt;br /&gt;
possible, outputting&lt;br /&gt;
impacts into SIM_Impacts data would allow the ODE&lt;br /&gt;
Solver to work with&lt;br /&gt;
the SOP Solver to do denting and other such effects.&lt;br /&gt;
You also need to be&lt;br /&gt;
able to generate and respond to SIM_Impacts data to&lt;br /&gt;
work with other&lt;br /&gt;
solvers (like the cloth solver). But given the way ODE&lt;br /&gt;
handles&lt;br /&gt;
constraints, I don't know how much luck you'll have&lt;br /&gt;
generating the&lt;br /&gt;
impact information you need when one of the objects in&lt;br /&gt;
the collision is&lt;br /&gt;
cloth (a deforming triangle mesh). But this is all&lt;br /&gt;
definitely more&lt;br /&gt;
advanced funcitonality which is not required for just a&lt;br /&gt;
solid RBD Solver.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Kramer</dc:creator><pubDate>Thu, 23 Feb 2006 05:10:36 -0000</pubDate><guid>https://sourceforge.net2ba51fd9a69edc7a79514c67e33fbb4c53dbaa07</guid></item><item><title>Split up Constraint/Force Code</title><link>https://sourceforge.net/p/odforceplugins/bugs/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I would definitely split processSubData into two functions,&lt;br /&gt;
processConstraints and procesForces. processConstraints&lt;br /&gt;
should be&lt;br /&gt;
something like:&lt;/p&gt;
&lt;p&gt;// Initialize all constraints. This gives constraints a&lt;br /&gt;
chance to&lt;br /&gt;
// prepare themselves for use, such as by looking up their&lt;br /&gt;
// goal objects.&lt;br /&gt;
SIM_ConstraintIterator::initConstraints(*object, time);&lt;/p&gt;
&lt;p&gt;SIM_DataFilterByType anchorFilter("SIM_ConAnchor");&lt;br /&gt;
SIM_ConstratinIterator conit(*object, 0, &amp;amp;anchorFilter,&lt;br /&gt;
&amp;amp;anchorFilter, time);&lt;/p&gt;
&lt;p&gt;for (conit.rewind(); !conit.atEnd(); conit.advance())&lt;br /&gt;
{&lt;br /&gt;
SIM_ConRel                      *conrel;&lt;br /&gt;
const SIM_ConAnchorSpatial      *spanchor,&lt;br /&gt;
*goalspanchor;&lt;br /&gt;
const SIM_ConAnchorRotational   *rotanchor,&lt;br /&gt;
*goalrotanchor;&lt;/p&gt;
&lt;p&gt;conrel = conit.getRelationship();&lt;br /&gt;
spanchor = SIM_DATA_CASTCONST(it.getCurrentAnchor(),&lt;/p&gt;
&lt;p&gt;SIM_ConAnchorSpatial);&lt;br /&gt;
goalspanchor =&lt;br /&gt;
SIM_DATA_CASTCONST(it.getGoalAnchor(),&lt;/p&gt;
&lt;p&gt;SIM_ConAnchorSpatial);&lt;br /&gt;
if( spanchor &amp;amp;&amp;amp; goalspanchor )&lt;br /&gt;
{&lt;br /&gt;
// Handle spatial constraints.&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;rotanchor =&lt;br /&gt;
SIM_DATA_CASTCONST(it.getCurrentAnchor(),&lt;/p&gt;
&lt;p&gt;SIM_ConAnchorRotational);&lt;br /&gt;
goalrotanchor =&lt;br /&gt;
SIM_DATA_CASTCONST(it.getGoalAnchor(),&lt;/p&gt;
&lt;p&gt;SIM_ConAnchorRotational);&lt;br /&gt;
if( rotanchor &amp;amp;&amp;amp; goalrotanchor )&lt;br /&gt;
{&lt;br /&gt;
// Handle Rotational constraints.&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;As for forces, you don't need to handle each force type&lt;br /&gt;
individually.&lt;br /&gt;
You should use the functions on the SIM_Force base&lt;br /&gt;
class. Also, there&lt;br /&gt;
are functions for making a calback for all data that&lt;br /&gt;
matches a&lt;br /&gt;
particular data type. So processForces would look&lt;br /&gt;
something like:&lt;/p&gt;
&lt;p&gt;///&lt;br /&gt;
/// This is a helper class to iterate over all the&lt;br /&gt;
forces on an object&lt;br /&gt;
/// and sum them up.&lt;br /&gt;
///&lt;br /&gt;
class ODE_EachForceCallback : public SIM_EachDataCallback&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
ODE_EachForceCallback(const&lt;br /&gt;
UT_Vector3 &amp;amp;pos,&lt;br /&gt;
const&lt;br /&gt;
UT_Vector3 &amp;amp;vel,&lt;br /&gt;
const&lt;br /&gt;
UT_Vector3 &amp;amp;angvel,&lt;br /&gt;
const fpreal&lt;br /&gt;
mass,&lt;br /&gt;
UT_Vector3&lt;br /&gt;
&amp;amp;force,&lt;br /&gt;
UT_Vector3&lt;br /&gt;
&amp;amp;torque)&lt;br /&gt;
: myPosition(pos),&lt;br /&gt;
myVelocity(vel),&lt;br /&gt;
myAngVel(angvel),&lt;br /&gt;
myMass(mass),&lt;br /&gt;
myForce(force),&lt;br /&gt;
myTorque(torque)&lt;br /&gt;
{ }&lt;br /&gt;
virtual                     ~ODE_EachForceCallback()&lt;br /&gt;
{ }&lt;/p&gt;
&lt;p&gt;virtual void                 callbackConst(const&lt;br /&gt;
SIM_Data *data,&lt;br /&gt;
const&lt;br /&gt;
char *name);&lt;/p&gt;
&lt;p&gt;private:&lt;br /&gt;
UT_Vector3                   myPosition;&lt;br /&gt;
UT_Vector3                   myVelocity;&lt;br /&gt;
UT_Vector3                   myAngVel;&lt;br /&gt;
fpreal                       myMass;&lt;br /&gt;
UT_Vector3                  &amp;amp;myForce;&lt;br /&gt;
UT_Vector3                  &amp;amp;myTorque;&lt;br /&gt;
};&lt;/p&gt;
&lt;p&gt;void&lt;br /&gt;
ODE_EachForceCallback::callbackConst(const SIM_Data&lt;br /&gt;
*data, const char *)&lt;br /&gt;
{&lt;br /&gt;
const SIM_Force     *forcedata =&lt;br /&gt;
SIM_DATA_CASTCONST(data,&lt;/p&gt;
&lt;p&gt;SIM_Force);&lt;br /&gt;
UT_Vector3           force, torque;&lt;/p&gt;
&lt;p&gt;forcedata-&amp;gt;getForce(myPosition, myVelocity, myAngVel,&lt;br /&gt;
myMass, force, torque);&lt;br /&gt;
myForce += force;&lt;br /&gt;
myTorque += torque;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;processForces(SIM_Object *object)&lt;br /&gt;
{&lt;br /&gt;
// Grab the velocity, angular velocity, mass,&lt;br /&gt;
and center of&lt;br /&gt;
// mass fromthe object (from the Position data).&lt;/p&gt;
&lt;p&gt;UT_Vector3      sumforces(0.0, 0.0, 0.0);&lt;br /&gt;
UT_Vector3      sumtorque(0.0, 0.0, 0.0);&lt;br /&gt;
ODE_EachForceCallback            callback(com,&lt;br /&gt;
vel,&lt;br /&gt;
angvel,&lt;br /&gt;
mass,&lt;br /&gt;
sumforces,&lt;br /&gt;
sumtorques);&lt;/p&gt;
&lt;p&gt;object-&amp;gt;getObject()-&amp;gt;forEachConstSubData(callback,&lt;/p&gt;
&lt;p&gt;SIM_DataFilterByType("SIM_Force"),&lt;br /&gt;
SIM_FORCES_DATANAME,&lt;br /&gt;
SIM_DataFilterNone());&lt;/p&gt;
&lt;p&gt;// Apply sumforces and sumtorques to object...&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;I also noticed you calling getNthConstSubData to grab&lt;br /&gt;
the force and&lt;br /&gt;
constraint data. You should avoid this function&lt;br /&gt;
whenever possible. If&lt;br /&gt;
you call this function for each subdata, you've created&lt;br /&gt;
an O(n^2)&lt;br /&gt;
algorithm on the number of subdata.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Kramer</dc:creator><pubDate>Thu, 23 Feb 2006 05:09:35 -0000</pubDate><guid>https://sourceforge.netb50caacef098a5450d10a0af15daaff2475b870f</guid></item><item><title>Simplify Constraint/Force Iteration</title><link>https://sourceforge.net/p/odforceplugins/bugs/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;You can probably simplify the code for dealing with&lt;br /&gt;
constraints a lot by using the SIM_ConstraintIterator&lt;br /&gt;
class. It provides&lt;br /&gt;
an interface to loop through all constraints of a&lt;br /&gt;
particular type. It&lt;br /&gt;
should be easier than looping through the constraints&lt;br /&gt;
yourself. You&lt;br /&gt;
should also never have to go through the&lt;br /&gt;
"getQueryObject" functionin the&lt;br /&gt;
solver code. You have the following code:&lt;/p&gt;
&lt;p&gt;goalAnchor-&amp;gt;getQueryObject().getFieldString ("Options",&lt;br /&gt;
0, "objectname",&lt;br /&gt;
goalObjName);&lt;/p&gt;
&lt;p&gt;Which works fine, but is much slower than:&lt;/p&gt;
&lt;p&gt;goalobj = goalAnchor-&amp;gt;getReferencedObject(time);&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Kramer</dc:creator><pubDate>Thu, 23 Feb 2006 05:08:31 -0000</pubDate><guid>https://sourceforge.net31515cd200d02de9f74f24de72c4b794150f1f9f</guid></item><item><title>Deleting ODE World and Bodies</title><link>https://sourceforge.net/p/odforceplugins/bugs/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I also notice that m_odeBodies.clear() probably doesn't&lt;br /&gt;
free the ODE&lt;br /&gt;
bodies, and deleting m_odeGlobals doesn't delete the&lt;br /&gt;
ODE World. That&lt;br /&gt;
should probably be fixed too in the clear() function...&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Kramer</dc:creator><pubDate>Thu, 23 Feb 2006 05:06:46 -0000</pubDate><guid>https://sourceforge.netc657300f1a1874254ea1e24cc03afe2651beb3fc</guid></item><item><title>mySIM_Geometry on line 351</title><link>https://sourceforge.net/p/odforceplugins/bugs/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;As a final note on mySIM_Geometry, on line 351 you cast&lt;br /&gt;
a "const&lt;br /&gt;
SIM_Geometry *" to a "mySIM_Geometry *", which you&lt;br /&gt;
should never ever do&lt;br /&gt;
with the SIM library. Even though in this case the cast to&lt;br /&gt;
mySIM_Geometry is safe (since mySIM_Geometry has no&lt;br /&gt;
virtual functions or&lt;br /&gt;
member data), the casting away of the const is a mortal&lt;br /&gt;
sin in DOPs.&lt;br /&gt;
Doing so lets you modify data that is shared by&lt;br /&gt;
mutliple objects, or&lt;br /&gt;
used inthe cache (so you are modifying data back in&lt;br /&gt;
time). If you do&lt;br /&gt;
find that you need the funtionality provided by&lt;br /&gt;
mySIM_Geometry::setGdp,&lt;br /&gt;
I would suggest you use code like this:&lt;/p&gt;
&lt;p&gt;SIM_GeometryCopy        *modgeo;&lt;/p&gt;
&lt;p&gt;modgeo = SIM_DATA_CREATE(*currObject,&lt;br /&gt;
SIM_GEOMETRY_DATANAME,&lt;br /&gt;
SIM_GeometryCopy, SIM_DATA_RETURN_EXISTING |&lt;br /&gt;
SIM_DATA_ADOPT_EXISTING_ON_DELETE);&lt;br /&gt;
if( modgeo )&lt;br /&gt;
{&lt;br /&gt;
GU_Detail *modgdp = modgeo-&amp;gt;lockGeometry();&lt;br /&gt;
// modify modgdp any way you want&lt;br /&gt;
modgeo-&amp;gt;releaseGeometry();&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Kramer</dc:creator><pubDate>Thu, 23 Feb 2006 05:05:42 -0000</pubDate><guid>https://sourceforge.net7e2c7a9a31f20a9bd413a403f7a5436c06bcca65</guid></item><item><title>Remove Global Data </title><link>https://sourceforge.net/p/odforceplugins/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Currently we're defining global data for "m_odeGlobals"&lt;br /&gt;
and "m_odeBodies".  These should be defined as SubData&lt;br /&gt;
to allow for multiple ODESolvers to run in a hip sim.&lt;/p&gt;
&lt;p&gt;Here's some advice from Mark Tucker:&lt;/p&gt;
&lt;p&gt;I would suggest creating a SIM_Data subclass to hold&lt;br /&gt;
this information instead. Somthing like this:&lt;/p&gt;
&lt;p&gt;class SIM_OdeWorldData : public SIM_Data&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
odeGlobals              &amp;amp;getOrCreateOdeGlobals()&lt;br /&gt;
{ return m_odeGlobals; }&lt;br /&gt;
std::map&amp;lt;int, odeBody&amp;gt;          &amp;amp;getOdeBodies()&lt;br /&gt;
{ return m_odeBodies; }&lt;/p&gt;
&lt;p&gt;protected:&lt;br /&gt;
explicit SIM_OdeWorldData(const SIM_DataFactory&lt;br /&gt;
*factory)&lt;br /&gt;
: BaseClass(factory),&lt;br /&gt;
m_odeBodies(0),&lt;br /&gt;
m_odeGlobals(0),&lt;br /&gt;
m_shareCount(0)&lt;br /&gt;
{ }&lt;br /&gt;
virtual ~SIM_OdeWorldData()&lt;br /&gt;
{ clear(); }&lt;/p&gt;
&lt;p&gt;// This ensures that this data is always kept in&lt;br /&gt;
RAM, even when&lt;br /&gt;
// the cache runs out of space and writes out&lt;br /&gt;
the simulation&lt;br /&gt;
// step to disk. This is necessary because the&lt;br /&gt;
ODE data can't&lt;br /&gt;
// be written to disk.&lt;br /&gt;
virtual bool getCanBeSavedToDiskSubclass() const&lt;br /&gt;
{ return false; }&lt;/p&gt;
&lt;p&gt;// Start fro scratch. We create a brand new world.&lt;br /&gt;
virtual void initiailizeSubclass()&lt;br /&gt;
{&lt;br /&gt;
clear();&lt;br /&gt;
m_odeBodies = new&lt;br /&gt;
std::map&amp;lt;int,&lt;/p&gt;
&lt;p&gt;odeBody&amp;gt;();&lt;br /&gt;
m_odeGlobals = new&lt;br /&gt;
odeGlobals();&lt;br /&gt;
m_shareCount = new int(1);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;// To make one world equal to another, copythe&lt;br /&gt;
data exactly.&lt;br /&gt;
// The share count lets several of these data&lt;br /&gt;
share the same&lt;br /&gt;
// ODE world and bodies without worrying that&lt;br /&gt;
the ODE data&lt;br /&gt;
// will get deleted as long as any&lt;br /&gt;
SIM_OdeWorldData is holding&lt;br /&gt;
// onto it.&lt;br /&gt;
virtual void makeEqualSubclass(const SIM_Data *src)&lt;br /&gt;
{&lt;br /&gt;
SIM_OdeWorldData *world;&lt;br /&gt;
world = SIM_DATA_CASTCONST(src,&lt;br /&gt;
SIM_OdeWorldData);&lt;br /&gt;
if( world )&lt;br /&gt;
{&lt;br /&gt;
clear();&lt;br /&gt;
m_shareCount =&lt;br /&gt;
world-&amp;gt;m_shareCount;&lt;br /&gt;
m_odeBodies =&lt;br /&gt;
world-&amp;gt;m_odeBodies;&lt;br /&gt;
m_odeGlobals =&lt;br /&gt;
world-&amp;gt;m_odeGlobals;&lt;br /&gt;
(*m_shareCount)++;&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;private:&lt;br /&gt;
void             clear()&lt;br /&gt;
{&lt;br /&gt;
if( m_shareCount )&lt;br /&gt;
{&lt;br /&gt;
(*m_shareCount)--;&lt;br /&gt;
if(*m_shareCount&lt;br /&gt;
== 0)&lt;br /&gt;
{&lt;/p&gt;
&lt;p&gt;m_odeBodies.clear();&lt;br /&gt;
delete&lt;br /&gt;
m_odeGlobals;&lt;br /&gt;
delete&lt;br /&gt;
m_shareCount;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
m_shareCount = 0;&lt;br /&gt;
m_odeGlobals = 0;&lt;br /&gt;
m_odeBodies = 0;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;std::map&amp;lt;int, odeBody&amp;gt;  *m_odeBodies;&lt;br /&gt;
odeGlobals              *m_odeGlobals;&lt;br /&gt;
int                     *m_shareCount;&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Kramer</dc:creator><pubDate>Thu, 23 Feb 2006 04:59:51 -0000</pubDate><guid>https://sourceforge.net32727e8e701fe99c6b36d57d7920de65fc6ec8af</guid></item></channel></rss>