Thursday, March 24, 2011

Rigid Body Project Notes

1.The volume of a sphere should be 4/3 * pi * radius * radius * radius, not radius square. Changed it in the file sphere.cpp, GetNormalMass

converted it back again. but why is it only two radiuses not three? what is the difference between the real mass and normal mass?

2.???

Vector3 RigidBody::GetPosition()
{
return m_transformation * Vector3::ZERO;
}

3. no need to multiply the inversemass?

void RigidBody::AdvanceVelocity(Vector3 const& F, float dT)
{
if(!HasInfiniteMass())
{
SetVelocity(GetVelocity() + F * dT);
}
}

4.when using an if condition to change a defined variable, be careful not to redefine it, especially when modifying but not writing initially.

5.when the program aborts, it might be the problem that the breakpoint's previous step has a numerical problem like a denominator of zero.

6.be careful about vectors, especially when load a new scene. basically we should clear all the vectors in the old scene to get a fresh one for the new, like the bodies, materials and broadPhaseTest.

7.be careful about the method and algorithm first! like the broad phase test part, the logical things were firstly messed up and caused trivial annoying bugs!(if condition, relationship between intersection list and broad phase test list...)

8.search for "for test" and delete these which are for correction test of specific processes.


No comments:

Post a Comment