bool Uniform::setElement( unsigned int index, const osg::Matrixd& m4 ) { if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT4) ) return false; unsigned int j = index * getTypeNumComponents(getType()); const Matrixd::value_type* p = m4.ptr(); for( int i = 0; i < 16; ++i ) (*_floatArray)[j+i] = static_cast<float>(p[i]); dirty(); return true; }
virtual void apply(const osg::Matrixd& value) { for(unsigned int i=0; i<16; ++i) _stream << (value.ptr())[i]; }
void osg::Matrixf::set(const osg::Matrixd& rhs) { set(rhs.ptr()); }
osg::Matrixf::Matrixf( const osg::Matrixd& mat ) { set(mat.ptr()); }