Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Camera Class Reference
+ Inheritance diagram for Camera:
Inheritance graph
[legend]
+ Collaboration diagram for Camera:
Collaboration graph
[legend]

Public Member Functions

 Camera (QPointF translation, qreal rotation, qreal scaling)
 
 Camera (QPointF translation, qreal rotation, qreal scaling, CameraEasingType type)
 
 Camera (const Camera &)
 
Camera * clone () const override
 
QTransform getView ()
 
void resetTransform ()
 
void updateViewTransform ()
 
void assign (const Camera &rhs)
 
void translate (qreal dx, qreal dy)
 
void translate (const QPointF)
 
QPointF translation () const
 
void rotate (qreal degree)
 
qreal rotation () const
 
void scale (qreal scaleValue)
 
qreal scaling () const
 
bool compare (const Camera &rhs) const
 
void setEasingType (CameraEasingType type)
 
CameraEasingType getEasingType () const
 
void setPathControlPoint (QPointF point)
 
QPointF getPathControlPoint () const
 
void setPathControlPointMoved (bool pathMoved)
 
bool pathControlPointMoved () const
 
- Public Member Functions inherited from KeyFrame
 KeyFrame (const KeyFrame &k2)
 
KeyFrame & operator= (const KeyFrame &k2)
 
int pos () const
 
void setPos (int position)
 
int length () const
 
void setLength (int len)
 
void modification ()
 
void setModified (bool b)
 
bool isModified () const
 
void setSelected (bool b)
 
bool isSelected () const
 
QString fileName () const
 
void setFileName (QString strFileName)
 
void addEventListener (KeyFrameEventListener *)
 
void removeEventListner (KeyFrameEventListener *)
 
virtual KeyFrame * clone () const
 
virtual void loadFile ()
 
virtual void unloadFile ()
 
virtual bool isLoaded () const
 
virtual quint64 memoryUsage ()
 

Private Attributes

QTransform mView
 
QPointF mTranslate
 
qreal mRotate = 0.
 
qreal mScale = 1.
 
bool mNeedUpdateView = true
 
CameraEasingType mEasingType = CameraEasingType::LINEAR
 
QPointF mPathControlPoint = QPointF()
 
bool mPathControlPointMoved = false
 

Detailed Description

Definition at line 24 of file camera.h.

Constructor & Destructor Documentation

◆ Camera() [1/4]

Camera::Camera ( )
explicit

Definition at line 19 of file camera.cpp.

◆ Camera() [2/4]

Camera::Camera ( QPointF  translation,
qreal  rotation,
qreal  scaling 
)
explicit

Definition at line 23 of file camera.cpp.

◆ Camera() [3/4]

Camera::Camera ( QPointF  translation,
qreal  rotation,
qreal  scaling,
CameraEasingType  type 
)
explicit

Definition at line 32 of file camera.cpp.

◆ Camera() [4/4]

Camera::Camera ( const Camera &  c2)
explicit

Definition at line 38 of file camera.cpp.

◆ ~Camera()

Camera::~Camera ( )
override

Definition at line 48 of file camera.cpp.

Member Function Documentation

◆ assign()

void Camera::assign ( const Camera &  rhs)

Definition at line 57 of file camera.cpp.

◆ clone()

Camera * Camera::clone ( ) const
overridevirtual

Reimplemented from KeyFrame.

Definition at line 52 of file camera.cpp.

◆ compare()

bool Camera::compare ( const Camera &  rhs) const

Definition at line 161 of file camera.cpp.

◆ getEasingType()

CameraEasingType Camera::getEasingType ( ) const
inline

Definition at line 53 of file camera.h.

◆ getPathControlPoint()

QPointF Camera::getPathControlPoint ( ) const
inline

Definition at line 56 of file camera.h.

◆ getView()

QTransform Camera::getView ( )

Definition at line 70 of file camera.cpp.

◆ pathControlPointMoved()

bool Camera::pathControlPointMoved ( ) const
inline

Definition at line 59 of file camera.h.

◆ resetTransform()

void Camera::resetTransform ( )

Definition at line 77 of file camera.cpp.

◆ rotate()

void Camera::rotate ( qreal  degree)

Definition at line 118 of file camera.cpp.

◆ rotation()

qreal Camera::rotation ( ) const
inline

Definition at line 45 of file camera.h.

◆ scale()

void Camera::scale ( qreal  scaleValue)

Definition at line 135 of file camera.cpp.

◆ scaling()

qreal Camera::scaling ( ) const
inline

Definition at line 48 of file camera.h.

◆ setEasingType()

void Camera::setEasingType ( CameraEasingType  type)

Definition at line 143 of file camera.cpp.

◆ setPathControlPoint()

void Camera::setPathControlPoint ( QPointF  point)

Definition at line 149 of file camera.cpp.

◆ setPathControlPointMoved()

void Camera::setPathControlPointMoved ( bool  pathMoved)

Definition at line 155 of file camera.cpp.

◆ translate() [1/2]

void Camera::translate ( const QPointF  pt)

Definition at line 113 of file camera.cpp.

◆ translate() [2/2]

void Camera::translate ( qreal  dx,
qreal  dy 
)

Definition at line 104 of file camera.cpp.

◆ translation()

QPointF Camera::translation ( ) const
inline

Definition at line 42 of file camera.h.

◆ updateViewTransform()

void Camera::updateViewTransform ( )

Definition at line 86 of file camera.cpp.

Member Data Documentation

◆ mEasingType

CameraEasingType Camera::mEasingType = CameraEasingType::LINEAR
private

Definition at line 68 of file camera.h.

◆ mNeedUpdateView

bool Camera::mNeedUpdateView = true
private

Definition at line 66 of file camera.h.

◆ mPathControlPoint

QPointF Camera::mPathControlPoint = QPointF()
private

Definition at line 69 of file camera.h.

◆ mPathControlPointMoved

bool Camera::mPathControlPointMoved = false
private

Definition at line 70 of file camera.h.

◆ mRotate

qreal Camera::mRotate = 0.
private

Definition at line 64 of file camera.h.

◆ mScale

qreal Camera::mScale = 1.
private

Definition at line 65 of file camera.h.

◆ mTranslate

QPointF Camera::mTranslate
private

Definition at line 63 of file camera.h.

◆ mView

QTransform Camera::mView
private

Definition at line 62 of file camera.h.


The documentation for this class was generated from the following files:
  • core_lib/src/structure/camera.h
  • core_lib/src/structure/camera.cpp
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39