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