Module subtr_actor::collector::ndarray
source · Re-exports
pub use derive_new;
pub use paste;
Structs
NDArrayCollector
is aCollector
which transforms frame-based replay data into a 2-dimensional array of typendarray::Array2
, where each element is of a specified floating point type.- Represents the column headers in the collected data of an
NDArrayCollector
. - A struct that contains both the metadata of a replay and the associated column headers.
Traits
- This trait acts as an abstraction over a feature adder, and is primarily used to allow for heterogeneous collections of feature adders in the
NDArrayCollector
. While it provides methods for adding features and retrieving column headers, it is generally recommended to implement theLengthCheckedFeatureAdder
trait instead, which provides compile-time guarantees about the number of features returned. - This trait is stricter version of the
FeatureAdder
trait, enforcing at compile time that the number of features added is equal to the number of column headers provided. Implementations of this trait can be automatically adapted to theFeatureAdder
trait using theimpl_feature_adder!
macro. - This trait is a more strict version of the
PlayerFeatureAdder
trait, enforcing at compile time that the number of player-specific features added is equal to the number of column headers provided. Implementations of this trait can be automatically adapted to thePlayerFeatureAdder
trait using theimpl_player_feature_adder!
macro. - This trait acts as an abstraction over a player-specific feature adder, and is primarily used to allow for heterogeneous collections of player feature adders in the
NDArrayCollector
. While it provides methods for adding player-specific features and retrieving column headers, it is generally recommended to implement theLengthCheckedPlayerFeatureAdder
trait instead, which provides compile-time guarantees about the number of features returned.
Functions
- Unconditionally convert any error into a
SubtrActorError
of with theSubtrActorErrorVariant::FloatConversionError
variant. - Extracts the location, rotation, linear velocity and angular velocity from a
boxcars::RigidBody
and converts them to a type implementingTryFrom<f32>
. - Extracts the location and rotation from a
boxcars::RigidBody
and converts them to a type implementingTryFrom<f32>
.