NBody.h
Classes
- NBody -- Simple class which provides brute force n-body simulation and display. (full description)
Interface
- Public Members
- NBody()
- virtual ~NBody()
- virtual Bool linToWorld(Vector<Double>& world, const Vector<Double>& lin)
- virtual Bool worldToLin(Vector<Double>& lin, const Vector<Double>& world)
- virtual void setActiveImage(uInt zindex)
- virtual Vector<String> worldAxisNames()
- virtual Vector<String> worldAxisUnits()
- virtual const Unit dataUnit()
- virtual const RecordInterface& miscInfo()
- virtual const uInt nelements(const WorldCanvasHolder& wcHolder) const
- virtual const uInt nelements() const
- virtual void addElementRestrictions(const uInt itemNum, AttributeBuffer& other)
- virtual void addElementRestriction(const uInt itemNum, Attribute& newRestriction, Bool permanent)
- virtual void setElementRestrictions(const uInt itemNum, AttributeBuffer& other)
- virtual void setElementRestriction(const uInt itemNum, Attribute& newRestriction)
- virtual void removeElementRestriction(const uInt itemNum, const String& name)
- virtual void clearElementRestrictions(const uInt itemNum)
- virtual Bool existElementRestriction(const uInt itemNum, const String& name)
- virtual AttributeBuffer *elementRestrictionBuffer(const uInt itemNum)
- virtual Double getDataMin()
- virtual Double getDataMax()
- virtual Bool sizeControl(WorldCanvasHolder& wcHolder, AttributeBuffer& holderBuf)
- virtual void positionEH(const WCPositionEvent& ev)
- virtual void motionEH(const WCMotionEvent& ev)
- virtual void refreshEH(const WCRefreshEvent& ev)
- virtual void cleanup()
- virtual String showPosition(const Vector<Double> &, const Bool &)
- virtual String showValue(const Vector<Double> &)
- virtual Display::DisplayDataType classType()
- Private Members
- void setupStars()
- void cleanupStars()
- void drawImage(WorldCanvas& wCanvas)
- void setScale()
- Bool iDidSizeControl(WorldCanvas& wCanvas)
- void drawMovie(WorldCanvas& wCanvas, Int numSteps, Double timeStep, Double dampingFactor)
Review Status
- Date Reviewed:
- yyyy/mm/dd
Synopsis
This class provides a simple object which can (by brute force)
calculated the internal gravitational forces acting on a
self-gravitating set of bodies.
Member Description
Constructor.
Destructor.
virtual Bool linToWorld(Vector<Double>& world, const Vector<Double>& lin)
virtual Bool worldToLin(Vector<Double>& lin, const Vector<Double>& world)
Coordinate transformations, called by the WorldCanvasHolder.
irrelevant in this part of the tree
Routines which yield information on the axis names and units, and
some miscellaneous information.
Return the number of elements in this DisplayData.
virtual const uInt nelements() const
Add a restriction for item itemNum of this
DisplayData.
Set a restriction for item itemNum of this
DisplayData.
Remove a restriction from item itemNum.
Clear all restrictions of item itemNum (except the
ones that are permanent of course).
Check if a restriction for item itemNum with name
name exists.
Get a handle to the buffer of restrictions for item
itemNum. Throws an exception of type AipsError if
itemNum is out of range.
Report the minimum and maximum data values for this DisplayData.
sizeControlFunction, called by the WorldCanvasHolder.
Position event handler, called by the WorldCanvasHolder.
Motion event handler, called by the WorldCanvasHolder.
Refresh event handler, called by the WorldCanvasHolder.
virtual void cleanup()
Clean up, ie. remove cached images etc.
required functions with null implementations
Check if this NBody did the sizeControl
void drawMovie(WorldCanvas& wCanvas, Int numSteps, Double timeStep, Double dampingFactor)