KWin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KWin::Motion< T > Class Template Reference

#include <motionmanager.h>

Public Member Functions

 Motion (T initial, double strength, double smoothness)
 
 Motion (const Motion< T > &other)
 
 ~Motion ()
 
value () const
 
void setValue (const T value)
 
target () const
 
void setTarget (const T target)
 
velocity () const
 
void setVelocity (const T velocity)
 
double strength () const
 
void setStrength (const double strength)
 
double smoothness () const
 
void setSmoothness (const double smoothness)
 
startValue ()
 
distance () const
 
void calculate (const int msec)
 
void finish ()
 

Detailed Description

template<typename T>
class KWin::Motion< T >

Definition at line 20 of file motionmanager.h.

Constructor & Destructor Documentation

◆ Motion() [1/2]

template<typename T >
KWin::Motion< T >::Motion ( T initial,
double strength,
double smoothness )
explicit

Creates a new motion object. "Strength" is the amount of acceleration that is applied to the object when the target changes and "smoothness" relates to how fast the object can change its direction and speed.

Definition at line 311 of file motionmanager.h.

◆ Motion() [2/2]

template<typename T >
KWin::Motion< T >::Motion ( const Motion< T > & other)

Creates an exact copy of another motion object, including position, target and velocity.

Definition at line 322 of file motionmanager.h.

◆ ~Motion()

template<typename T >
KWin::Motion< T >::~Motion ( )

Definition at line 333 of file motionmanager.h.

Member Function Documentation

◆ calculate()

template<typename T >
void KWin::Motion< T >::calculate ( const int msec)

Calculates the new position if not at the target. Called once per frame only.

Definition at line 338 of file motionmanager.h.

◆ distance()

template<typename T >
T KWin::Motion< T >::distance ( ) const
inline

The distance between the current position and the target.

Definition at line 87 of file motionmanager.h.

◆ finish()

template<typename T >
void KWin::Motion< T >::finish ( )

Place the object on top of the target immediately, bypassing all movement calculation.

Definition at line 355 of file motionmanager.h.

◆ setSmoothness()

template<typename T >
void KWin::Motion< T >::setSmoothness ( const double smoothness)
inline

Definition at line 75 of file motionmanager.h.

◆ setStrength()

template<typename T >
void KWin::Motion< T >::setStrength ( const double strength)
inline

Definition at line 67 of file motionmanager.h.

◆ setTarget()

template<typename T >
void KWin::Motion< T >::setTarget ( const T target)
inline

Definition at line 49 of file motionmanager.h.

◆ setValue()

template<typename T >
void KWin::Motion< T >::setValue ( const T value)
inline

Definition at line 41 of file motionmanager.h.

◆ setVelocity()

template<typename T >
void KWin::Motion< T >::setVelocity ( const T velocity)
inline

Definition at line 58 of file motionmanager.h.

◆ smoothness()

template<typename T >
double KWin::Motion< T >::smoothness ( ) const
inline

Definition at line 71 of file motionmanager.h.

◆ startValue()

template<typename T >
T KWin::Motion< T >::startValue ( )
inline

Definition at line 79 of file motionmanager.h.

◆ strength()

template<typename T >
double KWin::Motion< T >::strength ( ) const
inline

Definition at line 63 of file motionmanager.h.

◆ target()

template<typename T >
T KWin::Motion< T >::target ( ) const
inline

Definition at line 45 of file motionmanager.h.

◆ value()

template<typename T >
T KWin::Motion< T >::value ( ) const
inline

Definition at line 37 of file motionmanager.h.

◆ velocity()

template<typename T >
T KWin::Motion< T >::velocity ( ) const
inline

Definition at line 54 of file motionmanager.h.


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