void Physics::setMomentInertia(const Vector& mi){ momentInertia_=Matrix(mi); invMomentInertia_=Matrix(Vector(RECIP(mi.x),RECIP(mi.y),RECIP(mi.z))); }
// ====================================================================== // // PackedArgb.cpp // copyright 2001 Sony Online Entertainment // // ====================================================================== #include "sharedMath/FirstSharedMath.h" #include "sharedMath/PackedArgb.h" #include "sharedMath/VectorArgb.h" // ====================================================================== const real PackedArgb::oo255 = RECIP (255); const PackedArgb PackedArgb::solidBlack (255, 0, 0, 0); const PackedArgb PackedArgb::solidBlue (255, 0, 0, 255); const PackedArgb PackedArgb::solidCyan (255, 0, 255, 255); const PackedArgb PackedArgb::solidGreen (255, 0, 255, 0); const PackedArgb PackedArgb::solidRed (255, 255, 0, 0); const PackedArgb PackedArgb::solidMagenta (255, 255, 0, 255); const PackedArgb PackedArgb::solidYellow (255, 255, 255, 0); const PackedArgb PackedArgb::solidWhite (255, 255, 255, 255); const PackedArgb PackedArgb::solidGray (255, 128, 128, 128); // ====================================================================== PackedArgb const PackedArgb::linearInterpolate(PackedArgb const & color1, PackedArgb const & color2, float const t) { return PackedArgb(