pub enum ResolvedTargetShape {
Show 13 variants
Single(SingleTargetSelector),
RadiusFromSource {
radius: f64,
},
RadiusFromTarget {
anchor: SingleTargetSelector,
radius: f64,
},
RadiusAtLocation {
location: SpatialTransform,
radius: f64,
},
Cone {
range: f64,
half_angle: f64,
heading_offset: f64,
},
ConeFromTarget {
anchor: SingleTargetSelector,
range: f64,
half_angle: f64,
heading_offset: f64,
},
ConeAtLocation {
location: SpatialTransform,
range: f64,
half_angle: f64,
heading_offset: f64,
},
ConeTowardTarget {
anchor: SingleTargetSelector,
range: f64,
half_angle: f64,
heading_offset: f64,
},
Line {
range: f64,
half_width: f64,
heading_offset: f64,
},
LineTowardTarget {
anchor: SingleTargetSelector,
range: f64,
half_width: f64,
heading_offset: f64,
},
LineAtLocation {
location: SpatialTransform,
range: f64,
half_width: f64,
heading_offset: f64,
},
Chain {
anchor: SingleTargetSelector,
origin: ChainTargetOrigin,
jump_radius: f64,
max_hits: u8,
},
Explicit(ExplicitTargets),
}Expand description
Target shape after DBC/manifest semantics have been resolved.
Variants§
Single(SingleTargetSelector)
RadiusFromSource
RadiusFromTarget
RadiusAtLocation
Cone
ConeFromTarget
ConeAtLocation
ConeTowardTarget
Line
LineTowardTarget
LineAtLocation
Chain
Explicit(ExplicitTargets)
Implementations§
Source§impl ResolvedTargetShape
impl ResolvedTargetShape
Sourcepub fn explicit(
targets: impl IntoIterator<Item = EnemyIdx>,
enemy_count: usize,
) -> Result<Self, TargetShapeError>
pub fn explicit( targets: impl IntoIterator<Item = EnemyIdx>, enemy_count: usize, ) -> Result<Self, TargetShapeError>
Validate explicit identities and deduplicate while preserving the first occurrence.
§Errors
Returns an error when any target lies outside the encounter.
Sourcepub fn explicit_targets(&self) -> Option<&[EnemyIdx]>
pub fn explicit_targets(&self) -> Option<&[EnemyIdx]>
Borrow explicit identities when this is an explicit shape.
Trait Implementations§
Source§impl Clone for ResolvedTargetShape
impl Clone for ResolvedTargetShape
Source§fn clone(&self) -> ResolvedTargetShape
fn clone(&self) -> ResolvedTargetShape
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolvedTargetShape
impl Debug for ResolvedTargetShape
Source§impl PartialEq for ResolvedTargetShape
impl PartialEq for ResolvedTargetShape
impl StructuralPartialEq for ResolvedTargetShape
Auto Trait Implementations§
impl Freeze for ResolvedTargetShape
impl RefUnwindSafe for ResolvedTargetShape
impl Send for ResolvedTargetShape
impl Sync for ResolvedTargetShape
impl Unpin for ResolvedTargetShape
impl UnsafeUnpin for ResolvedTargetShape
impl UnwindSafe for ResolvedTargetShape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more