2 #include "BaseCamera.h" 20 enum CameraConstraintEnum
22 CameraConstraintFocus,
30 CameraConstraintEnum m_typeConstraint;
32 void SetConstraintType(CameraConstraintEnum typeC){m_typeConstraint = typeC;};
33 CameraConstraintEnum GetConstraintType(){
return m_typeConstraint;};
47 FLOAT fLookAtRadius, FLOAT fLookAtMinHeight,FLOAT fLookAtMaxHeight,
48 FLOAT fEyeRadius, FLOAT fEyeMinHeight,FLOAT fEyeMaxHeight);
53 m_typeConstraint = CameraConstraintNone;
71 ATTRIBUTE_METHOD1(
CAutoCamera, IsAlwaysRun_s,
bool*) {*p1 = cls->IsAlwaysRun();
return S_OK;}
72 ATTRIBUTE_METHOD1(
CAutoCamera, SetAlwaysRun_s,
bool) {cls->SetAlwaysRun(p1);
return S_OK;}
74 ATTRIBUTE_METHOD1(
CAutoCamera, IsCamAlwaysBehindObject_s,
bool*) {*p1 = cls->IsCamAlwaysBehindObject();
return S_OK;}
75 ATTRIBUTE_METHOD1(
CAutoCamera, SetCamAlwaysBehindObject_s,
bool) {cls->SetCamAlwaysBehindObject(p1);
return S_OK;}
77 ATTRIBUTE_METHOD1(
CAutoCamera, IsUseRightButtonBipedFacing_s,
bool*) {*p1 = cls->IsUseRightButtonBipedFacing();
return S_OK;}
78 ATTRIBUTE_METHOD1(
CAutoCamera, SetUseRightButtonBipedFacing_s,
bool) {cls->SetUseRightButtonBipedFacing(p1);
return S_OK;}
81 ATTRIBUTE_METHOD(
CAutoCamera, Reset_s) {cls->Reset();
return S_OK;}
82 ATTRIBUTE_METHOD(
CAutoCamera, FreeCameraMode_s) {cls->FreeCameraMode();
return S_OK;}
83 ATTRIBUTE_METHOD(
CAutoCamera, FollowMode_s) {cls->FollowMode();
return S_OK;}
84 ATTRIBUTE_METHOD1(
CAutoCamera, GetCameraMode_s,
int*) {*p1 = (int)(cls->GetCameraMode());
return S_OK;}
85 ATTRIBUTE_METHOD1(
CAutoCamera, SetCameraMode_s,
int) {cls->SetCameraMode((
CameraMode)p1);
return S_OK;}
87 ATTRIBUTE_METHOD1(
CAutoCamera, GetKeyboardMovVelocity_s,
float*) {*p1 = cls->GetKeyboardMovVelocity();
return S_OK;}
88 ATTRIBUTE_METHOD1(
CAutoCamera, SetKeyboardMovVelocity_s,
float) {cls->SetKeyboardMovVelocity(p1);
return S_OK;}
90 ATTRIBUTE_METHOD1(
CAutoCamera, GetKeyboardRotVelocity_s,
float*) {*p1 = cls->GetKeyboardRotVelocity();
return S_OK;}
91 ATTRIBUTE_METHOD1(
CAutoCamera, SetKeyboardRotVelocity_s,
float) {cls->SetKeyboardRotVelocity(p1);
return S_OK;}
93 ATTRIBUTE_METHOD1(
CAutoCamera, GetCameraObjectDistance_s,
double*) { *p1 = cls->GetCameraObjectDistance();
return S_OK; }
94 ATTRIBUTE_METHOD1(
CAutoCamera, SetCameraObjectDistance_s,
double) { cls->SetCameraObjectDistance(p1);
return S_OK; }
96 ATTRIBUTE_METHOD1(
CAutoCamera, GetCameraLiftupAngle_s,
double*) { *p1 = cls->GetCameraLiftupAngle();
return S_OK; }
97 ATTRIBUTE_METHOD1(
CAutoCamera, SetCameraLiftupAngle_s,
double) { cls->SetCameraLiftupAngle(p1);
return S_OK; }
99 ATTRIBUTE_METHOD1(
CAutoCamera, GetCameraRotX_s,
double*) { *p1 = cls->GetCameraRotX();
return S_OK; }
100 ATTRIBUTE_METHOD1(
CAutoCamera, SetCameraRotX_s,
double) { cls->SetCameraRotX(p1);
return S_OK; }
102 ATTRIBUTE_METHOD1(
CAutoCamera, GetCameraRotY_s,
double*) { *p1 = cls->GetCameraRotY();
return S_OK; }
103 ATTRIBUTE_METHOD1(
CAutoCamera, SetCameraRotY_s,
double) { cls->SetCameraRotY(p1);
return S_OK; }
105 ATTRIBUTE_METHOD1(
CAutoCamera, GetCameraRotZ_s,
double*) { *p1 = cls->GetCameraRotZ();
return S_OK; }
106 ATTRIBUTE_METHOD1(
CAutoCamera, SetCameraRotZ_s,
double) { cls->SetCameraRotZ(p1);
return S_OK; }
108 ATTRIBUTE_METHOD1(
CAutoCamera, GetLookAtShiftY_s,
double*) { *p1 = cls->GetLookAtShiftY();
return S_OK; }
109 ATTRIBUTE_METHOD1(
CAutoCamera, SetLookAtShiftY_s,
double) { cls->SetLookAtShiftY(p1);
return S_OK; }
111 ATTRIBUTE_METHOD1(
CAutoCamera, GetEnableKeyboard_s,
bool*) {*p1 = cls->GetEnableKeyboard();
return S_OK;}
112 ATTRIBUTE_METHOD1(
CAutoCamera, EnableKeyboard_s,
bool) {cls->EnableKeyboard(p1);
return S_OK;}
114 ATTRIBUTE_METHOD1(
CAutoCamera, GetEnableMouseLeftButton_s,
bool*) {*p1 = cls->GetEnableMouseLeftButton();
return S_OK;}
115 ATTRIBUTE_METHOD1(
CAutoCamera, EnableMouseLeftButton_s,
bool) {cls->EnableMouseLeftButton(p1);
return S_OK;}
117 ATTRIBUTE_METHOD1(
CAutoCamera, GetEnableMouseRightButton_s,
bool*) {*p1 = cls->GetEnableMouseRightButton();
return S_OK;}
118 ATTRIBUTE_METHOD1(
CAutoCamera, EnableMouseRightButton_s,
bool) {cls->EnableMouseRightButton(p1);
return S_OK;}
120 ATTRIBUTE_METHOD1(
CAutoCamera, GetEnableMouseWheel_s,
bool*) {*p1 = cls->GetEnableMouseWheel();
return S_OK;}
121 ATTRIBUTE_METHOD1(
CAutoCamera, EnableMouseWheel_s,
bool) {cls->EnableMouseWheel(p1);
return S_OK;}
123 ATTRIBUTE_METHOD1(
CAutoCamera, GetPhysicsGroupMask_s, DWORD*) {*p1 = cls->GetPhysicsGroupMask();
return S_OK;}
124 ATTRIBUTE_METHOD1(
CAutoCamera, SetPhysicsGroupMask_s, DWORD) {cls->SetPhysicsGroupMask(p1);
return S_OK;}
126 ATTRIBUTE_METHOD1(
CAutoCamera, IsEnableMouseRightDrag_s,
bool*) {*p1 = cls->IsEnableMouseRightDrag();
return S_OK;}
127 ATTRIBUTE_METHOD1(
CAutoCamera, EnableMouseRightDrag_s,
bool) {cls->EnableMouseRightDrag(p1);
return S_OK;}
129 ATTRIBUTE_METHOD1(
CAutoCamera, IsEnableMouseLeftDrag_s,
bool*) {*p1 = cls->IsEnableMouseLeftDrag();
return S_OK;}
130 ATTRIBUTE_METHOD1(
CAutoCamera, EnableMouseLeftDrag_s,
bool) {cls->EnableMouseLeftDrag(p1);
return S_OK;}
132 ATTRIBUTE_METHOD1(
CAutoCamera, IsLockMouseWhenDragging_s,
bool*) { *p1 = cls->IsLockMouseWhenDragging();
return S_OK; }
133 ATTRIBUTE_METHOD1(
CAutoCamera, SetLockMouseWhenDragging_s,
bool) { cls->SetLockMouseWhenDragging(p1);
return S_OK; }
135 ATTRIBUTE_METHOD1(
CAutoCamera, IsUseCharacterLookup_s,
bool*) {*p1 = cls->IsUseCharacterLookup();
return S_OK;}
136 ATTRIBUTE_METHOD1(
CAutoCamera, SetUseCharacterLookup_s,
bool) {cls->SetUseCharacterLookup(p1);
return S_OK;}
138 ATTRIBUTE_METHOD1(
CAutoCamera, GetAlwaysRotateCameraWhenFPS_s,
bool*) {*p1 = cls->GetAlwaysRotateCameraWhenFPS();
return S_OK;}
139 ATTRIBUTE_METHOD1(
CAutoCamera, EnableAlwaysRotateCameraWhenFPS_s,
bool) {cls->EnableAlwaysRotateCameraWhenFPS(p1);
return S_OK;}
142 ATTRIBUTE_METHOD1(
CAutoCamera, IsUseCharacterLookupWhenMounted_s,
bool*) {*p1 = cls->IsUseCharacterLookupWhenMounted();
return S_OK;}
143 ATTRIBUTE_METHOD1(
CAutoCamera, SetUseCharacterLookupWhenMounted_s,
bool) {cls->SetUseCharacterLookupWhenMounted(p1);
return S_OK;}
145 ATTRIBUTE_METHOD1(
CAutoCamera, GetCharacterLookupBoneIndex_s,
int*) {*p1 = cls->GetCharacterLookupBoneIndex();
return S_OK;}
146 ATTRIBUTE_METHOD1(
CAutoCamera, SetCharacterLookupBoneIndex_s,
int) {cls->SetCharacterLookupBoneIndex(p1);
return S_OK;}
148 ATTRIBUTE_METHOD1(
CAutoCamera, IsCameraMoved_s,
bool*) {*p1 = cls->IsCameraMoved();
return S_OK;}
150 ATTRIBUTE_METHOD1(
CAutoCamera, IsBlockInput_s,
bool*) {*p1 = cls->IsBlockInput();
return S_OK;}
151 ATTRIBUTE_METHOD1(
CAutoCamera, SetBlockInput_s,
bool) {cls->SetBlockInput(p1);
return S_OK;}
153 ATTRIBUTE_METHOD1(
CAutoCamera, GetMaxCameraObjectDistance_s,
double*) {*p1 = cls->GetMaxCameraObjectDistance();
return S_OK;}
154 ATTRIBUTE_METHOD1(
CAutoCamera, SetMaxCameraObjectDistance_s,
double) { cls->SetMaxCameraObjectDistance(p1);
return S_OK; }
156 ATTRIBUTE_METHOD1(
CAutoCamera, GetMinCameraObjectDistance_s,
double*) { *p1 = cls->GetMinCameraObjectDistance();
return S_OK; }
157 ATTRIBUTE_METHOD1(
CAutoCamera, SetMinCameraObjectDistance_s,
double) { cls->SetMinCameraObjectDistance(p1);
return S_OK; }
159 ATTRIBUTE_METHOD1(
CAutoCamera, GetCameraRollbackSpeed_s,
float*) { *p1 = cls->GetCameraRollbackSpeed();
return S_OK; }
160 ATTRIBUTE_METHOD1(
CAutoCamera, SetCameraRollbackSpeed_s,
float) { cls->SetCameraRollbackSpeed(p1);
return S_OK; }
162 ATTRIBUTE_METHOD1(
CAutoCamera, GetCameraLookatOffset_s,
Vector3*) {*p1 = cls->GetCameraLookatOffset();
return S_OK;}
163 ATTRIBUTE_METHOD1(
CAutoCamera, SetCameraLookatOffset_s,
Vector3) {cls->SetCameraLookatOffset(p1);
return S_OK;}
165 ATTRIBUTE_METHOD1(
CAutoCamera, GetAdditionalCameraRotate_s,
Vector3*) { *p1 = cls->GetAdditionalCameraRotate();
return S_OK; }
166 ATTRIBUTE_METHOD1(
CAutoCamera, SetAdditionalCameraRotate_s,
Vector3) { cls->SetAdditionalCameraRotate(p1);
return S_OK; }
168 ATTRIBUTE_METHOD1(
CAutoCamera, GetMaxYShiftSpeed_s,
float*) {*p1 = cls->GetMaxYShiftSpeed();
return S_OK;}
169 ATTRIBUTE_METHOD1(
CAutoCamera, SetMaxYShiftSpeed_s,
float) {cls->SetMaxYShiftSpeed(p1);
return S_OK;}
171 ATTRIBUTE_METHOD1(
CAutoCamera, GetMaxAllowedYShift_s,
float*) {*p1 = cls->GetMaxAllowedYShift();
return S_OK;}
172 ATTRIBUTE_METHOD1(
CAutoCamera, SetMaxAllowedYShift_s,
float) {cls->SetMaxAllowedYShift(p1);
return S_OK;}
174 ATTRIBUTE_METHOD1(
CAutoCamera, IsControlBiped_s,
bool*) { *p1 = cls->IsControlBiped();
return S_OK; }
175 ATTRIBUTE_METHOD1(
CAutoCamera, SetControlBiped_s,
bool) { cls->SetControlBiped(p1);
return S_OK; }
177 ATTRIBUTE_METHOD1(
CAutoCamera, IsEnableBlockCollision_s,
bool*) { *p1 = cls->IsEnableBlockCollision();
return S_OK; }
178 ATTRIBUTE_METHOD1(
CAutoCamera, SetEnableBlockCollision_s,
bool) { cls->SetEnableBlockCollision(p1);
return S_OK; }
180 ATTRIBUTE_METHOD1(
CAutoCamera, IsIgnoreEyeBlockCollisionInSunlight_s,
bool*) { *p1 = cls->IsIgnoreEyeBlockCollisionInSunlight();
return S_OK; }
181 ATTRIBUTE_METHOD1(
CAutoCamera, SetIgnoreEyeBlockCollisionInSunlight_s,
bool) { cls->SetIgnoreEyeBlockCollisionInSunlight(p1);
return S_OK; }
183 ATTRIBUTE_METHOD1(
CAutoCamera, GetRenderOrigin_s,
Vector3*) { *p1 = cls->GetRenderOrigin();
return S_OK; }
184 ATTRIBUTE_METHOD1(
CAutoCamera, GetViewProjMatrix_s,
Matrix4*) { *p1 = *(cls->GetViewProjMatrix());
return S_OK; }
185 ATTRIBUTE_METHOD1(
CAutoCamera, GetViewMatrix_s,
Matrix4*) { *p1 = *(cls->GetViewMatrix());
return S_OK; }
186 ATTRIBUTE_METHOD1(
CAutoCamera, GetProjMatrix_s,
Matrix4*) { *p1 = *(cls->GetProjMatrix());
return S_OK; }
188 ATTRIBUTE_METHOD(
CAutoCamera, UpdateBipedFlyDir_s) { cls->UpdateBipedFlyDir();
return S_OK; }
197 virtual VOID
FrameMove( FLOAT fElapsedTime );
202 virtual LRESULT HandleMessages(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
206 void FollowBiped(
CBaseObject* pBiped,
int nTranstionMode,
int modeCamera,
double Param0,
double Param1,
double Param2);
210 virtual void SetFollowTarget(
CBaseObject* pObj){m_pTargetObject = pObj;};
211 virtual CBaseObject* GetFollowTarget(){
return m_pTargetObject;};
220 void UpdateViewProjMatrix();
239 void SetAlwaysRun(
bool bAlwaysRun) {m_bAlwaysRun = bAlwaysRun;}
252 void SetCamAlwaysBehindObject(
bool bIsCamAlwaysBehindObject) {m_bIsCamAlwaysBehindObject = bIsCamAlwaysBehindObject;}
276 void SetUseRightButtonBipedFacing(
bool bUseRightButtonBipedFacing) {m_bUseRightButtonBipedFacing = bUseRightButtonBipedFacing;}
292 void SetLockMouseWhenDragging(
bool val);
307 float GetKeyboardMovVelocity();
315 float GetKeyboardRotVelocity();
327 bool IsStereoVisionEnabled() {
return m_bEnableStereoVision;};
331 float GetStereoEyeShiftDistance() {
return m_fStereoEyeShiftDistance;}
335 double GetCameraObjectDistance() {
return m_fCameraObjectDistance; }
339 double GetCameraLiftupAngle() {
return m_fCameraLiftupAngle;}
343 double GetCameraRotX() {
return m_fCameraRotX; }
347 double GetCameraRotY() {
return m_fCameraRotY; }
351 double GetCameraRotZ() {
return m_fCameraRotZ; }
357 double GetLookAtShiftY() {
return m_fLookAtShiftY; }
361 bool GetEnableKeyboard() {
return m_bEnableKeyboard;}
365 bool GetEnableMouseLeftButton() {
return m_bEnableMouseLeftButton;}
369 bool GetEnableMouseRightButton() {
return m_bEnableMouseRightButton;}
373 bool GetAlwaysRotateCameraWhenFPS();
377 bool GetEnableMouseWheel() {
return m_bEnableMouseWheel;}
387 void SetBlockInput(
bool bBlockInput);
391 double GetMaxCameraObjectDistance() {
return m_fMaxCameraObjectDistance; }
395 double GetMinCameraObjectDistance() {
return m_fMinCameraObjectDistance; }
399 float GetCameraRollbackSpeed() {
return m_fCameraRollbackSpeed; }
403 Vector3 GetCameraLookatOffset() {
return m_vLookAtOffset; }
407 void SetAdditionalCameraRotate(
const Vector3& val) { m_vAdditionalCameraRotate = val; }
411 void SetMaxAllowedYShift(
float fValue);
415 void SetMaxYShiftSpeed(
float fValue);
431 void SetEnableBlockCollision(
bool val);
437 void SetIgnoreEyeBlockCollisionInSunlight(
bool val) { m_bIgnoreEyeBlockCollisionInSunlight = val; }
439 virtual Vector3 GetRenderEyePosition();
446 void SetKeyDownState(CharacterAndCameraKeys nKey,
bool bIsKeyDown);
448 void SetDefaultAngles();
451 void ClearKeyStates();
454 void ClearMouseStates();
456 void SetMouseDragLock(
bool bLock);
466 bool m_bEnableKeyboard;
467 bool m_bEnableMouseLeftButton;
468 bool m_bEnableMouseRightButton;
469 bool m_bEnableMouseWheel;
480 double m_dTransitionAmt;
492 FLOAT m_fLookAtSpeed;
496 FLOAT m_fLookUpSpeed;
500 FLOAT m_fMaximumHeight;
502 FLOAT m_fMinimumHeight;
504 FLOAT m_fKeyboardRotVelocity;
506 FLOAT m_fKeyboardMovVelocity;
510 double m_fCameraObjectDistance;
512 double m_fMaxCameraObjectDistance;
514 double m_fMinCameraObjectDistance;
516 double m_fLastCameraObjectDistance;
518 double m_fCameraLiftupAngle;
520 double m_fCameraRotX;
522 double m_fCameraRotY;
524 double m_fCameraRotZ;
526 bool m_bIsCamAlwaysBehindObject;
529 double m_fLookAtShiftY;
532 float m_fCamZoomSpeed;
535 bool m_bControlBiped;
545 float m_fCameraRollbackSpeed;
548 int m_nForceNoRollbackFrames;
553 bool m_bEnableStereoVision;
556 float m_fStereoEyeShiftDistance;
559 int m_nMouseDragDistance;
562 DWORD m_dwPhysicsGroupMask;
565 bool m_bUseRightButtonBipedFacing;
568 bool m_bEnableMouseLeftDrag;
571 bool m_bEnableMouseRightDrag;
574 bool m_bUseCharacterLookup;
577 bool m_bUseCharacterLookupWhenMounted;
580 int m_nCharacterLookupBoneIndex;
583 bool m_bAlwaysRotateCameraWhenFPS;
589 bool m_resetFlyNormal;
595 bool m_bEnableBlockCollision;
600 bool m_bIgnoreEyeBlockCollisionInSunlight;
603 bool m_bLockMouseWhenDragging;
610 Vector3 m_vAdditionalCameraRotate;
613 float m_fAllowedCharYShift;
614 float m_fMaxYShiftSpeed;
616 double m_fLastUsedCharY;
void ComputeViewMatrix(Matrix4 *pOut, const DVector3 *pEye, const DVector3 *pAt, const Vector3 *pUp)
compute view matrix by coordinate in world space.
Definition: AutoCamera.cpp:1772
void SetCameraObjectDistance(double fDist)
the camera object distance after all kinds of constraints are applied.
Definition: AutoCamera.cpp:2216
void UpdateViewMatrix()
it calls ComputeViewMatrix() with the current eye settings.
Definition: AutoCamera.cpp:1805
void FollowBiped(CBaseObject *pBiped, CameraMode modeCamera, double dTransitionTime)
Desc: Get the mouse pay for object picking [in] dTransitionTime: can be 0 or greater than 0 when dTra...
Definition: AutoCamera.cpp:326
Vector3 m_vMinEye
the box within which the camera eyeat point must be
Definition: AutoCamera.h:40
bool IsBlockInput()
whether to block all user input (both key and mouse).
Definition: AutoCamera.cpp:2337
Vector3 GetRenderOrigin()
current render origin.
Definition: AutoCamera.cpp:2482
3-dimensional vector with double precision.
Definition: ParaDVector3.h:17
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
void SetCameraRotY(double fValue)
rotation of the camera around the Y axis, in the world coordinate.
Definition: AutoCamera.h:346
ShadowVolume is a structure for storing shadow volume geometries.
Definition: ShadowVolume.h:39
bool IsUseCharacterLookupWhenMounted()
Default to true.
Definition: AutoCamera.cpp:1862
Definition: BaseCamera.h:376
bool IsEnableMouseLeftDrag()
whether camera dragging with left button if enabled.
Definition: AutoCamera.h:285
CEventBinding * GetEventBinding()
Get the current event binding object.
Definition: AutoCamera.cpp:268
virtual int On_FrameMove(float fElapsedTime)
called every frame move when this character is sentient.
Definition: AutoCamera.cpp:475
void SetUseCharacterLookup(bool bUseCharacterLookup)
whether the camera look up vector will use the character look up.
Definition: AutoCamera.cpp:1857
bool IsUseCharacterLookup()
whether the camera look up vector will use the character look up.
Definition: AutoCamera.cpp:1852
bool IsLockMouseWhenDragging() const
whether to lock mouse during dragging, default to false.
Definition: AutoCamera.cpp:2249
void LoadDefaultEventBinding()
load the default camera key and mouse event binding.
Definition: AutoCamera.cpp:213
void SetCameraLiftupAngle(double fValue)
lift up angle of the camera.
Definition: AutoCamera.h:338
void EnableMouseRightDrag(bool bEnabled)
set whether camera dragging with right button if enabled.
Definition: AutoCamera.h:282
different physics engine has different winding order.
Definition: EventBinding.h:32
bool IsControlBiped() const
whether the camera is able to control the biped movement.
Definition: AutoCamera.cpp:2430
Auto Camera is designed to handle smooth transitions between supported camera type, such as first person camera, third person camera, and rotation camera.
Definition: AutoCamera.h:14
virtual const char * GetAttributeClassName()
a static string, describing the attribute class object's name
Definition: AutoCamera.h:64
bool m_bIsLastFrameChanged
true if the camera is changed since last frame
Definition: AutoCamera.h:462
void SetCameraRotX(double fValue)
rotation of the camera around the X axis, in the world coordinate.
Definition: AutoCamera.h:342
void EnableMouseRightButton(bool bValue)
whether Enable Mouse Right Button
Definition: AutoCamera.cpp:2294
CameraMode
Definition: BaseCamera.h:12
void SetMinCameraObjectDistance(double fValue)
min camera object distance when mouse wheel is used for zooming.
Definition: AutoCamera.h:394
bool IsEnableBlockCollision() const
enabled by default.
Definition: AutoCamera.cpp:2440
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
void SetStereoEyeShiftDistance(float fDist)
this is usually half of the Stereo eye separation distance.
Definition: AutoCamera.h:330
Vector3 GetAdditionalCameraRotate() const
additional camera rotation in camera space.
Definition: AutoCamera.h:406
void SetCameraRotZ(double fValue)
rotation of the camera around the Z axis, in the world coordinate.
Definition: AutoCamera.h:350
void Reset()
reset camera, without playing transitions.
Definition: AutoCamera.cpp:2221
void SetCameraLookatOffset(const Vector3 &v)
additional camera offset in camera space.
Definition: AutoCamera.h:402
void SetCameraRollbackSpeed(float fValue)
the camera roll back speed in meters per second.
Definition: AutoCamera.h:398
void EnableMouseWheel(bool bValue)
whether Enable Mouse wheel Button
Definition: AutoCamera.h:376
bool IsCameraMoved()
whether camera moved since last frame
Definition: AutoCamera.cpp:2420
bool IsUseRightButtonBipedFacing()
when set to true, the right mouse drag will change character facing when biped is standing still...
Definition: AutoCamera.h:275
void EnableMouseLeftDrag(bool bEnabled)
set whether camera dragging with left button if enabled.
Definition: AutoCamera.h:288
DWORD GetPhysicsGroupMask()
get groups Mask used to filter physics objects, default to 0xffffffff
Definition: AutoCamera.h:383
Definition: AutoCamera.h:27
void SetKeyboardMovVelocity(float fValue)
max speed of movement velocity using keyboard.
Definition: AutoCamera.cpp:2264
int GetCharacterLookupBoneIndex()
-1 to disable, otherwise this is the attachment bone id to which we will bind the camera's lookup to...
Definition: AutoCamera.cpp:2390
CAutoCamera(void)
Definition: AutoCamera.cpp:149
bool IsEnableMouseRightDrag()
whether camera dragging with right button if enabled.
Definition: AutoCamera.h:279
void FreeCameraMode()
switch to free camera mode
Definition: AutoCamera.cpp:2227
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
float GetMaxYShiftSpeed()
the max speed camera interpolation speed along y axis.
Definition: AutoCamera.cpp:2410
void EnableMouseLeftButton(bool bValue)
whether Enable Mouse Left Button
Definition: AutoCamera.cpp:2279
BOOL m_bIsFollowMode
true to follow target
Definition: AutoCamera.h:460
void SetControlBiped(bool val)
whether the camera is able to control the biped movement.
Definition: AutoCamera.cpp:2435
virtual int GetAttributeClassID()
attribute class ID should be identical, unless one knows how overriding rules work.
Definition: AutoCamera.h:62
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: AutoCamera.cpp:2487
The top level scene management class.
Definition: SceneObject.h:58
void SetLookAtShiftY(double fValue)
the Y shift of the camera look at position during follow mode.
Definition: AutoCamera.h:356
void HandleUserInput()
Handle the user input from direct input: update the key state, process key event, process mouse event...
Definition: AutoCamera.cpp:1890
void FollowMode()
switch to follow mode.
Definition: AutoCamera.cpp:2236
bool IsAlwaysRun()
always running
Definition: AutoCamera.h:238
void SetPhysicsGroupMask(DWORD dwValue)
set groups Mask used to filter physics objects, default to 0xffffffff
Definition: AutoCamera.h:380
This class is for maintaining the event binding table and script binding table.
Definition: EventBinding.h:51
void SetKeyboardRotVelocity(float fValue)
max speed of rotational velocity using keyboard.
Definition: AutoCamera.cpp:2274
void EnableAlwaysRotateCameraWhenFPS(bool bValue)
Default to true.
Definition: AutoCamera.cpp:2380
Vector3 m_vMinLookAt
the box within which the camera lookat point must be
Definition: AutoCamera.h:33
void EnableKeyboard(bool bValue)
whether handler keyboard message
Definition: AutoCamera.cpp:2309
Defines the base class of all scene elements:CBaseObject for Parallel World Engine.
Definition: BaseObject.h:230
void EnableStereoVision(bool bEnable)
whether to enable stereo vision.
Definition: AutoCamera.h:326
bool IsFirstPersonView()
whether first person view mode
Definition: AutoCamera.cpp:2425
void ConstrainToBoundary(Vector3 *pV, const Vector3 *pvMin, const Vector3 *pvMax)
Desc: Clamps pV to lie inside vMinBoundary & MaxBoundary.
Definition: AutoCamera.cpp:81
void UpdateFocusConstraint(const Vector3 *pV, FLOAT fLookAtRadius, FLOAT fLookAtMinHeight, FLOAT fLookAtMaxHeight, FLOAT fEyeRadius, FLOAT fEyeMinHeight, FLOAT fEyeMaxHeight)
Name: UpdateFocusConstraint Desc: Set internal constraint based on the parameters param: pV is the ob...
Definition: AutoCamera.cpp:118
void ConstrainToOuterBoundary(Vector3 *pV, const Vector3 *pvMin, const Vector3 *pvMax)
Desc: Clamps pV to lie outside vMinBoundary & MaxBoundary.
Definition: AutoCamera.cpp:97
void SetUseCharacterLookupWhenMounted(bool bUseCharacterLookup)
Default to true.
Definition: AutoCamera.cpp:1867
void SetMaxCameraObjectDistance(double fValue)
max camera object distance when mouse wheel is used for zooming.
Definition: AutoCamera.h:390
virtual VOID FrameMove(FLOAT fElapsedTime)
Call these from client and use Get*Matrix() to read new matrices.
Definition: AutoCamera.cpp:491
float GetMaxAllowedYShift()
we will smooth the camera movement on the y direction when the followed biped's y movement is smaller...
Definition: AutoCamera.cpp:2400
bool IsCamAlwaysBehindObject()
whether camera is locked behind the current character.
Definition: AutoCamera.h:251
It can be used to represent biped object(like human, re spawning monsters) in the scene without inher...
Definition: BipedObject.h:60
bool SmoothMove(DVector3 *result, DVector3 vPosTarget, DVector3 vPos, float fIncrease, float fTolerance=0)
linearly (smoothly) move vPos to vPosTarget by the amount fIncrease
Definition: AutoCamera.cpp:448
void SetCharacterLookupBoneIndex(int nIndex)
-1 to disable, otherwise this is the attachment bone id to which we will bind the camera's lookup to...
Definition: AutoCamera.cpp:2395
virtual void SetViewParams(const DVector3 &vEyePt, const DVector3 &vLookatPt)
Definition: AutoCamera.cpp:1812
bool IsIgnoreEyeBlockCollisionInSunlight() const
enabled by default.
Definition: AutoCamera.h:436
virtual const char * GetAttributeClassDescription()
a static string, describing the attribute class object
Definition: AutoCamera.h:66