MRIExperimentState¶
A single-frame snapshot of all experiment state, collected during demo playback.
Syntax¶
Remarks¶
Each instance records the simulation time, frame number, all agent component positions and rotations, and the subject's replicated player state (TTL, points, beep, etc.). Implements IMRIAgentComponentVisitor so that agent components can push their data in.
After collection, call WriteToFile() to serialize the frame as XML-style log output.
Interfaces Implemented¶
IMRIAgentComponentVisitor
Methods¶
| Method | Signature | Description | Blueprint |
|---|---|---|---|
| GetDisplayedPromptType | EDisplayedPromptType MRIExperimentState::GetDisplayedPromptType() const |
Returns the type of prompt being displayed at the time of this frame. | |
| GetFrame | int MRIExperimentState::GetFrame() const |
Returns the rendered frame index for this snapshot. | |
| GetFrameTime | double MRIExperimentState::GetFrameTime() const |
Returns the simulation time at which this frame was captured. | |
| GetPoints | int MRIExperimentState::GetPoints() const |
Returns the subject's accumulated points at the time of this frame. | |
| IsBeep | bool MRIExperimentState::IsBeep() const |
Returns whether a synchronization beep was playing during this frame. | |
| MRIExperimentState | MRIExperimentState::MRIExperimentState(double time)MRIExperimentState::MRIExperimentState(double time, int frame)MRIExperimentState::MRIExperimentState(double time, int frame, TArray< const UMRIAgentComponent * > agents)MRIExperimentState::MRIExperimentState(double time, int frame, TArray< const UMRIAgentComponent * > agents, AMRISubjectState *playerState) |
Constructs a state snapshot for the given simulation time. | |
| Num | int MRIExperimentState::Num() const |
Returns the number of entity states recorded in this frame. | |
| RecordStates | void MRIExperimentState::RecordStates(TArray< const UMRIAgentComponent * > agents) |
Visits all agent components in the given array and records their states. | |
| TotalTTLCount | int MRIExperimentState::TotalTTLCount() const |
Returns the total number of TTLs recorded at the time of this frame. | |
| Visit | void MRIExperimentState::Visit(const UMRIAgentComponent &agent) override |
Called by UMRIAgentComponent::AcceptVisitor to record this agent's state. | |
| WriteContents | void MRIExperimentState::WriteContents(std::ofstream &stream, int &indent) |
Writes the inner XML content for this frame. | |
| WriteToFile | void MRIExperimentState::WriteToFile(std::ofstream &logFile, int &indentation) |
Writes the state at this frame out to XML at the given file stream. | |
| operator[] | EntityState & MRIExperimentState::operator[](int index) |
Returns the EntityState at the given index. | |
| ~MRIExperimentState | MRIExperimentState::~MRIExperimentState() |
Destructor. |
Properties¶
| Property | Type | Description | Blueprint |
|---|---|---|---|
| isTTL | bool |
True if a TTL pulse was active during this frame. |