Struct ColliderKeyPath
Stores a ColliderKey along with the number of bits in it that are used. This is useful for building keys from root to leaf, the bit count shows where to place the child key bits.
Inherited Members
Namespace: Unity.Physics
Syntax
public struct ColliderKeyPath
Constructors
ColliderKeyPath(ColliderKey, UInt32)
Constructor.
Declaration
public ColliderKeyPath(ColliderKey key, uint numKeyBits)
Parameters
Type | Name | Description |
---|---|---|
ColliderKey | key | The key. |
UInt32 | numKeyBits | Number of key bits. |
Properties
Empty
Gets the empty ColliderKeyPath.
Declaration
public static readonly ColliderKeyPath Empty { get; }
Property Value
Type | Description |
---|---|
ColliderKeyPath | The empty ColliderKeyPath. |
Key
Gets the collider key.
Declaration
public readonly ColliderKey Key { get; }
Property Value
Type | Description |
---|---|
ColliderKey | The collider key. |
Methods
GetLeafKey(ColliderKey)
Get the collider key for a leaf shape that is a child of the shape referenced by this path.
Declaration
public ColliderKey GetLeafKey(ColliderKey leafKeyLocal)
Parameters
Type | Name | Description |
---|---|---|
ColliderKey | leafKeyLocal | The local leaf key. |
Returns
Type | Description |
---|---|
ColliderKey | The local leaf key. |
PopChildKey(UInt32)
Remove the most leafward shape's key from this path.
Declaration
public void PopChildKey(uint numChildKeyBits)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | numChildKeyBits | Number of child key bits. |
PushChildKey(ColliderKeyPath)
Append the local key for a child of the shape referenced by this path.
Declaration
public void PushChildKey(ColliderKeyPath child)
Parameters
Type | Name | Description |
---|---|---|
ColliderKeyPath | child | The child. |