Example #1
0
void Door::SetStartingAngles( const LTVector& vStartingAngles )
{
	Super::SetStartingAngles( vStartingAngles );

	// Only need to update the sectors if actually in the initial rotation state.
	if( m_nCurState == AWM_STATE_INITIAL )
		UpdateSector( true );
}
Example #2
0
 /** 
  * Constructor
  * 
  * @param loc Tip point of sector
  * @param is_turnpoint Whether the sector is a turnpoint, or start/finish
  * 
  * @return Initialised object
  */
 FAISectorZone(const GeoPoint loc, const bool _is_turnpoint = true)
   :SymmetricSectorZone(FAI_SECTOR, loc,
                        fixed(1000.0 * (_is_turnpoint ? 10 : 1)),
                        Angle::QuarterCircle()),
    is_turnpoint(_is_turnpoint)
 {
   UpdateSector();
 }
Example #3
0
 /**
  * Constructor
  *
  * @param loc Location of tip of sector
  * @param _radius Radius of sector (m)
  * @param _start_radial Start radial (degrees), most counter-clockwise
  * @param _end_radial End radial (degrees), most clockwise
  *
  * @return Initialised object
  */
 SectorZone(const GeoPoint &loc, const fixed _radius = fixed(10000.0),
            const Angle _start_radial = Angle::Zero(),
            const Angle _end_radial = Angle::FullCircle())
     :CylinderZone(Shape::SECTOR, true, loc, _radius),
      arc_boundary(true),
      start_radial(_start_radial), end_radial(_end_radial)
 {
     UpdateSector();
 }
Example #4
0
void Door::SetPowerOn( double fTime, uint8 nWaveform )
{
	// Let base class handle it first..

	ActiveWorldModel::SetPowerOn( fTime, nWaveform );

	// Turn on the sector
	UpdateSector(true);
}
Example #5
0
 /**
  * Constructor
  *
  * @param loc Location of tip of sector
  * @param _radius Radius of sector (m)
  * @param _startRadial Start radial (degrees), most counter-clockwise
  * @param _endRadial End radial (degrees), most clockwise
  *
  * @return Initialised object
  */
 AnnularSectorZone(const GeoPoint &loc,
                   const fixed _radiusOuter=fixed(10000.0),
                   const Angle _startRadial = Angle::Zero(),
                   const Angle _endRadial = Angle::FullCircle(),
                   const fixed _inner_radius = fixed(0.0))
   :SectorZone(ANNULAR_SECTOR, loc, _radiusOuter, _startRadial, _endRadial),
    inner_radius(_inner_radius)
 {
   UpdateSector();
 }
Example #6
0
void Door::OnLoad( ILTMessage_Read *pMsg, uint32 dwSaveFlags )
{
	if( !pMsg ) return;

	// Load base vars first

	ActiveWorldModel::OnLoad( pMsg, dwSaveFlags );

	LOAD_STDSTRING( m_sDoorLink );
	LOAD_bool( m_bSectorsActive );
	LOAD_DWORD_CAST( m_eNMLinkID, ENUM_NMLinkID );

	for(uint32 nCurrSector = 0; nCurrSector < knNumSectors; nCurrSector++)
		LOAD_STDSTRING( m_sSectorName[nCurrSector] );

	UpdateSector( m_bSectorsActive );
}
Example #7
0
void Door::SetOff( bool bInitialState )
{
	// Let base class handle it first...

	ActiveWorldModel::SetOff( bInitialState );

	// Turn off the sector
	UpdateSector(false);

	// Let link handle it.

	if( m_eNMLinkID != kNMLink_Invalid )
	{
		AINavMeshLinkAbstract* pLink = g_pAINavMesh->GetNMLink( m_eNMLinkID );
		if( pLink && pLink->GetNMLinkType() == kLink_Door )
		{
			AINavMeshLinkDoor* pLinkDoor = (AINavMeshLinkDoor*)pLink;
			pLinkDoor->HandleDoorClosed( this );
		}
	}
}
Example #8
0
 /* virtual methods from class CylinderZone */
 virtual void SetRadius(fixed new_radius) override {
     CylinderZone::SetRadius(new_radius);
     UpdateSector();
 }
Example #9
0
void
SectorZone::SetEndRadial(const Angle x)
{
  end_radial = x;
  UpdateSector();
}
Example #10
0
void
SectorZone::SetStartRadial(const Angle x)
{
  start_radial = x;
  UpdateSector();
}
Example #11
0
 SymmetricSectorZone(const GeoPoint &loc,
                     const fixed radius=fixed(10000.0))
   :SectorZone(Shape::SYMMETRIC_QUADRANT, true, true, loc, radius),
    sector_angle(Angle::QuarterCircle()) {
   UpdateSector();
 }
Example #12
0
 /** 
  * Constructor
  * 
  * @param loc Center point of sector
  * 
  * @return Initialised object
  */
 BGAStartSectorZone(const GeoPoint loc)
   :SymmetricSectorZone(BGA_START, loc, fixed(5000.0), Angle::HalfCircle())
 {
   UpdateSector();
 }
Example #13
0
 /**
  * Constructor
  *
  * @param loc Location of center point of line
  * @param length Length of line (m)
  *
  * @return Initialised object
  */
 LineSectorZone(const GeoPoint loc, const fixed length = fixed(1000.0))
   :SymmetricSectorZone(LINE, loc, half(length), Angle::HalfCircle())
 {
   UpdateSector();
 }
Example #14
0
 /* virtual methods from class CylinderZone */
 void SetRadius(fixed new_radius) override {
   CylinderZone::SetRadius(new_radius);
   if (new_radius < inner_radius)
     inner_radius = new_radius;
   UpdateSector();
 }
Example #15
0
 /** 
  * Constructor
  * 
  * @param loc Tip point of sector
  * @param radius Outer radius (m)
  * 
  * @return Initialised object
  */
 KeyholeZone(const GeoPoint loc, const fixed radius = fixed(10000.0))
   :SymmetricSectorZone(KEYHOLE, loc, radius, Angle::QuarterCircle())
 {
   UpdateSector();
 }
Example #16
0
 /**
  * Set inner radius of annulus
  *
  * @param x Radius (m) of inner boundary
  */
 void SetInnerRadius(const fixed new_radius) {
   inner_radius = new_radius;
   if (new_radius > GetRadius())
     CylinderZone::SetRadius(new_radius);
   UpdateSector();
 }
Example #17
0
 void SetSectorAngle(Angle _angle) {
   sector_angle = _angle;
   UpdateSector();
 }