Character3DContacts class final
What a character touched, packed: count contacts, each the body and the character touched (one of them 0), stride floats — position (3), normal toward the character (3), velocity of the point touched (3), distance (1) — and two flags, with no object per contact (Physics3DWorld.readCharacterContacts).
A world refills it on every read, into its own buffers; the contents are good until the world's next read.
Constructors
- Character3DContacts()
- An empty buffer.
Properties
- count ↔ int
-
How many contacts were written.
getter/setter pair
- data ↔ Float32List
-
count × stride floats.
getter/setter pair
-
flags
↔ List<
int> -
Each contact's flags: bit 0 a sensor, bit 1 an actual collision.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
touched
↔ List<
int> -
The body and the character of each contact: 2 × count.
getter/setter pair
Methods
-
bodyOf(
int i) → int -
The body the
ith contact touched, or 0. -
characterOf(
int i) → int -
The character the
ith contact touched, or 0. -
contactAt(
int i) → Character3DContact -
The
ith contact as an object. -
distanceOf(
int i) → double -
The
ith contact's distance: zero or less when touching. -
hadCollision(
int i) → bool -
Whether the character actually ran into the
ith contact's body. -
isSensor(
int i) → bool -
Whether the
ith contact's body is a sensor. -
normalInto(
int i, Vector3 out) → void -
The
ith contact's normal, toward the character, written intoout. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
positionInto(
int i, Vector3 out) → void -
Where the
ith contact is, written intoout. -
set(
int count, List< int> touched, Float32List data, List<int> flags) → void -
Sets
count,touched,dataandflags(a backend's own buffers). -
toString(
) → String -
A string representation of this object.
inherited
-
velocityInto(
int i, Vector3 out) → void -
How fast the point the
ith contact touched moves, written intoout.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited