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
Assembly: Unity.Physics.dll
Syntax
public struct ColliderKeyPath
Constructors
ColliderKeyPath(ColliderKey, uint)
Constructor.
Declaration
public ColliderKeyPath(ColliderKey key, uint numKeyBits)
Parameters
Type | Name | Description |
---|---|---|
ColliderKey | key | The key. |
uint | numKeyBits | Number of key bits. |
Properties
Empty
Gets the empty ColliderKeyPath.
Declaration
public static ColliderKeyPath Empty { get; }
Property Value
Type | Description |
---|---|
ColliderKeyPath | The empty ColliderKeyPath. |
Key
Gets the collider key.
Declaration
public 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(uint)
Remove the most leafward shape's key from this path.
Declaration
public void PopChildKey(uint numChildKeyBits)
Parameters
Type | Name | Description |
---|---|---|
uint | 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. |