void View::onSetScale(const glm::vec3 &v) { if (mScale == v) return; mScale = v; mTransformDirty = true; // if (mHooks) mHooks->onSizeChanged(mSize); onScaleChanged(v); }
//---------------------------------------- void ofNode::setTransformMatrix(float *m44) { memcpy(localTransformMatrix._mat, m44, sizeof(float) * 16); ofQuaternion so; localTransformMatrix.decompose(position, orientation, scale, so); onPositionChanged(); onOrientationChanged(); onScaleChanged(); }
//---------------------------------------- void ofNode::setTransformMatrix(const ofMatrix4x4 &m44) { localTransformMatrix = m44; ofQuaternion so; localTransformMatrix.decompose(position, orientation, scale, so); onPositionChanged(); onOrientationChanged(); onScaleChanged(); }
void SceneObject::setScale( const VectorF &scale ) { AssertFatal( !mIsNaN( scale ), "SceneObject::setScale() - The scale is NaN!" ); // Avoid unnecessary scaling operations. if ( mObjScale.equal( scale ) ) return; mObjScale = scale; setTransform(MatrixF(mObjToWorld)); // Make sure that any subclasses of me get a chance to react to the // scale being changed. onScaleChanged(); setMaskBits( RareUpdatesMask ); }
//---------------------------------------- void ofNode::setTransformMatrix(const ofMatrix4x4 &m44) { localTransformMatrix = m44; ofVec3f position; ofQuaternion orientation; ofVec3f scale; ofQuaternion so; localTransformMatrix.decompose(position, orientation, scale, so); this->position = position; this->orientation = orientation; this->scale = scale; updateAxis(); onPositionChanged(); onOrientationChanged(); onScaleChanged(); }
//---------------------------------------- void ofNode::setTransformMatrix(const glm::mat4 &m44) { localTransformMatrix = m44; glm::vec3 scale; glm::quat orientation; glm::vec3 translation; glm::vec3 skew; glm::vec4 perspective; glm::decompose(m44, scale, orientation, translation, skew, perspective); this->position = translation; this->scale = scale; this->orientation = orientation; updateAxis(); onPositionChanged(); onOrientationChanged(); onScaleChanged(); }
//---------------------------------------- void ofNode::setScale(const glm::vec3& s) { this->scale = s; createMatrix(); onScaleChanged(); }
//---------------------------------------- void ofNode::setScale(const ofVec3f& s) { this->scale = s; createMatrix(); onScaleChanged(); }