void Model::RotateObject(Shape* shape, TreeObject* object, Vector4d rotate) { if (!shape) return; Vector3d rot(rotate.x(), rotate.y(), rotate.z()); shape->Rotate(rot, rotate.w()); ModelChanged(); }
void NearPlaneClipper::setup( const Matrix4f& projectionMV ) { // get normalized near plane Vector4d plane = projectionMV.get_row( 2 ) + projectionMV.get_row( 3 ); plane *= 1.0 / sqrt( plane.x()*plane.x() + plane.y()*plane.y() + plane.z()*plane.z() ); _nearPlane = Plane_d( plane.x(), plane.y(), plane.z(), plane.w() ); // move near plane slightly ahead, so that when we will draw it, it will not be clipped _nearPlane.w -= 0.001; // _nearPlane.w -= 2.0; }