fn update_vectors(&mut self) {
        let yaw = self.yaw.to_radians();
        let pitch = self.pitch.to_radians();

        // euler angle rotation woo!  todo: replace
        let direction = glm::vec3(
            yaw.cos() * pitch.cos(),
            pitch.sin(),
            yaw.sin() * pitch.cos(),
        );
        self.front = glm::normalize(&direction);

        // update the direction vectors based upon the new camera location
        self.right = glm::normalize(&glm::cross(&self.front, &self.world_up));
        self.up = glm::normalize(&glm::cross(&self.right, &self.front));
    }
/// re-calculate internal vectors, should be run every time one of the
/// vectors is changed, so the view methods work correctly
re-calculate internal vectors, should be run every time one of the
vectors is changed, so the view methods work correctly
re - calculate internal vectors should be run every time one of the vectors is changed so the view methods work correctly
fn update_vectors(&mut self) {
        let yaw = self.yaw.to_radians();
        let pitch = self.pitch.to_radians();
        // euler angle rotation woo!  todo: replace
        let direction = glm::vec3(
            yaw.cos() * pitch.cos(),
            pitch.sin(),
            yaw.sin() * pitch.cos(),
        );
        self.front = glm::normalize(&direction);
        // update the direction vectors based upon the new camera location
        self.right = glm::normalize(&glm::cross(&self.front, &self.world_up));
        self.up = glm::normalize(&glm::cross(&self.right, &self.front));
    }
fn update_vectors ( & mut self ) { let yaw = self . yaw . to_radians ( ) ; let pitch = self . pitch . to_radians ( ) ; // euler angle rotation woo!  todo: replace let direction = glm :: vec3 ( yaw . cos ( ) * pitch . cos ( ) , pitch . sin ( ) , yaw . sin ( ) * pitch . cos ( ) , ) ; self . front = glm :: normalize ( & direction ) ; // update the direction vectors based upon the new camera location self . right = glm :: normalize ( & glm :: cross ( & self . front , & self . world_up ) ) ; self . up = glm :: normalize ( & glm :: cross ( & self . right , & self . front ) ) ; }
re-calculate internal vectors, should be run every time one of the
vectors is changed, so the view methods work correctly
re - calculate internal vectors should be run every time one of the vectors is changed so the view methods work correctly
&mut self
&mut self