orbitPlane Class Reference

#include <orbit-plane.hpp>

Inheritance diagram for orbitPlane:

Inheritance graph
Collaboration diagram for orbitPlane:

Collaboration graph
List of all members.

Detailed Description

An orbit plane is a collection of orbits around an central (?) object such as a star, planet or ??

See also:


Definition at line 42 of file orbit-plane.hpp.

Public Member Functions

 orbitPlane ()
void add (orbitPlace *op)
void add (int ix, orbitPlace *op)
int isEmpty (int ix)

Constructor & Destructor Documentation

orbitPlane::orbitPlane (  ) 

Generic constructor.

Definition at line 29 of file orbit-plane.cpp.

00029                        : sparseVector() {
00030         root = new orbitPlace();
00032 }

Member Function Documentation

void orbitPlane::add ( int  ix,
orbitPlace op 

Place an object into the orbit plane at the spot specified by the passed parameters. See the caveat above. The orbitPlace object passed is updated with its orbit number.

ix integer value index to where the object should be placed.
op pointer to an orbitPlace object to be placed.

Definition at line 39 of file orbit-plane.cpp.

References sparseVector::addAt().

00039                                         {
00040         this->addAt(ix,p);
00041 }

Here is the call graph for this function:

void orbitPlane::add ( orbitPlace op  ) 

Add an item to the orbit plane using the parameter to determine at what orbit the object is to be placed. If an object already occupies that spot then the existing object is replaced by the new object.

op pointer to an orbitPlace object.

Definition at line 34 of file orbit-plane.cpp.

References sparseVector::addAt(), and orbitPlace::getOrbit().

00034                                  {
00035         int ix = p->getOrbit();
00036         this->addAt(ix,p);
00037 }

Here is the call graph for this function:

int orbitPlane::isEmpty ( int  ix  ) 

Determine if a given orbit index is occupied or not.

ix integer index of the orbit we are interested in
1 if the orbit is empty or 0 if occupied.

Definition at line 43 of file orbit-plane.cpp.

00043                              {
00044         if ( this->findAt(ix) == 0 ) 
00045                 return 1;
00046         else 
00047                 return 0;
00049 }

The documentation for this class was generated from the following files:
Generated on Fri Mar 7 16:42:12 2008 for frpuniverse by  doxygen 1.4.7