Class BodyCollection
- Namespace
- Alis.Core.Physic.Dynamics
- Assembly
- Alis.dll
The body collection class
public class BodyCollection : IList<Body>, ICollection<Body>, IEnumerable<Body>, IEnumerable
Inheritance
Implements
Inherited Members
Constructors
BodyCollection(World)
Initializes a new instance of the Alis.Core.Physic.Dynamics.BodyCollection class
public BodyCollection(World world)
Parameters
world
World-
The world
Fields
_generationStamp
The generation stamp
internal int _generationStamp
Field Value
_list
The body
internal readonly List<Body> _list
Field Value
_world
The world
private readonly World _world
Field Value
Properties
Count
Gets the value of the count
public int Count { get; }
Property Value
IsReadOnly
Gets the value of the is read only
public bool IsReadOnly { get; }
Property Value
this[int]
The not supported exception
public Body this[int index] { get; set; }
Property Value
Methods
Contains(Body)
Describes whether this instance contains
public bool Contains(Body item)
Parameters
item
Body-
The item
Returns
- bool
-
The bool
CopyTo(Body[], int)
Copies the to using the specified array
public void CopyTo(Body[] array, int arrayIndex)
Parameters
GetEnumerator()
Gets the enumerator
public BodyCollection.BodyEnumerator GetEnumerator()
Returns
- BodyCollection.BodyEnumerator
-
The body enumerator
IndexOf(Body)
Indexes the of using the specified item
public int IndexOf(Body item)
Parameters
item
Body-
The item
Returns
- int
-
The int
ICollection<Body>.Add(Body)
Adds the item
void ICollection<Body>.Add(Body item)
Parameters
item
Body-
The item
Exceptions
ICollection<Body>.Clear()
Clears this instance
void ICollection<Body>.Clear()
Exceptions
ICollection<Body>.Remove(Body)
Describes whether this instance remove
bool ICollection<Body>.Remove(Body item)
Parameters
item
Body-
The item
Returns
- bool
-
The bool
IEnumerable<Body>.GetEnumerator()
Gets the enumerator
IEnumerator<Body> IEnumerable<Body>.GetEnumerator()
Returns
- IEnumerator<Body>
-
An enumerator of body
IList<Body>.Insert(int, Body)
Inserts the index
void IList<Body>.Insert(int index, Body item)
Parameters
Exceptions
IList<Body>.RemoveAt(int)
Removes the at using the specified index
void IList<Body>.RemoveAt(int index)
Parameters
index
int-
The index
Exceptions
IEnumerable.GetEnumerator()
Gets the enumerator
IEnumerator IEnumerable.GetEnumerator()
Returns
- IEnumerator
-
The enumerator
See Also
-
IEnumerable<T>ICollection<T>IList<T>