コード例 #1
0
KinematicMass KinematicTree::getCOM(NodeID node) const
{
	arma::mat44 nodeToRoot = getTransitionMatrixFromTo(node, m_root->getID());
	arma::colvec4 comPos;
	KinematicMass com = getCOM();
	comPos.rows(0, 2) = com.m_position;
	comPos(3) = 1.;
	comPos = nodeToRoot * comPos;
	com.m_position = comPos.rows(0, 2);
	return com;
}
コード例 #2
0
ファイル: physics.c プロジェクト: RoaldFre/DNA
Vec3 getStrandCOM(Strand *s)
{
	return getCOM(s->all, 3*s->numMonomers);
}
コード例 #3
0
ファイル: ODE_Particle.cpp プロジェクト: saneku/ELAFoam
const dReal* ODE_Particle::getCOM_in_GlobalFrame(dVector3 &result)
{
    GetRelPointPos(getCOM()[0], getCOM()[1],getCOM()[2],result);
}