示例#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;
}
示例#2
0
文件: core.cpp 项目: FerryT/OGO-2.3
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;
	}
}