00001 // 00002 // Copyright (c) 2000 by Tech Soft 3D, LLC. 00003 // The information contained herein is confidential and proprietary to 00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under 00005 // civil and criminal statutes. Tech Soft 3D shall pursue its civil 00006 // and criminal remedies in the event of unauthorized use or misappropriation 00007 // of its trade secrets. Use of this information by anyone other than 00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a 00009 // written non-disclosure agreement, expressly prescribing the scope and 00010 // manner of such use. 00011 // 00012 // $Id$ 00013 // 00014 #ifndef _H_HTCOR_H 00015 #define _H_HTCOR_H 00016 00017 #ifdef H_PACK_8 00018 #pragma pack(push) 00019 #pragma pack(8) 00020 #endif 00021 00022 00023 #include "HTools.h" 00024 #include "HBaseOperator.h" 00025 #include "HTManager.h" 00026 00028 enum HTCOR_State { 00029 HTCOR_Resting, 00030 HTCOR_Animating 00031 }; 00032 00033 00037 class MVO_API HTCObjectRotate : public HBaseOperator, public HTClient 00038 { 00039 public: 00041 HTCObjectRotate (HBaseView* view, int DoRepeat=0, int DoCapture=1); 00043 HTCObjectRotate( HTCObjectRotate *mommy ); 00044 ~HTCObjectRotate(); 00045 int OnLButtonDown (HEventInfo &hevent); 00046 bool Tick( float request_time, float actual_time ); 00047 void SetDeleteOnUnRegister() { m_delete_on_unregister = true; } 00048 void UnRegister (); 00049 bool OnSignal( int signal ); 00051 protected: 00052 int m_state; 00053 float m_angle; 00054 float m_duration; 00055 float m_start_time; 00056 HC_KEY m_key; 00057 HC_KEY m_segkey; 00058 HPoint m_centroid; 00059 bool m_delete_on_unregister; 00060 bool m_original_matrix_valid; 00061 float m_original_matrix[16]; 00062 int m_cookie; 00064 private: 00070 void RotateSegmentLocally ( HC_KEY key, HPoint *axis, HPoint *centroid, float theta ); 00075 bool GetSelection( HEventInfo &hevent, HC_KEY *key ); 00079 void Animate( HC_KEY key ); 00082 bool SearchAndDestroyHTCOR( HC_KEY key ); 00087 static bool signal_callback( int hevent, void * signal_data, void *user_data ); 00088 }; 00089 00090 00091 #ifdef H_PACK_8 00092 #pragma pack(pop) 00093 #endif 00094 00095 #endif 00096 00097 00098 00099