|
JSim 2026.06.01-p(1)
|
Scoring volume definition used by arena presets and projectile checks. More...
#include <goal_structure.hpp>
Public Types | |
| enum class | Shape { kBox , kSphere , /home/runner/work/JSim/JSim/vendordep/src/main/driver/include/frcsim/field/goal_structure.hpp , kCustom } |
| Built-in geometry modes for goal containment tests. More... | |
| enum class | AcceptedType { kAny , kBall , kCustom1 , kCustom2 , kCustom3 , kCustom4 } |
| Supported gamepiece type filters for scoring validation. More... | |
Public Member Functions | |
| bool | contains (const Vector3 &position_m) const |
| Test whether a position is contained within this goal's volume. | |
| bool | velocityAllowed (const Vector3 &velocity_mps) const |
| Test whether a velocity satisfies score acceptance constraints. | |
Public Attributes | |
| Shape | shape {Shape::kBox} |
| Vector3 | center_m {} |
| Goal center position in world coordinates (meters). | |
| Vector3 | half_extents_m {0.2, 0.2, 0.2} |
| Half-extent dimensions used when shape is kBox (meters). | |
| double | radius_m {0.25} |
| Sphere radius used when shape is kSphere (meters). | |
| AcceptedType | accepted_type {AcceptedType::kBall} |
| Filter for accepted gamepiece types (allows selective scoring). | |
| bool | require_positive_vertical_velocity {false} |
| When true, scoring requires upward (+Z) velocity unless custom validator overrides. | |
| std::function< bool(const Vector3 &)> | custom_position_checker {} |
| Optional custom position test for complex geometry in kCustom mode. | |
| std::function< bool(const Vector3 &)> | custom_velocity_validator {} |
| Optional custom validator for velocity constraints during scoring. | |
Scoring volume definition used by arena presets and projectile checks.
|
strong |
|
strong |
Built-in geometry modes for goal containment tests.
| Enumerator | |
|---|---|
| kBox | |
| kSphere | |
| /home/runner/work/JSim/JSim/vendordep/src/main/driver/include/frcsim/field/goal_structure.hpp | User-defined shape handled by custom_position_checker. To use this mode, set shape to kCustom and provide custom_position_checker. GoalStructure goal{};
goal.shape = GoalStructure::Shape::kCustom;
// Example: accept points inside a simple vertical "capsule-like"
&& d.z <= 0.45;
};
Scoring volume definition used by arena presets and projectile checks. Definition goal_structure.hpp:15 std::function< bool(const Vector3 &)> custom_position_checker Optional custom position test for complex geometry in kCustom mode. Definition goal_structure.hpp:66 Vector3 center_m Goal center position in world coordinates (meters). Definition goal_structure.hpp:54 |
| kCustom | |
|
inline |
Test whether a position is contained within this goal's volume.
| position_m | Position to test in world coordinates (meters). |
|
inline |
Test whether a velocity satisfies score acceptance constraints.
| velocity_mps | Velocity vector in world frame (m/s). |
| AcceptedType frcsim::GoalStructure::accepted_type {AcceptedType::kBall} |
Filter for accepted gamepiece types (allows selective scoring).
| Vector3 frcsim::GoalStructure::center_m {} |
Goal center position in world coordinates (meters).
| std::function<bool(const Vector3&)> frcsim::GoalStructure::custom_position_checker {} |
Optional custom position test for complex geometry in kCustom mode.
| std::function<bool(const Vector3&)> frcsim::GoalStructure::custom_velocity_validator {} |
Optional custom validator for velocity constraints during scoring.
| Vector3 frcsim::GoalStructure::half_extents_m {0.2, 0.2, 0.2} |
Half-extent dimensions used when shape is kBox (meters).
| double frcsim::GoalStructure::radius_m {0.25} |
Sphere radius used when shape is kSphere (meters).
| bool frcsim::GoalStructure::require_positive_vertical_velocity {false} |
When true, scoring requires upward (+Z) velocity unless custom validator overrides.
| Shape frcsim::GoalStructure::shape {Shape::kBox} |
Selected geometry mode for this goal.