Index

Package: Physics.Bodies

Description

package Physics.Bodies is

Classes

Corpus

type Corpus is tagged limited private;

References:

physics-bodies.ads:12:10 (declaration)
physics-bodies.adb:47:41 (reference)
physics-bodies.adb:62:52 (reference)
physics-bodies.adb:142:44 (reference)
physics-bodies.adb:365:55 (reference)
physics-bodies.adb:384:45 (reference)
physics-bodies.adb:391:50 (reference)
physics-bodies.adb:399:57 (reference)
physics-bodies.adb:418:47 (reference)
physics-bodies.adb:433:46 (reference)
physics-bodies.adb:440:46 (reference)
physics-bodies.adb:447:54 (reference)
physics-bodies.adb:467:52 (reference)
physics-bodies.adb:479:56 (reference)
physics-bodies.adb:487:50 (reference)
physics-bodies.adb:503:53 (reference)
physics-bodies.adb:510:53 (reference)
physics-bodies.adb:517:52 (reference)
physics-bodies.adb:525:47 (reference)
physics-bodies.adb:546:39 (reference)
physics-bodies.adb:560:59 (reference)
physics-bodies.ads:13:33 (reference)
physics-bodies.ads:26:55 (reference)
physics-bodies.ads:30:45 (reference)
physics-bodies.ads:34:50 (reference)
physics-bodies.ads:40:57 (reference)
physics-bodies.ads:46:47 (reference)
physics-bodies.ads:51:46 (reference)
physics-bodies.ads:54:46 (reference)
physics-bodies.ads:58:54 (reference)
physics-bodies.ads:62:52 (reference)
physics-bodies.ads:68:56 (reference)
physics-bodies.ads:73:50 (reference)
physics-bodies.ads:80:53 (reference)
physics-bodies.ads:84:53 (reference)
physics-bodies.ads:87:52 (reference)
physics-bodies.ads:92:47 (reference)
physics-bodies.ads:98:39 (reference)
physics-bodies.ads:108:10 (full declaration)
physics-bodies.ads:129:52 (reference)
physics-bodies.ads:131:44 (reference)
A physical representation of an entity, used by the physics manager.

Types

A_Corpus

type A_Corpus is access all Corpus'Class;

References:

physics-bodies.ads:13:10 (declaration)
physics-bodies.adb:46:36 (reference)
physics-bodies.adb:47:25 (reference)
physics-bodies.adb:366:48 (reference)
physics-bodies.adb:392:43 (reference)
physics-bodies.adb:400:50 (reference)
physics-bodies.adb:559:37 (reference)
physics-bodies.adb:560:73 (reference)
physics-bodies.ads:22:36 (reference)
physics-bodies.ads:27:48 (reference)
physics-bodies.ads:35:43 (reference)
physics-bodies.ads:41:50 (reference)
physics-bodies.ads:101:37 (reference)
physics-bodies.ads:106:71 (reference)
physics-managers.adb:29:20 (reference)
physics-managers.adb:80:46 (reference)
physics-managers.adb:123:25 (reference)
physics-managers.adb:156:16 (reference)
physics-managers.adb:172:16 (reference)
physics-managers.adb:185:25 (reference)
physics-managers.adb:215:25 (reference)
physics-managers.adb:226:16 (reference)
physics-managers.adb:338:36 (reference)
physics-managers.adb:361:40 (reference)
physics-managers.adb:362:31 (reference)
physics-managers.ads:61:49 (reference)
physics-managers.ads:64:45 (reference)
physics-managers.ads:88:46 (reference)

Subprograms & Entries

Create_Corpus

function Create_Corpus
( id: Entity_Id;
width, height: Natural;
physical: Boolean;
clipped: Boolean;
manager: access Physics.Managers.Physics_Manager'Class )
return A_Corpus;

References:

physics-bodies.ads:16:14 (declaration)
physics-bodies.adb:40:14 (body)
physics-bodies.adb:58:9 (label)
physics-managers.adb:159:21 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:96:15
Creates a new corpus representing entity 'id', for use by 'manager'.

Detect_Collision

function Detect_Collision
( this: not null access Corpus'Class;
that: not null A_Corpus )
return Boolean;

References:

physics-bodies.ads:26:14 (declaration)
physics-bodies.adb:365:14 (body)
physics-bodies.adb:380:9 (label)
physics-managers.adb:371:46 (reference)

Called by:

Physics.Managers.Tick.Detect_Collisions.Collide_Each defined at physics-managers.adb:360:23
Performs collision detection and returns True if this corpus is touching 'that' corpus. The objects are not modified.

Get_Id

function Get_Id
( this: not null access Corpus'Class )
return Entity_Id;

References:

physics-bodies.ads:30:14 (declaration)
physics-bodies.adb:384:14 (body)
physics-bodies.adb:387:9 (label)
physics-managers.adb:375:60 (reference)
physics-managers.adb:377:61 (reference)

Called by:

Physics.Managers.Tick.Detect_Collisions.Collide_Each defined at physics-managers.adb:360:23
Physics.Managers.Tick.Detect_Collisions.Collide_Each defined at physics-managers.adb:360:23
Returns the entity id the corpus represents.

Is_Touching

function Is_Touching
( this: not null access Corpus'Class;
that: not null A_Corpus )
return Boolean;

References:

physics-bodies.ads:34:14 (declaration)
physics-bodies.adb:391:14 (body)
physics-bodies.adb:395:9 (label)
physics-managers.adb:370:46 (reference)

Called by:

Physics.Managers.Tick.Detect_Collisions.Collide_Each defined at physics-managers.adb:360:23

Calls:

Contains defined at a-coorma.ads:159:13
Returns True if 'that' corpus is in this corpus' touch list. No collision detection is performed.

Mark_Contact

procedure Mark_Contact
( this: not null access Corpus'Class;
that: not null A_Corpus;
inContact: Boolean );

References:

physics-bodies.ads:40:15 (declaration)
physics-bodies.adb:399:15 (body)
physics-bodies.adb:414:9 (label)
physics-managers.adb:372:31 (reference)
physics-managers.adb:373:31 (reference)

Called by:

Physics.Managers.Tick.Detect_Collisions.Collide_Each defined at physics-managers.adb:360:23
Physics.Managers.Tick.Detect_Collisions.Collide_Each defined at physics-managers.adb:360:23

Calls:

Delete defined at a-coorma.ads:123:14
Insert defined at a-coorma.ads:93:14
Marks the contact state between this corpus and 'that'. The corpus' touch list will be updated. Set 'inContact' to true if the two corps are in contact with each other. Corpus 'that' is not modified.

Move_To

procedure Move_To
( this: not null access Corpus'Class;
map: not null A_Clip_Map;
x, y: Float );

References:

physics-bodies.ads:46:15 (declaration)
physics-bodies.adb:418:15 (body)
physics-bodies.adb:429:9 (label)
physics-managers.adb:188:18 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:102:15
Moves the entity to the given location. An Entity_Moved event is queued. Clipping is performed so an Entity_Grounded event may also be queued.

Set_AX

procedure Set_AX
( this: not null access Corpus'Class;
ax: Float );

References:

physics-bodies.ads:51:15 (declaration)
physics-bodies.adb:433:15 (body)
physics-bodies.adb:436:9 (label)
physics-managers.adb:132:26 (reference)
physics-managers.adb:135:26 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:93:15
Physics.Managers.Handle defined at physics-managers.ads:93:15
Sets the acceleration in the X axis.

Set_AY

procedure Set_AY
( this: not null access Corpus'Class;
ay: Float );

References:

physics-bodies.ads:54:15 (declaration)
physics-bodies.adb:440:15 (body)
physics-bodies.adb:443:9 (label)
physics-managers.adb:138:26 (reference)
physics-managers.adb:141:26 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:93:15
Physics.Managers.Handle defined at physics-managers.ads:93:15
Sets the acceleration in the Y axis.

Set_Clipped

procedure Set_Clipped
( this: not null access Corpus'Class;
clipped: Boolean );

References:

physics-bodies.ads:58:15 (declaration)
physics-bodies.adb:447:15 (body)
physics-bodies.adb:463:9 (label)
physics-managers.adb:241:22 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:111:15
Sets the clipped attribute of the Corpus. Clipped corps are bounded by the wall tiles of the map.

Set_Location

procedure Set_Location
( this: not null access Corpus'Class;
map: not null A_Clip_Map;
x, y: Float );

References:

physics-bodies.ads:62:15 (declaration)
physics-bodies.adb:467:15 (body)
physics-bodies.adb:475:9 (label)
physics-managers.adb:162:18 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:96:15

Calls:

Clip defined at physics-bodies.ads:131:15
Sets the Corpus' location. No event is queued.

Set_Physical

procedure Set_Physical
( this: not null access Corpus'Class;
physical: Boolean );

References:

physics-bodies.ads:68:15 (declaration)
physics-bodies.adb:479:15 (body)
physics-bodies.adb:483:9 (label)
physics-managers.adb:234:22 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:111:15
Sets the physical attribute of the Corpus. Physical corps are affected by the forces of gravity and friction.

Set_Size

procedure Set_Size
( this: not null access Corpus'Class;
map: not null A_Clip_Map;
width, height: Natural );

References:

physics-bodies.ads:73:15 (declaration)
physics-bodies.adb:487:15 (body)
physics-bodies.adb:499:9 (label)
physics-managers.adb:218:18 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:108:15
Sets the physical size of the Corpus. The Corpus is clipped to 'map' immediately. An Entity_Resized event is queued.

Set_Target_VX

procedure Set_Target_VX
( this: not null access Corpus'Class;
vx: Float );

References:

physics-bodies.ads:80:15 (declaration)
physics-bodies.adb:503:15 (body)
physics-bodies.adb:506:9 (label)
physics-managers.adb:131:26 (reference)
physics-managers.adb:134:26 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:93:15
Physics.Managers.Handle defined at physics-managers.ads:93:15
Sets the target velocity in the X axis to accelerate toward. This does not have an immediate effect on the velocity.

Set_Target_VY

procedure Set_Target_VY
( this: not null access Corpus'Class;
vy: Float );

References:

physics-bodies.ads:84:15 (declaration)
physics-bodies.adb:510:15 (body)
physics-bodies.adb:513:9 (label)
physics-managers.adb:137:26 (reference)
physics-managers.adb:140:26 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:93:15
Physics.Managers.Handle defined at physics-managers.ads:93:15
Sets the target velocity in the Y axis to accelerate toward. This does not have an immediate effect on the velocity.

Set_Velocity

procedure Set_Velocity
( this: not null access Corpus'Class;
vx, vy: Float );

References:

physics-bodies.ads:87:15 (declaration)
physics-bodies.adb:517:15 (body)
physics-bodies.adb:521:9 (label)
physics-managers.adb:161:18 (reference)

Called by:

Physics.Managers.Handle defined at physics-managers.ads:96:15
Sets the Corpus' velocity.

Tick

procedure Tick
( this: not null access Corpus'Class;
map: not null A_Clip_Map;
dt: Float;
collide: out Boolean );

References:

physics-bodies.ads:92:15 (declaration)
physics-bodies.adb:525:15 (body)
physics-bodies.adb:542:9 (label)
physics-managers.adb:341:22 (reference)

Called by:

Physics.Managers.Tick.Tick_All.Tick_One defined at physics-managers.adb:337:23
Ticks the Corpus' changes in velocity and position and performs clipping. If 'collide' is returned True then the Corpus location changed and collision detection needs to be performed on it.

To_String

function To_String
( this: access Corpus'Class )
return String;

References:

physics-bodies.ads:98:14 (declaration)
physics-bodies.adb:546:14 (body)
physics-bodies.adb:555:9 (label)

Calls:

Support.Image defined at support.ads:104:14
Returns a string representation of the Corpus.

Delete

procedure Delete
( this: in out A_Corpus );

References:

physics-bodies.ads:101:15 (declaration)
physics-bodies.adb:559:15 (body)
physics-bodies.adb:563:9 (label)
physics-managers.adb:31:13 (reference)
physics-managers.adb:177:13 (reference)

Called by:

Physics.Managers.Clear_Corps.Examine defined at physics-managers.adb:28:19
Physics.Managers.Handle defined at physics-managers.ads:99:15

Calls:

Physics.Bodies.Delete.Free defined at physics-bodies.adb:560:19
Unchecked_Deallocation defined at a-uncdea.ads:20:15
Deletes the Corpus.