home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / source / game / SecurityCamera.h < prev    next >
C/C++ Source or Header  |  2005-11-14  |  2KB  |  72 lines

  1.  
  2. #ifndef __GAME_SECURITYCAMERA_H__
  3. #define __GAME_SECURITYCAMERA_H__
  4.  
  5. /*
  6. ===================================================================================
  7.  
  8.     Security camera
  9.  
  10. ===================================================================================
  11. */
  12.  
  13.  
  14. class idSecurityCamera : public idEntity {
  15. public:
  16.     CLASS_PROTOTYPE( idSecurityCamera );
  17.     
  18.                             ~idSecurityCamera( void );
  19.  
  20.     void                    Spawn( void );
  21.  
  22.     void                    Save( idSaveGame *savefile ) const;
  23.     void                    Restore( idRestoreGame *savefile );
  24.  
  25.     virtual void            Think( void );
  26.  
  27.     virtual renderView_t *    GetRenderView();
  28.     virtual void            Killed( idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location );
  29.     virtual bool            Pain( idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location );
  30.     virtual void            Present( void );
  31.  
  32. private:
  33.  
  34.     enum { SCANNING, LOSINGINTEREST, ALERT, ACTIVATED };
  35.  
  36.     float                    angle;
  37.     float                    sweepAngle;
  38.     int                        modelAxis;
  39.     bool                    flipAxis;
  40.     float                    scanDist;
  41.     float                    scanFov;
  42.                             
  43.     float                    sweepStart;
  44.     float                    sweepEnd;
  45.     bool                    negativeSweep;
  46.     bool                    sweeping;
  47.     int                        alertMode;
  48.     float                    stopSweeping;
  49.     float                    scanFovCos;
  50.  
  51.     idVec3                    viewOffset;
  52.                             
  53.     int                        pvsArea;
  54.     idPhysics_RigidBody        physicsObj;
  55.     idTraceModel            trm;
  56.  
  57.     void                    StartSweep( void );
  58.     bool                    CanSeePlayer( void );
  59.     void                    SetAlertMode( int status );
  60.     void                    DrawFov( void );
  61.     const idVec3            GetAxis( void ) const;
  62.     float                    SweepSpeed( void ) const;
  63.  
  64.     void                    Event_ReverseSweep( void );
  65.     void                    Event_ContinueSweep( void );
  66.     void                    Event_Pause( void );
  67.     void                    Event_Alert( void );
  68.     void                    Event_AddLight( void );
  69. };
  70.  
  71. #endif /* !__GAME_SECURITYCAMERA_H__ */
  72.