15 static bool locked =
false;
25 void orbitersAdded(
const t_note_id &a_note_id)
31 orbiterAccessorSet.bind(m_rg_dataset->scope());
34 orbiterRecords.clear();
35 orbiterAccessorSet.filter(orbiterRecords, m_rg_dataset);
40 void step(t_moa_real dt)
override 48 for (
fe::Record orbiterRecord : orbiterRecords)
50 fe::Real radius = orbiterAccessorSet.
orbitRadius(orbiterRecord);
51 fe::Real angularVelocity = 180.0 * M_PI/180.0;
52 orbiterAccessorSet.
orbitAngle(orbiterRecord) += angularVelocity * dt;
55 offsetFromCenter[0] += radius * cos(orbiterAccessorSet.
orbitAngle(orbiterRecord));
56 offsetFromCenter[1] += radius * sin(orbiterAccessorSet.
orbitAngle(orbiterRecord));
58 orbiterAccessorSet.
transform(orbiterRecord).translation() =
59 offsetFromCenter + orbiterAccessorSet.
orbitPoint(orbiterRecord);
70 a_spOrchestrator->connect(
this, &OrbiterSystem::orbitersAdded,
"orbitersAdded");
71 a_spOrchestrator->connect(
this, &OrbiterSystem::orbitersAdded, FE_NOTE_COMPILE);
75 std::vector<fe::Record> orbiterRecords;
void step(t_moa_real dt) override
Move system forward in time by a timestep.
Definition: OrbiterSystem.h:40
kernel
Definition: namespace.dox:3
virtual void connectOrchestrator(sp< OrchestratorI > a_spOrchestrator)
Callback for the System to register itself to the orchestrator.
Definition: Stepper.h:58
Time Stepping System.
Definition: Stepper.h:15
fe::Accessor< fe::Real > orbitRadius
Radius of orbit.
Definition: AsOrbiter.h:39
void connectOrchestrator(fe::sp< OrchestratorI > a_spOrchestrator) override
Callback for the System to register itself to the orchestrator.
Definition: OrbiterSystem.h:66
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
fe::Accessor< fe::SpatialTransform > transform
Object transform to modify.
Definition: AsOrbiter.h:30
Test-only.
Definition: AsOrbiter.h:19
fe::Accessor< fe::SpatialVector > orbitPoint
Point to orbit about.
Definition: AsOrbiter.h:37
Test-only.
Definition: OrbiterSystem.h:22
fe::Accessor< fe::Real > orbitAngle
Current orbit angle.
Definition: AsOrbiter.h:35