TrinityCore
Loading...
Searching...
No Matches
AreaTriggerShapeInfo Struct Reference

#include <AreaTriggerTemplate.h>

Public Member Functions

 AreaTriggerShapeInfo ()
 
bool IsSphere () const
 
bool IsBox () const
 
bool IsPolygon () const
 
bool IsCylinder () const
 
bool IsDisk () const
 
bool IsBoudedPlane () const
 
float GetMaxSearchRadius () const
 

Public Attributes

AreaTriggerTypes Type
 
union {
   struct {
      float   Data [MAX_AREATRIGGER_ENTITY_DATA]
 
   }   DefaultDatas
 
   struct {
      float   Radius
 
      float   RadiusTarget
 
   }   SphereDatas
 
   struct {
      float   Extents [3]
 
      float   ExtentsTarget [3]
 
   }   BoxDatas
 
   struct {
      float   Height
 
      float   HeightTarget
 
   }   PolygonDatas
 
   struct {
      float   Radius
 
      float   RadiusTarget
 
      float   Height
 
      float   HeightTarget
 
      float   LocationZOffset
 
      float   LocationZOffsetTarget
 
   }   CylinderDatas
 
   struct {
      float   InnerRadius
 
      float   InnerRadiusTarget
 
      float   OuterRadius
 
      float   OuterRadiusTarget
 
      float   Height
 
      float   HeightTarget
 
      float   LocationZOffset
 
      float   LocationZOffsetTarget
 
   }   DiskDatas
 
   struct {
      float   Extents [2]
 
      float   ExtentsTarget [2]
 
   }   BoundedPlaneDatas
 
}; 
 

Constructor & Destructor Documentation

◆ AreaTriggerShapeInfo()

AreaTriggerShapeInfo::AreaTriggerShapeInfo ( )
30{
32 memset(DefaultDatas.Data, 0, sizeof(DefaultDatas.Data));
33}
@ AREATRIGGER_TYPE_MAX
Definition: AreaTriggerTemplate.h:55
AreaTriggerTypes Type
Definition: AreaTriggerTemplate.h:132
struct AreaTriggerShapeInfo::@200::@202 DefaultDatas

Member Function Documentation

◆ GetMaxSearchRadius()

float AreaTriggerShapeInfo::GetMaxSearchRadius ( ) const
36{
37 switch (Type)
38 {
40 return std::max(SphereDatas.Radius, SphereDatas.RadiusTarget);
42 return std::sqrt(BoxDatas.Extents[0] * BoxDatas.Extents[0] / 4 + BoxDatas.Extents[1] * BoxDatas.Extents[1] / 4);
44 return std::max(CylinderDatas.Radius, CylinderDatas.RadiusTarget);
46 return std::max(DiskDatas.OuterRadius, DiskDatas.OuterRadiusTarget);
48 return std::sqrt(BoundedPlaneDatas.Extents[0] * BoundedPlaneDatas.Extents[0] / 4 + BoundedPlaneDatas.Extents[1] * BoundedPlaneDatas.Extents[1] / 4);
49 default:
50 break;
51 }
52
53 return 0.0f;
54}
@ AREATRIGGER_TYPE_BOX
Definition: AreaTriggerTemplate.h:49
@ AREATRIGGER_TYPE_SPHERE
Definition: AreaTriggerTemplate.h:48
@ AREATRIGGER_TYPE_CYLINDER
Definition: AreaTriggerTemplate.h:52
@ AREATRIGGER_TYPE_DISK
Definition: AreaTriggerTemplate.h:53
@ AREATRIGGER_TYPE_BOUNDED_PLANE
Definition: AreaTriggerTemplate.h:54
struct AreaTriggerShapeInfo::@200::@204 BoxDatas
struct AreaTriggerShapeInfo::@200::@208 BoundedPlaneDatas
struct AreaTriggerShapeInfo::@200::@207 DiskDatas
struct AreaTriggerShapeInfo::@200::@203 SphereDatas
struct AreaTriggerShapeInfo::@200::@206 CylinderDatas
+ Here is the caller graph for this function:

◆ IsBoudedPlane()

bool AreaTriggerShapeInfo::IsBoudedPlane ( ) const
inline
+ Here is the caller graph for this function:

◆ IsBox()

bool AreaTriggerShapeInfo::IsBox ( ) const
inline
125{ return Type == AREATRIGGER_TYPE_BOX; }
+ Here is the caller graph for this function:

◆ IsCylinder()

bool AreaTriggerShapeInfo::IsCylinder ( ) const
inline
127{ return Type == AREATRIGGER_TYPE_CYLINDER; }
+ Here is the caller graph for this function:

◆ IsDisk()

bool AreaTriggerShapeInfo::IsDisk ( ) const
inline
128{ return Type == AREATRIGGER_TYPE_DISK; }
+ Here is the caller graph for this function:

◆ IsPolygon()

bool AreaTriggerShapeInfo::IsPolygon ( ) const
inline
126{ return Type == AREATRIGGER_TYPE_POLYGON; }
@ AREATRIGGER_TYPE_POLYGON
Definition: AreaTriggerTemplate.h:51
+ Here is the caller graph for this function:

◆ IsSphere()

bool AreaTriggerShapeInfo::IsSphere ( ) const
inline
124{ return Type == AREATRIGGER_TYPE_SPHERE; }
+ Here is the caller graph for this function:

Member Data Documentation

◆ 

union { ... } AreaTriggerShapeInfo::@201

◆ 

struct { ... } AreaTriggerShapeInfo::BoundedPlaneDatas

◆ 

struct { ... } AreaTriggerShapeInfo::BoxDatas

◆ 

struct { ... } AreaTriggerShapeInfo::CylinderDatas

◆ Data

float AreaTriggerShapeInfo::Data[MAX_AREATRIGGER_ENTITY_DATA]

◆ 

struct { ... } AreaTriggerShapeInfo::DefaultDatas

◆ 

struct { ... } AreaTriggerShapeInfo::DiskDatas

◆ Extents

float AreaTriggerShapeInfo::Extents[2]

◆ ExtentsTarget

float AreaTriggerShapeInfo::ExtentsTarget[2]

◆ Height

float AreaTriggerShapeInfo::Height

◆ HeightTarget

float AreaTriggerShapeInfo::HeightTarget

◆ InnerRadius

float AreaTriggerShapeInfo::InnerRadius

◆ InnerRadiusTarget

float AreaTriggerShapeInfo::InnerRadiusTarget

◆ LocationZOffset

float AreaTriggerShapeInfo::LocationZOffset

◆ LocationZOffsetTarget

float AreaTriggerShapeInfo::LocationZOffsetTarget

◆ OuterRadius

float AreaTriggerShapeInfo::OuterRadius

◆ OuterRadiusTarget

float AreaTriggerShapeInfo::OuterRadiusTarget

◆ 

struct { ... } AreaTriggerShapeInfo::PolygonDatas

◆ Radius

float AreaTriggerShapeInfo::Radius

◆ RadiusTarget

float AreaTriggerShapeInfo::RadiusTarget

◆ 

struct { ... } AreaTriggerShapeInfo::SphereDatas

◆ Type

AreaTriggerTypes AreaTriggerShapeInfo::Type

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