#include <View.h>
Inherits Snapshot.
Inherited by PlaceholderView, and W3DView.
Public Types | |
| enum | CameraShakeType { SHAKE_SUBTLE = 0 , SHAKE_NORMAL , SHAKE_STRONG , SHAKE_SEVERE , SHAKE_CINE_EXTREME , SHAKE_CINE_INSANE , SHAKE_COUNT } |
| Add an impulse force to shake the camera. More... | |
| enum | WorldToScreenReturn { WTS_INSIDE_FRUSTUM = 0 , WTS_OUTSIDE_FRUSTUM , WTS_INVALID , WTS_COUNT } |
| enum | CameraLockType { LOCK_FOLLOW , LOCK_TETHER } |
Public Member Functions | |
| View (void) | |
| virtual | ~View (void) |
| virtual void | init (void) |
| virtual void | reset (void) |
| virtual UnsignedInt | getID (void) |
| virtual void | setZoomLimited (Bool limit) |
| limit the zoom height | |
| virtual Bool | isZoomLimited (void) |
| get status of zoom limit | |
| virtual Drawable * | pickDrawable (const ICoord2D *screen, Bool forceAttack, PickType pickType)=0 |
| pick drawable given the screen pixel coords. If force attack, picks bridges as well. | |
| virtual Int | iterateDrawablesInRegion (IRegion2D *screenRegion, Bool(*callback)(Drawable *draw, void *userData), void *userData)=0 |
| all drawables in the 2D screen region will call the 'callback' | |
| virtual void | getScreenCornerWorldPointsAtZ (Coord3D *topLeft, Coord3D *topRight, Coord3D *bottomLeft, Coord3D *bottomRight, Real z) |
| virtual void | setWidth (Int width) |
| virtual Int | getWidth (void) |
| virtual void | setHeight (Int height) |
| virtual Int | getHeight (void) |
| virtual void | setOrigin (Int x, Int y) |
| Sets location of top-left view corner on display. | |
| virtual void | getOrigin (Int *x, Int *y) |
| Return location of top-left view corner on display. | |
| virtual void | forceRedraw ()=0 |
| virtual void | lookAt (const Coord3D *o) |
| Center the view on the given coordinate. | |
| virtual void | initHeightForMap (void) |
| virtual void | scrollBy (Coord2D *delta) |
| Init the camera height for the map at the current position. | |
| virtual void | moveCameraTo (const Coord3D *o, Int frames, Int shutter, Bool orient, Real easeIn, Real easeOut) |
| virtual void | moveCameraAlongWaypointPath (Waypoint *way, Int frames, Int shutter, Bool orient, Real easeIn, Real easeOut) |
| virtual Bool | isCameraMovementFinished (void) |
| virtual void | cameraModFinalZoom (Real finalZoom, Real easeIn, Real easeOut) |
| virtual void | cameraModRollingAverage (Int framesToAverage) |
| Final zoom for current camera movement. | |
| virtual void | cameraModFinalTimeMultiplier (Int finalMultiplier) |
| Number of frames to average movement for current camera movement. | |
| virtual void | cameraModFinalPitch (Real finalPitch, Real easeIn, Real easeOut) |
| Final time multiplier for current camera movement. | |
| virtual void | cameraModFreezeTime (void) |
| Final pitch for current camera movement. | |
| virtual void | cameraModFreezeAngle (void) |
| Freezes time during the next camera movement. | |
| virtual void | cameraModLookToward (Coord3D *pLoc) |
| Sets a look at point during camera movement. | |
| virtual void | cameraModFinalLookToward (Coord3D *pLoc) |
| Sets a look at point during camera movement. | |
| virtual void | cameraModFinalMoveTo (Coord3D *pLoc) |
| virtual void | cameraEnableSlaveMode (const AsciiString &thingtemplateName, const AsciiString &boneName) |
| Sets a final move to. | |
| virtual void | cameraDisableSlaveMode (void) |
| virtual void | Add_Camera_Shake (const Coord3D &position, float radius, float duration, float power) |
| virtual enum FilterModes | getViewFilterMode (void) |
| Turns on viewport special effect (black & white mode) | |
| virtual enum FilterTypes | getViewFilterType (void) |
| Turns on viewport special effect (black & white mode) | |
| virtual Bool | setViewFilterMode (enum FilterModes filterMode) |
| Turns on viewport special effect (black & white mode) | |
| virtual void | setViewFilterPos (const Coord3D *pos) |
| virtual Bool | setViewFilter (enum FilterTypes filter) |
| Passes a position to the special effect filter. | |
| virtual void | setFadeParameters (Int fadeFrames, Int direction) |
| virtual void | set3DWireFrameMode (Bool enable) |
| virtual void | resetCamera (const Coord3D *location, Int frames, Real easeIn, Real easeOut) |
| virtual void | rotateCamera (Real rotations, Int frames, Real easeIn, Real easeOut) |
| Move camera to location, and reset to default angle & zoom. | |
| virtual void | rotateCameraTowardObject (ObjectID id, Int milliseconds, Int holdMilliseconds, Real easeIn, Real easeOut) |
| Rotate camera about current viewpoint. | |
| virtual void | rotateCameraTowardPosition (const Coord3D *pLoc, Int milliseconds, Real easeIn, Real easeOut, Bool reverseRotation) |
| Rotate camera to face an object, and hold on it. | |
| virtual Bool | isTimeFrozen (void) |
| Rotate camera to face a location. | |
| virtual Int | getTimeMultiplier (void) |
| virtual void | setTimeMultiplier (Int multiple) |
| Get the time multiplier. | |
| virtual void | setDefaultView (Real pitch, Real angle, Real maxHeight) |
| Set the time multiplier. | |
| virtual void | zoomCamera (Real finalZoom, Int milliseconds, Real easeIn, Real easeOut) |
| virtual void | pitchCamera (Real finalPitch, Int milliseconds, Real easeIn, Real easeOut) |
| virtual void | setAngle (Real angle) |
| Rotate the view around the up axis to the given angle. | |
| virtual Real | getAngle (void) |
| virtual void | setPitch (Real angle) |
| Rotate the view around the horizontal axis to the given angle. | |
| virtual Real | getPitch (void) |
| Return current camera pitch. | |
| virtual void | setAngleAndPitchToDefault (void) |
| Set the view angle back to default. | |
| virtual void | getPosition (Coord3D *pos) |
| Returns position camera is looking at (z will be zero) | |
| virtual const Coord3D & | get3DCameraPosition () const =0 |
| Returns the actual camera position. | |
| virtual Real | getZoom () |
| virtual void | setZoom (Real z) |
| virtual Real | getHeightAboveGround () |
| virtual void | setHeightAboveGround (Real z) |
| virtual void | zoomIn (void) |
| Zoom in, closer to the ground, limit to min. | |
| virtual void | zoomOut (void) |
| Zoom out, farther away from the ground, limit to max. | |
| virtual void | setZoomToDefault (void) |
| Set zoom to default value. | |
| virtual Real | getMaxZoom (void) |
| return max zoom value | |
| virtual void | setOkToAdjustHeight (Bool val) |
| Set this to adjust camera height. | |
| virtual Real | getTerrainHeightUnderCamera () |
| virtual void | setTerrainHeightUnderCamera (Real z) |
| virtual Real | getCurrentHeightAboveGround () |
| virtual void | setCurrentHeightAboveGround (Real z) |
| virtual void | setFieldOfView (Real angle) |
| Set the horizontal field of view angle. | |
| virtual Real | getFieldOfView (void) |
| Get the horizontal field of view angle. | |
| Bool | worldToScreen (const Coord3D *w, ICoord2D *s) |
| Transform world coordinate "w" into screen coordinate "s". | |
| virtual WorldToScreenReturn | worldToScreenTriReturn (const Coord3D *w, ICoord2D *s)=0 |
| Like worldToScreen(), but with a more informative return value. | |
| virtual void | screenToWorld (const ICoord2D *s, Coord3D *w)=0 |
| Transform screen coordinate "s" into world coordinate "w". | |
| virtual void | screenToTerrain (const ICoord2D *screen, Coord3D *world)=0 |
| transform screen coord to a point on the 3D terrain | |
| virtual void | screenToWorldAtZ (const ICoord2D *s, Coord3D *w, Real z)=0 |
| transform screen point to world point at the specified world Z value | |
| virtual void | getLocation (ViewLocation *location) |
| write the view's current location in to the view location object | |
| virtual void | setLocation (const ViewLocation *location) |
| set the view's current location from to the view location object | |
| virtual void | drawView (void)=0 |
| Render the world visible in this view. | |
| virtual void | updateView (void)=0 |
| called once per frame to determine the final camera and object transforms | |
| virtual ObjectID | getCameraLock () const |
| virtual void | setCameraLock (ObjectID id) |
| virtual void | snapToCameraLock (void) |
| virtual void | setSnapMode (CameraLockType lockType, Real lockDist) |
| virtual Drawable * | getCameraLockDrawable () const |
| virtual void | setCameraLockDrawable (Drawable *drawable) |
| virtual void | setMouseLock (Bool mouseLocked) |
| lock/unlock the mouse input to the tactical view | |
| virtual Bool | isMouseLocked (void) |
| is the mouse input locked to the tactical view? | |
| virtual void | shake (const Coord3D *epicenter, CameraShakeType shakeType) |
| Add an impulse force to shake the camera. | |
| virtual Real | getFXPitch (void) const |
| returns the FX pitch angle | |
| virtual void | forceCameraConstraintRecalc (void) |
| virtual void | setGuardBandBias (const Coord2D *gb)=0 |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| run the "light" crc check on this data structure | |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
| void | setPosition (const Coord3D *pos) |
| const Coord3D * | getPosition (void) const |
| virtual View * | prependViewToList (View *list) |
| Prepend this view to the given list, return the new list. | |
| virtual View * | getNextView (void) |
| Return next view in the set. | |
Protected Attributes | |
| View * | m_next |
| List links used by the Display class. | |
| UnsignedInt | m_id |
| Rhe ID of this view. | |
| Coord3D | m_pos |
| Position of this view, in world coordinates. | |
| Int | m_width |
| Int | m_height |
| Dimensions of the view. | |
| Int | m_originX |
| Int | m_originY |
| Location of top/left view corner. | |
| Real | m_angle |
| Angle at which view has been rotated about the Z axis. | |
| Real | m_pitchAngle |
| Rotation of view direction around horizontal (X) axis. | |
| Real | m_maxZoom |
| Largest zoom value (minimum actual zoom) | |
| Real | m_minZoom |
| Smallest zoom value (maximum actual zoom) | |
| Real | m_maxHeightAboveGround |
| Real | m_minHeightAboveGround |
| Real | m_zoom |
| Current zoom value. | |
| Real | m_heightAboveGround |
| User's desired height above ground. | |
| Bool | m_zoomLimited |
| Camera restricted in zoom height. | |
| Real | m_defaultAngle |
| Real | m_defaultPitchAngle |
| Real | m_currentHeightAboveGround |
| Cached value for debugging. | |
| Real | m_terrainHeightUnderCamera |
| Cached value for debugging. | |
| ObjectID | m_cameraLock |
| if nonzero, id of object that the camera should follow | |
| Drawable * | m_cameraLockDrawable |
| if nonzero, drawble of object that camera should follow. | |
| CameraLockType | m_lockType |
| are we following or just tethering? | |
| Real | m_lockDist |
| how far can we be when tethered? | |
| Real | m_FOV |
| the current field of view angle | |
| Bool | m_mouseLocked |
| is the mouse input locked to the tactical view? | |
| Bool | m_okToAdjustHeight |
| Should we attempt to adjust camera height? | |
| Bool | m_snapImmediate |
| Should we immediately snap to the object we're following? | |
| Coord2D | m_guardBandBias |
| Exttra beefy margins so huge thins can stay "on-screen". | |
Static Protected Attributes | |
| static UnsignedInt | m_idNext = 1 |
| Used for allocating view ID's for all views. | |
Friends | |
| class | Display |
| enum View::CameraLockType |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Sets a look at point during camera movement.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
Final time multiplier for current camera movement.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Number of frames to average movement for current camera movement.
Reimplemented in PlaceholderView, and W3DView.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Freezes time during the next camera movement.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Final pitch for current camera movement.
Freezes time during the next camera movement.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Sets a look at point during camera movement.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Final zoom for current camera movement.
Reimplemented in PlaceholderView, and W3DView.
|
inlineprotectedvirtual |
|
pure virtual |
Render the world visible in this view.
Implemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
pure virtual |
Implemented in PlaceholderView, and W3DView.
|
pure virtual |
Returns the actual camera position.
Implemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Get the horizontal field of view angle.
Reimplemented in PlaceholderView.
|
inlinevirtual |
returns the FX pitch angle
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
virtual |
write the view's current location in to the view location object
write the view's current location in to the view location object
Reimplemented in PlaceholderView.
|
inlinevirtual |
|
inlineprotectedvirtual |
Return next view in the set.
Reimplemented in PlaceholderView.
Return location of top-left view corner on display.
Reimplemented in PlaceholderView.
|
inlinevirtual |
Return current camera pitch.
Reimplemented in PlaceholderView.
|
inlinevirtual |
Returns position camera is looking at (z will be zero)
Reimplemented in PlaceholderView.
|
inlineprotected |
|
virtual |
project the 4 corners of this view into the world and return each point as a parameter, the world points are at the requested Z
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Turns on viewport special effect (black & white mode)
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Turns on viewport special effect (black & white mode)
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
virtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
is the mouse input locked to the tactical view?
Reimplemented in PlaceholderView.
|
inlinevirtual |
Rotate camera to face a location.
Freezes time during the next camera movement.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
|
pure virtual |
all drawables in the 2D screen region will call the 'callback'
Implemented in PlaceholderView, and W3DView.
|
inlineprotectedvirtual |
|
virtual |
Center the view on the given coordinate.
Center the view on the given coordinate.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
pure virtual |
pick drawable given the screen pixel coords. If force attack, picks bridges as well.
Implemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
Prepend this view to the given list, return the new list.
Prepend this view to the given list, return the new list.
Reimplemented in PlaceholderView.
|
virtual |
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Move camera to location, and reset to default angle & zoom.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Rotate camera about current viewpoint.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Rotate camera to face an object, and hold on it.
Reimplemented in PlaceholderView, and W3DView.
transform screen coord to a point on the 3D terrain
Implemented in PlaceholderView, and W3DView.
Transform screen coordinate "s" into world coordinate "w".
Implemented in PlaceholderView, and W3DView.
transform screen point to world point at the specified world Z value
Implemented in PlaceholderView, and W3DView.
|
virtual |
Init the camera height for the map at the current position.
Shift the view by the given delta
Shift the view by the given delta.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
virtual |
Rotate the view around the up axis to the given angle.
Rotate the view around the up axis by the given angle.
Reimplemented in PlaceholderView, and W3DView.
|
virtual |
Set the view angle back to default.
Set the view angle back to default
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
Set the time multiplier.
Reimplemented in PlaceholderView, and W3DView.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Set the horizontal field of view angle.
Reimplemented in PlaceholderView, and W3DView.
|
pure virtual |
Implemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
virtual |
set the view's current location from to the view location object
set the view's current location from to the view location object
Reimplemented in PlaceholderView.
|
inlinevirtual |
lock/unlock the mouse input to the tactical view
Reimplemented in PlaceholderView.
|
inlinevirtual |
Set this to adjust camera height.
Reimplemented in PlaceholderView.
Sets location of top-left view corner on display.
Reimplemented in PlaceholderView, and W3DView.
|
virtual |
Rotate the view around the horizontal axis to the given angle.
Rotate the view around the horizontal (X) axis to the given angle.
Reimplemented in PlaceholderView, and W3DView.
|
inlineprotected |
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
inlinevirtual |
Get the time multiplier.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Passes a position to the special effect filter.
Turns on viewport special effect (black & white mode)
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Turns on viewport special effect (black & white mode)
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
|
inlinevirtual |
Set zoom to default value.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Add an impulse force to shake the camera.
Reimplemented in PlaceholderView, and W3DView.
|
inlinevirtual |
Reimplemented in PlaceholderView.
|
pure virtual |
called once per frame to determine the final camera and object transforms
Implemented in PlaceholderView, and W3DView.
|
pure virtual |
Like worldToScreen(), but with a more informative return value.
Implemented in PlaceholderView, and W3DView.
|
protectedvirtual |
|
inlinevirtual |
Reimplemented in PlaceholderView, and W3DView.
|
virtual |
Zoom in, closer to the ground, limit to min.
Reimplemented in PlaceholderView.
|
virtual |
Zoom out, farther away from the ground, limit to max.
Reimplemented in PlaceholderView.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |