class GParticle; class GWorld; enum Color { Pink, Orange, Yellow, Green, Cyan, Blue, Lavender, Rotate }; class GSpring { public: GSpring() { next = 0 ;}; GParticle* part; double K; GSpring* next; }; class GParticle { public: GParticle( double x, double y ); ~GParticle(void); void Init( GWorld* ); void AddSpring( GParticle* p ); bool HasSpring( GParticle* p ); void HideSprings( GWorld* w ); double Q; //charge double m; //mass double r; //radius GVector F; //net force GVector a; //acceleration GVector v; //velocity GVector pos; //position bool init; int initn; bool inworld; char* name; void ComputeForce( GWorld* w ); void Step( GWorld* w ); void Render(); GVector NearBy(); static void SetColor( Color c, bool dark=false ); GParticle* next; GSpring* springs; //connected springs };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 4785 | Sam Stafford |
Add new command to cycle the palette. I do not recommend that you actually use this command if you value your retinas. User-visible change. |
||
#1 | 4763 | Sam Stafford |
Rename //guest/sam_stafford/jamgraph/... to //guest/sam_stafford/jamgraph/main/... to support mainline model in sample depot. |
||
//guest/sam_stafford/jamgraph/gparticle.h | |||||
#3 | 3051 | Sam Stafford |
A few bug fixes and a few new options. Run "jamgraph -h" for info. |
||
#2 | 3033 | Sam Stafford |
Jamgraph functional. Usage: jam -ndd | jamgraph Still twiddling with the interface, so it's undocumented. |
||
#1 | 3023 | Sam Stafford |
A toy. Soon to be (hopefully) a toy powered by Jam. |