Exemplo n.º 1
0
bool InterpMotion::integrate(double dt) const
{
  if(dt > 1) dt = 1;

  tf.setQuatRotation(absoluteRotation(dt));
  tf.setTranslation(linear_vel * dt + tf1.transform(reference_p) - tf.getQuatRotation().transform(reference_p));

  return true;
}
Exemplo n.º 2
0
void Object::updateAbsolute()
{
	if (children.size() < 1) return;
	
	Pd pos = absoluteOrigin();
	Qd rot = absoluteRotation();
	set<ObjectHandle>::iterator it;
	for (it = children.begin(); it != children.end(); ++it)
	{
		(*it)->parentOrigin = pos;
		(*it)->parentRotation = rot;
	}
}