#include <HTCObjectRotate.h>
Public Member Functions | |
HTCObjectRotate (HBaseView *view, int DoRepeat=0, int DoCapture=1) | |
HTCObjectRotate (HTCObjectRotate *mommy) | |
int | OnLButtonDown (HEventInfo &hevent) |
bool | OnSignal (int signal) |
void | SetDeleteOnUnRegister () |
bool | Tick (float request_time, float actual_time) |
void | UnRegister () |
Protected Attributes | |
float | m_angle |
HPoint | m_centroid |
int | m_cookie |
bool | m_delete_on_unregister |
float | m_duration |
HC_KEY | m_key |
float | m_original_matrix [16] |
bool | m_original_matrix_valid |
HC_KEY | m_segkey |
float | m_start_time |
int | m_state |
HTCObjectRotate is a reference implementation of a timer client. It is the first of what we hope will be a long list of objects to make use of the centralized timer service in MVO provided by the HTManager class. It is not necessarily meant to do anything useful except serve as an example of how it is possible to do animation in the context of MVO without completely
HTCObjectRotate::HTCObjectRotate | ( | HBaseView * | view, |
int | DoRepeat = 0 , |
||
int | DoCapture = 1 |
||
) |
constructor
HTCObjectRotate::HTCObjectRotate | ( | HTCObjectRotate * | mommy | ) |
constructor that accepts pointer to a parent HTCObjectRotate object
int HTCObjectRotate::OnLButtonDown | ( | HEventInfo & | hevent | ) | [virtual] |
Overrides HBaseOperator
Reimplemented from HBaseOperator.
bool HTCObjectRotate::OnSignal | ( | int | signal | ) |
Handles signals delivered from other objects
void HTCObjectRotate::SetDeleteOnUnRegister | ( | ) | [inline] |
Makes HTCObjectRotate clean up after itself, as opposed to having a delete call required after everything is finished
bool HTCObjectRotate::Tick | ( | float | request_time, |
float | actual_time | ||
) | [virtual] |
void HTCObjectRotate::UnRegister | ( | ) |
Kills the animation (and possibly deletes *this, depending on the status of m_delete_on_unregister, as described above).
float HTCObjectRotate::m_angle [protected] |
The current rotation angle
HPoint HTCObjectRotate::m_centroid [protected] |
Centroid of segment to be rotated in object space
int HTCObjectRotate::m_cookie [protected] |
The key that needs to be passed to HBaseView::UnSetEventNotify()
bool HTCObjectRotate::m_delete_on_unregister [protected] |
If true, object will delete(this) upon UnRegister
float HTCObjectRotate::m_duration [protected] |
The length of the animation
HC_KEY HTCObjectRotate::m_key [protected] |
The object getting rotated. Can be geometry or segment.
float HTCObjectRotate::m_original_matrix[16] [protected] |
The original modelling matrix in the m_segkey segment, if applicable. Left uninitialized if !m_original_matrix_valid
bool HTCObjectRotate::m_original_matrix_valid [protected] |
If true, m_segkey contained a modelling matrix at the start that needs preserving
HC_KEY HTCObjectRotate::m_segkey [protected] |
The key of the object's owner segment, into which modelling matrices are put (or possibly the same as m_key, if m_key itself refers to a segment)
float HTCObjectRotate::m_start_time [protected] |
The time at which the animation started, as reported by HC_Show_Time
int HTCObjectRotate::m_state [protected] |
An identifier to describe the current state of the animation. Legal values are HTCOR_Resting and HTCOR_Animating.