Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
qpe::QuantumViewCamera2D Class Reference

Implements the Quantum View Camera2D component. More...

#include <quantumviewcamera2d.h>

Public Member Functions

void setDomain (float width, float height)
 Sets domain.
 
void reset ()
 Resets the component to its initial state.
 
float zoom () const
 Carries out zoom.
 
float centerX () const
 Carries out center x.
 
float centerY () const
 Carries out center y.
 
float domainWidth () const
 Carries out domain width.
 
float domainHeight () const
 Carries out domain height.
 
float viewWidth () const
 Carries out view width.
 
float viewHeight () const
 Carries out view height.
 
float maxZoom () const
 Carries out max zoom.
 
bool zoomAtNormalized (float factor, double u, double v)
 Carries out max.
 
void panPhysical (float dx, float dy)
 Carries out clamp center.
 
void physicalFromNormalized (double u, double v, float &x, float &y) const
 Carries out physical from normalized.
 
void normalizedFromPhysical (float x, float y, double &u, double &v) const
 Returns normalized from physical.
 
float textureScaleX () const
 Carries out texture scale x.
 
float textureScaleY () const
 Carries out texture scale y.
 
float textureOffsetX () const
 Carries out max.
 
float textureOffsetY () const
 Performs texture offset y.
 

Private Member Functions

void clampCenter ()
 Performs clamp center.
 

Private Attributes

float domainWidth_ = 0.0f
 
float domainHeight_ = 0.0f
 
float zoom_ = 1.0f
 
float centerX_ = 0.0f
 
float centerY_ = 0.0f
 

Detailed Description

Implements the Quantum View Camera2D component.

The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.

Definition at line 26 of file quantumviewcamera2d.h.

Member Function Documentation

◆ centerX()

float qpe::QuantumViewCamera2D::centerX ( ) const
inline

Carries out center x.

Definition at line 81 of file quantumviewcamera2d.h.

References centerX_.

Referenced by QuantumGLView::drawProbabilityCurrentVectors(), and qpe::tests::runQuantumViewCamera2DTests().

◆ centerY()

float qpe::QuantumViewCamera2D::centerY ( ) const
inline

Carries out center y.

Definition at line 85 of file quantumviewcamera2d.h.

References centerY_.

Referenced by QuantumGLView::drawProbabilityCurrentVectors(), and qpe::tests::runQuantumViewCamera2DTests().

◆ clampCenter()

void qpe::QuantumViewCamera2D::clampCenter ( )
inlineprivate

Performs clamp center.

Parameters
fThe f value used by the operation.

Performs max.

Parameters
fThe f value used by the operation.
viewWidthThe view width value used by the operation.

Carries out max.

Parameters
fThe f value used by the operation.
viewHeightThe view height value used by the operation.

Carries out max.

Parameters
maxCenterXThe max center x value used by the operation.
centerX_The center x value used by the operation.

Carries out max.

Parameters
maxCenterYThe max center y value used by the operation.
centerY_The center y value used by the operation.

Definition at line 264 of file quantumviewcamera2d.h.

References centerX_, centerY_, domainHeight_, domainWidth_, viewHeight(), viewWidth(), and zoom_.

Referenced by panPhysical(), setDomain(), and zoomAtNormalized().

◆ domainHeight()

float qpe::QuantumViewCamera2D::domainHeight ( ) const
inline

Carries out domain height.

Definition at line 93 of file quantumviewcamera2d.h.

References domainHeight_.

Referenced by qpe::tests::runQuantumViewCamera2DTests().

◆ domainWidth()

float qpe::QuantumViewCamera2D::domainWidth ( ) const
inline

Carries out domain width.

Definition at line 89 of file quantumviewcamera2d.h.

References domainWidth_.

Referenced by qpe::tests::runQuantumViewCamera2DTests().

◆ maxZoom()

float qpe::QuantumViewCamera2D::maxZoom ( ) const
inline

Carries out max zoom.

Definition at line 105 of file quantumviewcamera2d.h.

Referenced by zoomAtNormalized().

◆ normalizedFromPhysical()

void qpe::QuantumViewCamera2D::normalizedFromPhysical ( float x,
float y,
double & u,
double & v ) const
inline

Returns normalized from physical.

Parameters
xX coordinate/value.
yY coordinate/value.
uThe u value used by the operation.
viewWidthThe view width value used by the operation.

Performs view height.

Definition at line 208 of file quantumviewcamera2d.h.

References centerX_, centerY_, viewHeight(), and viewWidth().

Referenced by QuantumGLView::physicalPointToWidget().

◆ panPhysical()

void qpe::QuantumViewCamera2D::panPhysical ( float dx,
float dy )
inline

Carries out clamp center.

Parameters
dxThe dx value used by the operation.
fThe f value used by the operation.

Performs clamp center.

Definition at line 172 of file quantumviewcamera2d.h.

References centerX_, centerY_, clampCenter(), domainHeight_, and domainWidth_.

Referenced by QuantumGLView::mouseMoveEvent(), and qpe::tests::runQuantumViewCamera2DTests().

◆ physicalFromNormalized()

void qpe::QuantumViewCamera2D::physicalFromNormalized ( double u,
double v,
float & x,
float & y ) const
inline

Carries out physical from normalized.

Parameters
uThe u value used by the operation.
vThe v value used by the operation.
xX coordinate/value.
viewWidthThe view width value used by the operation.

Performs view height.

Definition at line 192 of file quantumviewcamera2d.h.

References centerX_, centerY_, viewHeight(), and viewWidth().

Referenced by qpe::tests::runQuantumViewCamera2DTests(), QuantumGLView::widgetPointToPhysical(), and zoomAtNormalized().

◆ reset()

void qpe::QuantumViewCamera2D::reset ( )
inline

Resets the component to its initial state.

Definition at line 67 of file quantumviewcamera2d.h.

References centerX_, centerY_, and zoom_.

Referenced by QuantumGLView::resetCameraView(), qpe::tests::runQuantumViewCamera2DTests(), and setDomain().

◆ setDomain()

void qpe::QuantumViewCamera2D::setDomain ( float width,
float height )
inline

Sets domain.

Parameters
widthThe width value used by the operation.
widthThe width value used by the operation.

Carries out max.

Parameters
fThe f value used by the operation.
heightThe height value used by the operation.

Carries out abs.

Parameters
domainHeight_The domain height value used by the operation.

Resets the component to its initial state.

Carries out clamp center.

Definition at line 34 of file quantumviewcamera2d.h.

References clampCenter(), domainHeight_, domainWidth_, and reset().

Referenced by QuantumGLView::clearState(), qpe::tests::runQuantumViewCamera2DTests(), and QuantumGLView::setQuantumState().

◆ textureOffsetX()

float qpe::QuantumViewCamera2D::textureOffsetX ( ) const
inline

Carries out max.

Parameters
fThe f value used by the operation.

Definition at line 239 of file quantumviewcamera2d.h.

References centerX_, domainWidth_, and textureScaleX().

Referenced by QuantumGLView::applyTextureWindow(), and qpe::tests::runQuantumViewCamera2DTests().

◆ textureOffsetY()

float qpe::QuantumViewCamera2D::textureOffsetY ( ) const
inline

Performs texture offset y.

Parameters
fThe f value used by the operation.

Definition at line 251 of file quantumviewcamera2d.h.

References centerY_, domainHeight_, and textureScaleY().

Referenced by QuantumGLView::applyTextureWindow(), and qpe::tests::runQuantumViewCamera2DTests().

◆ textureScaleX()

float qpe::QuantumViewCamera2D::textureScaleX ( ) const
inline

Carries out texture scale x.

Definition at line 222 of file quantumviewcamera2d.h.

References zoom_.

Referenced by QuantumGLView::applyTextureWindow(), qpe::tests::runQuantumViewCamera2DTests(), and textureOffsetX().

◆ textureScaleY()

float qpe::QuantumViewCamera2D::textureScaleY ( ) const
inline

Carries out texture scale y.

Definition at line 230 of file quantumviewcamera2d.h.

References zoom_.

Referenced by QuantumGLView::applyTextureWindow(), qpe::tests::runQuantumViewCamera2DTests(), and textureOffsetY().

◆ viewHeight()

◆ viewWidth()

◆ zoom()

float qpe::QuantumViewCamera2D::zoom ( ) const
inline

◆ zoomAtNormalized()

bool qpe::QuantumViewCamera2D::zoomAtNormalized ( float factor,
double u,
double v )
inline

Carries out max.

Parameters
factorThe factor value used by the operation.
uThe u value used by the operation.
fThe f value used by the operation.

Performs max.

Parameters
uThe u value used by the operation.

Carries out max.

Parameters
vThe v value used by the operation.

Carries out physical from normalized.

Parameters
uThe u value used by the operation.
vThe v value used by the operation.
anchorXThe anchor x value used by the operation.
anchorYThe anchor y value used by the operation.

Carries out max.

Parameters
fThe f value used by the operation.
factorThe factor value used by the operation.

Carries out view width.

Carries out view height.

Carries out clamp center.

Definition at line 113 of file quantumviewcamera2d.h.

References centerX_, centerY_, clampCenter(), domainHeight_, domainWidth_, maxZoom(), physicalFromNormalized(), viewHeight(), viewWidth(), and zoom_.

Referenced by qpe::tests::runQuantumViewCamera2DTests(), and QuantumGLView::wheelEvent().

Member Data Documentation

◆ centerX_

float qpe::QuantumViewCamera2D::centerX_ = 0.0f
private

◆ centerY_

float qpe::QuantumViewCamera2D::centerY_ = 0.0f
private

◆ domainHeight_

float qpe::QuantumViewCamera2D::domainHeight_ = 0.0f
private

◆ domainWidth_

float qpe::QuantumViewCamera2D::domainWidth_ = 0.0f
private

◆ zoom_

float qpe::QuantumViewCamera2D::zoom_ = 1.0f
private

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