StarEngine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
star::RectangleColliderComponent Class Referencefinal

#include <RectangleColliderComponent.h>

Inheritance diagram for star::RectangleColliderComponent:
Inheritance graph
Collaboration diagram for star::RectangleColliderComponent:
Collaboration graph

Public Member Functions

 RectangleColliderComponent ()
 
 RectangleColliderComponent (const vec2 &size)
 
 RectangleColliderComponent (float width, float height)
 
 RectangleColliderComponent (const tstring *layers, uint8 n=1)
 
 RectangleColliderComponent (const vec2 &size, const tstring *layers, uint8=1)
 
 RectangleColliderComponent (float width, float height, const tstring *layers, uint8=1)
 
 ~RectangleColliderComponent ()
 
bool CollidesWithPoint (const vec2 &point) const
 
bool CollidesWithLine (const vec2 &point1, const vec2 &point2) const
 
void CollidesWith (const BaseColliderComponent *other) const
 
Rect GetCollisionRect () const
 
float GetCollisionRectWidth () const
 
float GetCollisionRectHeight () const
 
void GetColliisonRectSize (vec2 &outVec) const
 
void SetCollisionRectSize (float width, float height)
 
void SetCollisionRectSize (const vec2 &size)
 
- Public Member Functions inherited from star::BaseColliderComponent
 BaseColliderComponent ()
 
 BaseColliderComponent (const tstring *layers, uint8 n=1)
 
virtual ~BaseColliderComponent ()
 
void Update (const Context &context)
 
void Draw ()
 
void SetAsTrigger (bool isTrigger)
 
bool IsTrigger () const
 
void SetAsStatic (bool isStatic)
 
bool IsStatic () const
 
- Public Member Functions inherited from star::BaseComponent
 BaseComponent (void)
 
 BaseComponent (Object *parent)
 
virtual ~BaseComponent (void)
 
void Initialize ()
 
bool IsInitialized () const
 
ObjectGetParent () const
 
void SetParent (Object *parent)
 
BaseSceneGetGameScene () const
 
TransformComponentGetTransform () const
 

Protected Member Functions

void InitializeColliderComponent ()
 
bool OOBBRectangleRectangleCollision (const Rect &rect1, const Rect &rect2) const
 
bool AABBRectangleRectangleCollision (const Rect &rect1, const Rect &rect2) const
 
bool RectangleCircleCollision (const RectangleColliderComponent *collider1, const CircleColliderComponent *collider2) const
 
bool CalculateAxisSpecificCollision (const Rect &rect1, const Rect &rect2, const vec2 &axis) const
 
bool CalculateAxisSpecificCollision (const Rect &rect1, const vec2 &point1, const vec2 &point2, const vec2 &axis) const
 

Protected Attributes

Rect m_CollisionRect
 
- Protected Attributes inherited from star::BaseColliderComponent
bool m_bIsTrigger
 
bool m_bIsStatic
 
- Protected Attributes inherited from star::BaseComponent
Objectm_pParentObject
 
bool m_bInitialized
 

Constructor & Destructor Documentation

star::RectangleColliderComponent::RectangleColliderComponent ( )
star::RectangleColliderComponent::RectangleColliderComponent ( const vec2 &  size)
star::RectangleColliderComponent::RectangleColliderComponent ( float  width,
float  height 
)
star::RectangleColliderComponent::RectangleColliderComponent ( const tstring layers,
uint8  n = 1 
)
star::RectangleColliderComponent::RectangleColliderComponent ( const vec2 &  size,
const tstring layers,
uint8  n = 1 
)
star::RectangleColliderComponent::RectangleColliderComponent ( float  width,
float  height,
const tstring layers,
uint8  n = 1 
)
star::RectangleColliderComponent::~RectangleColliderComponent ( )

Member Function Documentation

bool star::RectangleColliderComponent::AABBRectangleRectangleCollision ( const Rect rect1,
const Rect rect2 
) const
protected
bool star::RectangleColliderComponent::CalculateAxisSpecificCollision ( const Rect rect1,
const Rect rect2,
const vec2 &  axis 
) const
protected
bool star::RectangleColliderComponent::CalculateAxisSpecificCollision ( const Rect rect1,
const vec2 &  point1,
const vec2 &  point2,
const vec2 &  axis 
) const
protected
void star::RectangleColliderComponent::CollidesWith ( const BaseColliderComponent other) const
virtual
bool star::RectangleColliderComponent::CollidesWithLine ( const vec2 &  point1,
const vec2 &  point2 
) const
virtual
bool star::RectangleColliderComponent::CollidesWithPoint ( const vec2 &  point) const
virtual
void star::RectangleColliderComponent::GetColliisonRectSize ( vec2 &  outVec) const
Rect star::RectangleColliderComponent::GetCollisionRect ( ) const
float star::RectangleColliderComponent::GetCollisionRectHeight ( ) const
float star::RectangleColliderComponent::GetCollisionRectWidth ( ) const
void star::RectangleColliderComponent::InitializeColliderComponent ( )
protectedvirtual
bool star::RectangleColliderComponent::OOBBRectangleRectangleCollision ( const Rect rect1,
const Rect rect2 
) const
protected
bool star::RectangleColliderComponent::RectangleCircleCollision ( const RectangleColliderComponent collider1,
const CircleColliderComponent collider2 
) const
protected
void star::RectangleColliderComponent::SetCollisionRectSize ( float  width,
float  height 
)
void star::RectangleColliderComponent::SetCollisionRectSize ( const vec2 &  size)

Member Data Documentation

Rect star::RectangleColliderComponent::m_CollisionRect
protected

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