Logo
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Yukar.Engine.TouchCollider Class Referenceabstract

hit detection for touch More...

Inheritance diagram for Yukar.Engine.TouchCollider:
Yukar.Engine.TouchRectCollider

Public Types

enum  EdgePosition {
  None = -1 , Left , Right , Top ,
  Bottom , LeftTop , LeftBottom , RightTop ,
  RightBottom
}
 

Public Member Functions

abstract int IsTouching (SharpKmyMath.Vector2 touchPos)
 
abstract int IsTouchingCenter (SharpKmyMath.Vector2 touchPos, float centerLength)
 
abstract System.Tuple< int, EdgePositionIsTouchingEdge (SharpKmyMath.Vector2 touchPos, float edgeLength)
 
abstract bool IsOutOfRange (SharpKmyMath.Vector2 touchPos)
 
abstract int CollideRectangele (SharpKmyMath.Rectangle rectangle)
 
abstract bool IsOutOfRange (SharpKmyMath.Rectangle rectangle)
 
abstract int CoverRectangle (SharpKmyMath.Rectangle rectangle)
 
abstract void Draw (Microsoft.Xna.Framework.Color color)
 

Static Public Attributes

const int RESULT_OUT_OF_RANGE = -2
 

Protected Member Functions

 TouchCollider ()
 
 TouchCollider (int result)
 

Protected Attributes

int result = -1
 

Static Protected Attributes

static readonly int Alpha = 100
 
static readonly float FloatAlpha = Alpha / 255.0f
 

Detailed Description

hit detection for touch

Member Enumeration Documentation

◆ EdgePosition

Enumerator
None 
Left 
Right 
Top 
Bottom 
LeftTop 
LeftBottom 
RightTop 
RightBottom 

Constructor & Destructor Documentation

◆ TouchCollider() [1/2]

Yukar.Engine.TouchCollider.TouchCollider ( )
protected

◆ TouchCollider() [2/2]

Yukar.Engine.TouchCollider.TouchCollider ( int  result)
protected

Member Function Documentation

◆ CollideRectangele()

abstract int Yukar.Engine.TouchCollider.CollideRectangele ( SharpKmyMath.Rectangle  rectangle)
pure virtual

◆ CoverRectangle()

abstract int Yukar.Engine.TouchCollider.CoverRectangle ( SharpKmyMath.Rectangle  rectangle)
pure virtual

◆ Draw()

abstract void Yukar.Engine.TouchCollider.Draw ( Microsoft.Xna.Framework.Color  color)
pure virtual

◆ IsOutOfRange() [1/2]

abstract bool Yukar.Engine.TouchCollider.IsOutOfRange ( SharpKmyMath.Rectangle  rectangle)
pure virtual

◆ IsOutOfRange() [2/2]

abstract bool Yukar.Engine.TouchCollider.IsOutOfRange ( SharpKmyMath.Vector2  touchPos)
pure virtual

◆ IsTouching()

abstract int Yukar.Engine.TouchCollider.IsTouching ( SharpKmyMath.Vector2  touchPos)
pure virtual

◆ IsTouchingCenter()

abstract int Yukar.Engine.TouchCollider.IsTouchingCenter ( SharpKmyMath.Vector2  touchPos,
float  centerLength 
)
pure virtual

◆ IsTouchingEdge()

abstract System.Tuple< int, EdgePosition > Yukar.Engine.TouchCollider.IsTouchingEdge ( SharpKmyMath.Vector2  touchPos,
float  edgeLength 
)
pure virtual

Member Data Documentation

◆ Alpha

readonly int Yukar.Engine.TouchCollider.Alpha = 100
staticprotected

◆ FloatAlpha

readonly float Yukar.Engine.TouchCollider.FloatAlpha = Alpha / 255.0f
staticprotected

◆ result

int Yukar.Engine.TouchCollider.result = -1
protected

◆ RESULT_OUT_OF_RANGE

const int Yukar.Engine.TouchCollider.RESULT_OUT_OF_RANGE = -2
static