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

Goal capture region and validation logic. More...

#include <ball_gamepiece_sim.hpp>

Public Types

enum class  Shape { kBox , kSphere }
 Supported built-in goal geometries. More...

Public Attributes

Shape shape {Shape::kBox}
Vector3 center_m {}
Vector3 half_extents_m {0.2, 0.2, 0.2}
double radius_m {0.25}
GamePieceType accepted_type {GamePieceType::kBall}
bool accept_any_type {false}
bool require_positive_vertical_velocity {false}
std::function< bool(const Vector3 &)> custom_velocity_validator {}

Detailed Description

Goal capture region and validation logic.

Member Enumeration Documentation

◆ Shape

Supported built-in goal geometries.

Enumerator
kBox 
kSphere 

Member Data Documentation

◆ accept_any_type

bool frcsim::BallGamepieceSim::GoalZone::accept_any_type {false}

When true, accepts all gamepiece types.

◆ accepted_type

GamePieceType frcsim::BallGamepieceSim::GoalZone::accepted_type {GamePieceType::kBall}

Accepted gamepiece type enum for score checks.

◆ center_m

Vector3 frcsim::BallGamepieceSim::GoalZone::center_m {}

Zone center in world coordinates.

◆ custom_velocity_validator

std::function<bool(const Vector3&)> frcsim::BallGamepieceSim::GoalZone::custom_velocity_validator {}

Optional velocity-rule override.

◆ half_extents_m

Vector3 frcsim::BallGamepieceSim::GoalZone::half_extents_m {0.2, 0.2, 0.2}

Half extents for box zones.

◆ radius_m

double frcsim::BallGamepieceSim::GoalZone::radius_m {0.25}

Radius for sphere zones.

◆ require_positive_vertical_velocity

bool frcsim::BallGamepieceSim::GoalZone::require_positive_vertical_velocity {false}

Requires upward velocity at score time when true.

◆ shape

Shape frcsim::BallGamepieceSim::GoalZone::shape {Shape::kBox}

Geometry mode for this zone.


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