QcFovEffect Class
The field of view widens while the player sprints and narrows again when the sprint ends, eased over a fraction of a second, like the model's "FOV effects" (decision E-280). More...
| Header: | #include <clientcore/camera/QcFovEffect.h> |
Public Types
| struct | Movement |
Public Functions
| double | advance(QcFovEffect::Movement movement, double seconds) |
| double | factor() const |
| void | setShare(double share) |
| double | share() const |
| double | target(QcFovEffect::Movement movement) const |
Static Public Members
| const double | drawNarrowing |
| double | drawShare(double drawProgress) |
| const double | easeSeconds |
| const double | flyWidening |
| const double | sprintWidening |
Detailed Description
The widening is a factor on the field of view the player chose; the setting scales it from none to full. Flying in creative mode widens it a little as well (decision E-284); drawing a bow narrows it by up to drawNarrowing with the square of the draw's share of its time (decision E-984).
Member Function Documentation
double QcFovEffect::advance(QcFovEffect::Movement movement, double seconds)
Moves the factor towards the one for movement by seconds of easing and returns it.
[static] double QcFovEffect::drawShare(double drawProgress)
Returns Movement::draw for a launcher drawn with the power drawProgress (negative when nothing is drawn: QcEntityPose::drawProgress).
double QcFovEffect::factor() const
Returns the current factor on the field of view (1 without widening).
void QcFovEffect::setShare(double share)
share of the full widening, 0..1 (the "FOV effects" setting).
See also share().
double QcFovEffect::share() const
Returns the share of the full widening (setShare()).
See also setShare().
double QcFovEffect::target(QcFovEffect::Movement movement) const
Returns the factor the easing heads for during movement.
Member Variable Documentation
const double QcFovEffect::drawNarrowing
Narrowing of the field of view at a full draw: 15 % less.
const double QcFovEffect::easeSeconds
Time constant of the easing: about 95 % of the way after 0.25 s, whatever the frame rate.