TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ZRangeBoundary Class Reference

#include <AreaBoundary.h>

Public Member Functions

 ZRangeBoundary (float minZ, float maxZ, bool isInverted=false)
 
- Public Member Functions inherited from AreaBoundary
virtual ~AreaBoundary ()
 
BoundaryType GetBoundaryType () const
 
bool IsWithinBoundary (const Position *pos) const
 

Protected Member Functions

bool IsWithinBoundaryArea (const Position *pos) const override
 
- Protected Member Functions inherited from AreaBoundary
 AreaBoundary (BoundaryType bType, bool isInverted)
 

Private Attributes

const float _minZ
 
const float _maxZ
 

Additional Inherited Members

- Public Types inherited from AreaBoundary
enum  BoundaryType {
  BOUNDARY_RECTANGLE, BOUNDARY_CIRCLE, BOUNDARY_ELLIPSE, BOUNDARY_TRIANGLE,
  BOUNDARY_PARALLELOGRAM, BOUNDARY_Z_RANGE
}
 
- Protected Attributes inherited from AreaBoundary
const BoundaryType m_boundaryType
 
bool m_isInvertedBoundary
 

Constructor & Destructor Documentation

ZRangeBoundary::ZRangeBoundary ( float  minZ,
float  maxZ,
bool  isInverted = false 
)
116  :
117  AreaBoundary(BoundaryType::BOUNDARY_Z_RANGE, isInverted), _minZ(minZ), _maxZ(maxZ) { }
const float _maxZ
Definition: AreaBoundary.h:150
const float _minZ
Definition: AreaBoundary.h:150
AreaBoundary(BoundaryType bType, bool isInverted)
Definition: AreaBoundary.h:63

Member Function Documentation

bool ZRangeBoundary::IsWithinBoundaryArea ( const Position pos) const
overrideprotectedvirtual

Implements AreaBoundary.

119 {
120  if (!pos)
121  return false;
122 
123  return !(pos->GetPositionZ() < _minZ || pos->GetPositionZ() > _maxZ);
124 }
const float _maxZ
Definition: AreaBoundary.h:150
float GetPositionZ() const
Definition: Position.h:106
const float _minZ
Definition: AreaBoundary.h:150

+ Here is the call graph for this function:

Member Data Documentation

const float ZRangeBoundary::_maxZ
private
const float ZRangeBoundary::_minZ
private

The documentation for this class was generated from the following files: