Represents a set of asteroids with similar orbits.
More...
|
override string | ToString () |
| Returns a string that represents the current object. More...
|
|
Represents a set of asteroids with similar orbits.
- Warning
- Population objects are typically initialized using an external traversal, rather than a constructor. Therefore, traditional validity guarantees cannot be enforced. Instead, the Population class makes heavier than usual use of defensive programming.
- Note
- To avoid breaking the persistence code, Population may not have subclasses
Creates a dummy population.
- Postcondition
- The object is initialized to a state in which it will not be expected to generate orbits. Any orbits that are generated will be located inside the Sun, causing the game to immediately delete the object with the orbit.
- Exception Safety
- Does not throw exceptions.
- Note
- Required by interface of ConfigNode.LoadObjectFromConfig()
Generates a random orbit consistent with the population properties.
- Returns
- The orbit of a randomly selected member of the population
- Exceptions
-
System.InvalidOperationException | Thrown if population's parameter values cannot produce valid orbits. |
- Exception Safety
- The program is in a consistent state in the event of an exception
- Todo:
- Break up this function
Returns the rate at which asteroids are discovered in the population.
- Returns
- The rate relative to the rates of all other populations.
- Exception Safety
- Does not throw exceptions.
override string ToString |
( |
| ) |
|
The documentation for this class was generated from the following file: