C# Class hyades.physics.Body

ファイルを表示 Open project: zfedoran/bubblebound Class Usage Examples

Public Properties

Property Type Description
aabb BoundingSquare
base_shape Shape
bitmaskx Bitmask
bitmasky Bitmask
count int
curr_angle float
curr_shape Shape
damping float
force Vector2
is_dirty bool
is_merging bool
is_static bool
omega float
pointmass_list hyades.physics.PointMass[]
position Vector2
prev_angle float
scale Vector2
velocity Vector2

Public Methods

Method Description
ApplyForce ( Vector2 &point, Vector2 &force ) : void
ApplyInternalForces ( double elapsed ) : void
Body ( Shape shape, float mass ) : System
Contains ( Vector2 &point ) : bool
GetClosestPoint ( Vector2 point, Vector2 &closest, Vector2 &normal, int &pointA, int &pointB, float &edgeD ) : float
GetClosestPointMass ( Vector2 point, float &dist ) : PointMass
GetClosestPointOnEdge ( Vector2 point, int edgeNum, Vector2 &hitPt, Vector2 &normal, float &edgeD ) : float
GetClosestPointOnEdgeSquared ( Vector2 point, int edgeNum, Vector2 &hitPt, Vector2 &normal, float &edgeD ) : float
ToString ( ) : string
ToStringSimple ( ) : string
Update ( double elapsed ) : void
UpdateBodyPositionVelocityForce ( double elapsed ) : void

Private Methods

Method Description
GetBodyPositionVelocityForce ( Vector2 &position, Vector2 &velocity, Vector2 &force ) : void
RotateShape ( double elapsed ) : void
SetBodyPositionVelocityForce ( Vector2 position, Vector2 velocity, Vector2 force ) : void
UpdataAABB ( double elapsed ) : void
UpdatePointMasses ( double elapsed ) : void

Method Details

ApplyForce() public method

public ApplyForce ( Vector2 &point, Vector2 &force ) : void
point Vector2
force Vector2
return void

ApplyInternalForces() public method

public ApplyInternalForces ( double elapsed ) : void
elapsed double
return void

Body() public method

public Body ( Shape shape, float mass ) : System
shape Shape
mass float
return System

Contains() public method

public Contains ( Vector2 &point ) : bool
point Vector2
return bool

GetClosestPoint() public method

public GetClosestPoint ( Vector2 point, Vector2 &closest, Vector2 &normal, int &pointA, int &pointB, float &edgeD ) : float
point Vector2
closest Vector2
normal Vector2
pointA int
pointB int
edgeD float
return float

GetClosestPointMass() public method

public GetClosestPointMass ( Vector2 point, float &dist ) : PointMass
point Vector2
dist float
return PointMass

GetClosestPointOnEdge() public method

public GetClosestPointOnEdge ( Vector2 point, int edgeNum, Vector2 &hitPt, Vector2 &normal, float &edgeD ) : float
point Vector2
edgeNum int
hitPt Vector2
normal Vector2
edgeD float
return float

GetClosestPointOnEdgeSquared() public method

public GetClosestPointOnEdgeSquared ( Vector2 point, int edgeNum, Vector2 &hitPt, Vector2 &normal, float &edgeD ) : float
point Vector2
edgeNum int
hitPt Vector2
normal Vector2
edgeD float
return float

ToString() public method

public ToString ( ) : string
return string

ToStringSimple() public method

public ToStringSimple ( ) : string
return string

Update() public method

public Update ( double elapsed ) : void
elapsed double
return void

UpdateBodyPositionVelocityForce() public method

public UpdateBodyPositionVelocityForce ( double elapsed ) : void
elapsed double
return void

Property Details

aabb public_oe property

public BoundingSquare,hyades.physics aabb
return BoundingSquare

base_shape public_oe property

public Shape,hyades.physics base_shape
return Shape

bitmaskx public_oe property

public Bitmask,hyades.physics bitmaskx
return Bitmask

bitmasky public_oe property

public Bitmask,hyades.physics bitmasky
return Bitmask

count public_oe property

public int count
return int

curr_angle public_oe property

public float curr_angle
return float

curr_shape public_oe property

public Shape,hyades.physics curr_shape
return Shape

damping public_oe property

public float damping
return float

force public_oe property

public Vector2 force
return Vector2

is_dirty public_oe property

public bool is_dirty
return bool

is_merging public_oe property

public bool is_merging
return bool

is_static public_oe property

public bool is_static
return bool

omega public_oe property

public float omega
return float

pointmass_list public_oe property

public PointMass[],hyades.physics pointmass_list
return hyades.physics.PointMass[]

position public_oe property

public Vector2 position
return Vector2

prev_angle public_oe property

public float prev_angle
return float

scale public_oe property

public Vector2 scale
return Vector2

velocity public_oe property

public Vector2 velocity
return Vector2