PowerOfSqrtTwoZoomConstraint Class Reference

#include <PowerOfSqrtTwoZoomConstraint.h>

Inheritance diagram for PowerOfSqrtTwoZoomConstraint:
Inheritance graph
Collaboration diagram for PowerOfSqrtTwoZoomConstraint:
Collaboration graph

Public Types

enum  RoundingDirection { RoundDown, RoundUp, RoundNearest }
 

Public Member Functions

virtual ZoomLevel getNearestZoomLevel (ZoomLevel requested, RoundingDirection dir=RoundNearest) const override
 Given an "ideal" zoom level (frames per pixel or pixels per frame) for a given zoom level, return the nearest viable block size for this constraint. More...
 
virtual int getMinCachePower () const
 
virtual int getNearestBlockSize (int requestedBlockSize, int &type, int &power, RoundingDirection dir=RoundNearest) const
 
virtual ZoomLevel getMinZoomLevel () const
 Return the minimum zoom level within range for this constraint. More...
 
virtual ZoomLevel getMaxZoomLevel () const
 Return the maximum zoom level within range for this constraint. More...
 

Detailed Description

Definition at line 21 of file PowerOfSqrtTwoZoomConstraint.h.

Member Enumeration Documentation

Enumerator
RoundDown 
RoundUp 
RoundNearest 

Definition at line 37 of file ZoomConstraint.h.

Member Function Documentation

ZoomLevel PowerOfSqrtTwoZoomConstraint::getNearestZoomLevel ( ZoomLevel  requestedZoomLevel,
RoundingDirection  = RoundNearest 
) const
overridevirtual

Given an "ideal" zoom level (frames per pixel or pixels per frame) for a given zoom level, return the nearest viable block size for this constraint.

For example, if a block size of 1523 frames per pixel is requested but the underlying model only supports value summaries at powers-of-two block sizes, return 1024 or 2048 depending on the rounding direction supplied.

Reimplemented from ZoomConstraint.

Definition at line 25 of file PowerOfSqrtTwoZoomConstraint.cpp.

References ZoomLevel::FramesPerPixel, ZoomConstraint::getMinZoomLevel(), getNearestBlockSize(), ZoomLevel::level, ZoomConstraint::RoundDown, ZoomConstraint::RoundUp, and ZoomLevel::zone.

virtual int PowerOfSqrtTwoZoomConstraint::getMinCachePower ( ) const
inlinevirtual
int PowerOfSqrtTwoZoomConstraint::getNearestBlockSize ( int  requestedBlockSize,
int &  type,
int &  power,
RoundingDirection  dir = RoundNearest 
) const
virtual
virtual ZoomLevel ZoomConstraint::getMinZoomLevel ( ) const
inlinevirtualinherited

Return the minimum zoom level within range for this constraint.

Individual views will probably want to limit this, for example in order to ensure that at least one or two samples fit in the current window size, or in order to save on interpolation cost.

Definition at line 71 of file ZoomConstraint.h.

References ZoomLevel::PixelsPerFrame.

Referenced by getNearestZoomLevel(), and PowerOfTwoZoomConstraint::getNearestZoomLevel().

virtual ZoomLevel ZoomConstraint::getMaxZoomLevel ( ) const
inlinevirtualinherited

Return the maximum zoom level within range for this constraint.

This is quite large – individual views will probably want to limit how far a user might reasonably zoom out based on other factors such as the duration of the file.

Definition at line 81 of file ZoomConstraint.h.

References ZoomLevel::FramesPerPixel.

Referenced by PowerOfTwoZoomConstraint::getNearestBlockSize(), getNearestBlockSize(), PowerOfTwoZoomConstraint::getNearestZoomLevel(), and ZoomConstraint::getNearestZoomLevel().


The documentation for this class was generated from the following files: