long long unsigned int multiply(long long unsigned int a, long long unsigned int b, long long unsigned int MOD) { if(bones(a) + bones(b) < 64) return (a * b) % MOD; long long unsigned int result = 0; for(long long unsigned int p = 1; p <= b; p <<= 1) { if(b & p) result = (result + a) % MOD; a = (a << 1) % MOD; } return result; }
void View::setBoneTargetMode() { if(m_targetMode == BoneTargetMode) { return; } m_targetMode = BoneTargetMode; foreach(Bone *bone, bones()) { bone->setOpacity(1); bone->setFlag(QGraphicsItem::ItemIsSelectable, true); bone->setFlag(QGraphicsItem::ItemIsMovable, true); }
void BoneHierarchy::detach_from_parent() { bones("root")->set_parent(Bone_Ptr()); }
//#################### PUBLIC METHODS #################### void BoneHierarchy::attach_to_parent(const BoneHierarchy_Ptr& parent, const std::string& parentBoneName) { Bone_Ptr parentBone = parent->bones(parentBoneName); bones("root")->set_parent(parentBone); }