inline bool Transformation::setCoeffs( const Eigen::MatrixBase<Derived_coeffs> & coeffs) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived_coeffs, 7); parameters_ = coeffs; updateC(); return true; }
void JobShopData::calculateSAndCValuesForOperation(unsigned int operation) { unsigned int technologicalAntecessor = findTechgnologicalAntecessor(operation); unsigned int machineAntecessor = findMachineAntecessor(operation); updateS(operation, technologicalAntecessor, machineAntecessor); updateC(operation); }
inline Transformation::Transformation(const Eigen::Vector3d & r_AB, const Eigen::Quaterniond& q_AB) : r_(¶meters_[0]), q_(¶meters_[3]) { r_ = r_AB; q_ = q_AB.normalized(); updateC(); }
// Set this to a random transformation with bounded rotation and translation. inline void Transformation::setRandom(double translationMaxMeters, double rotationMaxRadians) { // Create a random unit-length axis. Eigen::Vector3d axis = rotationMaxRadians * Eigen::Vector3d::Random(); // Create a random rotation angle in radians. Eigen::Vector3d r = translationMaxMeters * Eigen::Vector3d::Random(); r_ = r; q_ = Eigen::AngleAxisd(axis.norm(), axis.normalized()); updateC(); }
inline bool Transformation::oplus( const Eigen::MatrixBase<Derived_delta> & delta) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived_delta, 6); r_ += delta.template head<3>(); Eigen::Vector4d dq; double halfnorm = 0.5 * delta.template tail<3>().norm(); dq.template head<3>() = sinc(halfnorm) * 0.5 * delta.template tail<3>(); dq[3] = cos(halfnorm); q_ = (Eigen::Quaterniond(dq) * q_); q_.normalize(); updateC(); return true; }
void UnitHandler::setLengthUnit(LengthUnit unit){ double oldConversionFactor = getLengthConversionFactor(); lengthUnit = unit; double newConversionFactor = getLengthConversionFactor(); lengthScale *= newConversionFactor/oldConversionFactor; updateC(); updateM_e(); updateM_p(); updateMu_b(); updateMu_n(); updateMu_0(); updateEpsilon_0(); }
void UnitHandler::setTimeUnit(TimeUnit unit){ double oldConversionFactor = getTimeConversionFactor(); timeUnit = unit; double newConversionFactor = getTimeConversionFactor(); timeScale *= newConversionFactor/oldConversionFactor; updateHbar(); updateC(); updateM_e(); updateM_p(); updateMu_b(); updateMu_n(); updateMu_0(); }
void Bot::update(Game *game){ if(animatedSprite->isEnabled){ switch(type){ case typeA: updateA(); break; case typeB: updateB(); break; case typeC: updateC(); break; case typeD: updateD(game); break; case typeE: updateE(game); break; } } }
inline void Transformation::set(const Eigen::Vector3d & r_AB, const Eigen::Quaternion<double> & q_AB) { r_ = r_AB; q_ = q_AB.normalized(); updateC(); }
// Setters inline void Transformation::set(const Eigen::Matrix4d & T_AB) { r_ = (T_AB.topRightCorner<3, 1>()); q_ = (T_AB.topLeftCorner<3, 3>()); updateC(); }