JSim 2026.06.01-p(1)
Loading...
Searching...
No Matches
frcsim::BallGamepieceSim::ProjectileEntity Struct Reference

In-flight entity not currently represented by BallPhysicsSim3D. More...

#include <ball_gamepiece_sim.hpp>

Public Attributes

GamePieceType type {GamePieceType::kBall}
Vector3 position_m {}
Vector3 velocity_mps {}
Vector3 spin_radps {}
double gravity_mps2 {9.81}
double age_s {0.0}
bool active {true}
bool spawn_on_ground_after_touch {true}
bool hit_target {false}
std::function< void()> hit_target_callback {}

Detailed Description

In-flight entity not currently represented by BallPhysicsSim3D.

Member Data Documentation

◆ active

bool frcsim::BallGamepieceSim::ProjectileEntity::active {true}

False when projectile is retired from simulation.

◆ age_s

double frcsim::BallGamepieceSim::ProjectileEntity::age_s {0.0}

Accumulated projectile age in seconds.

◆ gravity_mps2

double frcsim::BallGamepieceSim::ProjectileEntity::gravity_mps2 {9.81}

Downward gravity magnitude used by this projectile.

◆ hit_target

bool frcsim::BallGamepieceSim::ProjectileEntity::hit_target {false}

Set true when a goal hit is detected.

◆ hit_target_callback

std::function<void()> frcsim::BallGamepieceSim::ProjectileEntity::hit_target_callback {}

Optional callback invoked when the projectile hits a goal.

◆ position_m

Vector3 frcsim::BallGamepieceSim::ProjectileEntity::position_m {}

Current projectile position in world coordinates.

◆ spawn_on_ground_after_touch

bool frcsim::BallGamepieceSim::ProjectileEntity::spawn_on_ground_after_touch {true}

If true, touchdown spawns a grounded ball entity.

◆ spin_radps

Vector3 frcsim::BallGamepieceSim::ProjectileEntity::spin_radps {}

Projectile spin in world frame.

◆ type

GamePieceType frcsim::BallGamepieceSim::ProjectileEntity::type {GamePieceType::kBall}

Type for acceptance checks and spawn behavior.

◆ velocity_mps

Vector3 frcsim::BallGamepieceSim::ProjectileEntity::velocity_mps {}

Current projectile velocity in world frame.


The documentation for this struct was generated from the following file: