afxCamera
Classes:
Private Types
_Anonymous_ { ThirdPersonMode = 1 FlyMode = 2 OrbitObjectMode = 3 OrbitPointMode = 4 CameraFirstMode = 0 CameraLastMode = 4 }
MaskBits { MoveMask = Parent::NextFreeMask SubjectMask = Parent::NextFreeMask << 1 NextFreeMask = Parent::NextFreeMask << 2 }
Parent
Private Attributes
bool
StateDelta
bool
int
Private Functions
cam_update(F32 dt, bool on_server)
cam_update_3pov(F32 dt, bool on_server)
bool
test_blocked_line(const Point3F & start, const Point3F & end)
Public Functions
advanceTime(F32 dt)
Advances simulation time for animations.
DECLARE_CATEGORY("AFX" )
Returns the vertical field of view in degrees for this object if used as a camera.
getCameraTransform(F32 * pos, MatrixF * mat)
Gets the camera to world space transform matrix.
Returns the level of screenflash that should be used.
Returns the default vertical field of view in degrees if this object is used as a camera.
Point3F &
White out is the flash-grenade blindness effect This returns the level of flash to create.
interpolateTick(F32 delta)
Interpolates between tick events.
bool
isCamera()
bool
bool
isValidCameraFov(F32 fov)
Returns true if the vertical FOV in degrees is within allowable parameters of the datablock.
bool
onAdd()
Called when the object is added to the sim.
onCameraScopeQuery(NetConnection * cr, CameraScopeQuery * camInfo)
Queries the object about information used to determine scope.
onDeleteNotify(SimObject * object)
Called when a SimObject is deleted.
Called when the editor is deactivated.
Called when the editor is activated.
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Instructs this object to pack its state for transfer over the network.
processTick(const Move * move)
Processes a move event and updates object state once every 32 milliseconds.
readPacketData(GameConnection * conn, BitStream * stream)
Read data written with writePacketData() and update the object state.
setCameraFov(F32 fov)
Sets the vertical field of view in degrees for this object if used as a camera.
setCameraSubject(SceneObject * subject)
setControllingClient(GameConnection * client)
Sets the client controlling this object.
setThirdPersonAngle(F32 angle)
setThirdPersonDistance(F32 distance)
setThirdPersonOffset(const Point3F & offset)
setTransform(const MatrixF & mat)
Sets the Object -> World transform.
snapToPosition(const Point3F & pos)
unpackUpdate(NetConnection * conn, BitStream * stream)
Instructs this object to read state data previously packed with packUpdate.
validateEyePoint(F32 pos, MatrixF * mat)
writePacketData(GameConnection * conn, BitStream * stream)
Write state information necessary to perform client side prediction of an object.
Detailed Description
Private Types
@0
Enumerator
- ThirdPersonMode = 1
- FlyMode = 2
- OrbitObjectMode = 3
- OrbitPointMode = 4
- CameraFirstMode = 0
- CameraLastMode = 4
MaskBits
Enumerator
- MoveMask = Parent::NextFreeMask
- SubjectMask = Parent::NextFreeMask << 1
- NextFreeMask = Parent::NextFreeMask << 2
typedef ShapeBase Parent
Private Attributes
F32 mCam_angle
bool mCam_dirty
F32 mCam_distance
Point3F mCam_offset
SceneObject * mCam_subject
Point3F mCoi_offset
F32 mCurOrbitDist
StateDelta mDelta
bool mFlymode_saved
Point3F mFlymode_saved_pos
F32 mMaxOrbitDist
F32 mMinOrbitDist
int mMode
bool mObservingClientObject
SimObjectPtr< GameBase > mOrbitObject
Point3F mPosition
Point3F mRot
S8 mThird_person_snap_c
S8 mThird_person_snap_s
Private Functions
avoid_blocked_view(const Point3F & start, const Point3F & end, Point3F & newpos)
cam_update(F32 dt, bool on_server)
cam_update_3pov(F32 dt, bool on_server)
set_cam_pos(const Point3F & pos, const Point3F & viewRot)
test_blocked_line(const Point3F & start, const Point3F & end)
Public Functions
afxCamera()
~afxCamera()
advanceTime(F32 dt)
Reimplemented from: ProcessObject
DECLARE_CATEGORY("AFX" )
DECLARE_CONOBJECT(afxCamera )
getCameraFov()
Reimplemented from: ShapeBase
getCameraTransform(F32 * pos, MatrixF * mat)
Reimplemented from: ShapeBase
getDamageFlash()
Reimplemented from: ShapeBase
getDefaultCameraFov()
Reimplemented from: ShapeBase
getMode()
getOrbitObject()
getPosition()
getThirdPersonAngle()
getThirdPersonCOIOffset()
getThirdPersonDistance()
getThirdPersonOffset()
getWhiteOut()
Reimplemented from: ShapeBase
interpolateTick(F32 delta)
Reimplemented from: ProcessObject
isCamera()
Reimplemented from: SceneObject
isObservingClientObject()
isValidCameraFov(F32 fov)
Reimplemented from: ShapeBase
onAdd()
Reimplemented from: SceneObject
onCameraScopeQuery(NetConnection * cr, CameraScopeQuery * camInfo)
Reimplemented from: SceneObject
onDeleteNotify(SimObject * object)
Reimplemented from: ShapeBase
onEditorDisable()
Reimplemented from: SimObject
onEditorEnable()
Reimplemented from: SimObject
onRemove()
Reimplemented from: SceneObject
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Reimplemented from: SceneObject
processTick(const Move * move)
Reimplemented from: ProcessObject
readPacketData(GameConnection * conn, BitStream * stream)
Reimplemented from: GameBase
setCameraFov(F32 fov)
Reimplemented from: ShapeBase
setCameraSubject(SceneObject * subject)
setControllingClient(GameConnection * client)
Reimplemented from: ShapeBase
setFlyMode()
setOrbitMode(GameBase * obj, Point3F & pos, AngAxisF & rot, F32 minDist, F32 maxDist, F32 curDist, bool ownClientObject)
setThirdPersonAngle(F32 angle)
setThirdPersonDistance(F32 distance)
setThirdPersonMode()
setThirdPersonOffset(const Point3F & offset)
setThirdPersonOffset(const Point3F & offset, const Point3F & coi_offset)
setThirdPersonSnap()
setThirdPersonSnapClient()
setTransform(const MatrixF & mat)
Reimplemented from: SceneObject
snapToPosition(const Point3F & pos)
unpackUpdate(NetConnection * conn, BitStream * stream)
Reimplemented from: SceneObject
validateEyePoint(F32 pos, MatrixF * mat)
writePacketData(GameConnection * conn, BitStream * stream)
Reimplemented from: GameBase