4 #ifndef _HOpCameraWalk_H 5 #define _HOpCameraWalk_H 140 void OnWalk(
float requested_time,
float actual_time);
146 void OnKeyWalk(
float requested_time,
float actual_time);
148 void OnButtonWalk(
char const * action, HButtonState buttonstate);
158 static bool WalkTimerClbk(
float request_time,
float actual_time,
void * user_data);
184 void SetAvatarHeight(
float ah) { m_AvatarHeight = ah; m_bOldSnappedToGround =
false; }
209 float GetSpeed() {
return m_Speed; }
213 static float CalculateExtents(
HBaseView *view);
215 static int ImageAction(
HImageRegion *ii,
void *data, HButtonState keyup);
221 void ShowNavigationWindow(
const char *image_dir = 0);
225 void RemoveNavigationWindow();
227 void FitControlsToCorner();
231 void AdjustCameraCollision(
HCamera &oldcamera,
bool noextrude =
false);
232 void AdjustHeight(
HCamera &oldcamera);
234 static bool signal_callback(
int signal,
void *signal_data,
void *user_data);
236 void ReadjustPosition();
238 void SetupControls(
char forward,
char backward,
char strafe_left,
char strafe_right,
char up,
char down);
244 bool m_bOperatorCreated;
245 void ResetPosition();
247 void Walk(
bool b_forward,
bool b_backward,
bool b_left,
bool r_right,
bool b_up,
bool b_down,
double time_diff,
HCamera & oldcamera);
248 void PostWalk(HC_KEY scene_key,
bool b_forward,
bool b_backward);
249 void UpdateTilt(
HPoint const & p,
HPoint const & t,
float deg);
250 double UpdateTime(
bool first,
HCamera & lastCamera);
251 bool m_LightFollowsCamera;
257 float m_max_world_extent;
260 float m_rotate, m_move, m_tilt, m_updown, m_strafe;
269 bool m_bBlockedForward;
270 bool m_bBlockedBackward;
271 bool m_bSnappedToGround;
272 bool m_bOldSnappedToGround;
273 bool m_bKeyboardWalk;
279 float m_AvatarDiameter;
280 float m_AvatarHeight;
283 float m_totalrotateold;
286 char m_c_strafe_left;
287 char m_c_strafe_right;
291 bool m_bNavigationWindowActive;
virtual int OnLButtonDownAndMove(HEventInfo &hevent)
virtual int OnMButtonDown(HEventInfo &hevent)
virtual const char * GetName()
void SetLightFollowsCamera(bool follow)
Definition: HOpCameraWalk.h:92
void ViewDeleted()
Definition: HOpCameraWalk.h:163
float GetAvatarHeight()
Definition: HOpCameraWalk.h:202
virtual int OnLButtonUp(HEventInfo &hevent)
void SetSnapToFloor(bool s)
Definition: HOpCameraWalk.h:179
The HCamera class is the data type of a HOOPS Camera Attribute.
Definition: HUtility.h:540
Definition: HTManager.h:157
void SetStepHeightDown(float shd)
Definition: HOpCameraWalk.h:198
bool GetLightFollowsCamera()
Definition: HOpCameraWalk.h:94
virtual int OnMButtonUp(HEventInfo &hevent)
virtual HBaseOperator * Clone()
The HImageRegion class represents selectable regions inside an image panel.
Definition: HObjects.h:108
The HBaseOperator class serves as a base for classes which handle user input and operate on the scene...
Definition: HBaseOperator.h:60
void SetSpeed(float s)
Definition: HOpCameraWalk.h:208
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:121
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:332
void SetStepHeightUp(float shu)
Definition: HOpCameraWalk.h:191
virtual int OnMButtonDownAndMove(HEventInfo &hevent)
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:207
virtual int OnKeyDown(HEventInfo &hevent)
virtual int OnLButtonDown(HEventInfo &hevent)
void SetAvatarHeight(float ah)
Definition: HOpCameraWalk.h:184
void SetCollision(bool c)
Definition: HOpCameraWalk.h:174
virtual int OnMouseWheel(HEventInfo &hevent)
The HOpCameraWalk allows the user to walk "inside" of the current scene with optional collision detec...
Definition: HOpCameraWalk.h:44
void SetKeyboardWalk(bool kw)
Definition: HOpCameraWalk.h:169