Show / Hide Table of Contents

Class PathSegment

A waypoint along the route.

Inheritance
System.Object
PathSegment
Implements
System.IEquatable<PathSegment>
Namespace: Eco.Shared.Pathing
Assembly: Eco.Shared.dll
Syntax
public sealed class PathSegment : ValueType, IEquatable<PathSegment>
Remarks

WARNING: This struct must match exactly the AIPathSegment struct in AnimalAITargetSystem, change both if you edit.

Constructors

PathSegment(PathSegment.MovementType, Single, Single, Vector3, Single, Single, Vector3, Vector3, Vector3, Single, WaypointFlags)

Declaration
public PathSegment(PathSegment.MovementType movement, float distanceSoFar, float angleDelta, Vector3 dir, float timeSoFar, float turningTime, Vector3 position, Vector3 arcCenter, Vector3 arcEnterPos, float arcRadius, WaypointFlags flags)
Parameters
Type Name Description
PathSegment.MovementType movement
System.Single distanceSoFar
System.Single angleDelta
System.Numerics.Vector3 dir
System.Single timeSoFar
System.Single turningTime
System.Numerics.Vector3 position
System.Numerics.Vector3 arcCenter
System.Numerics.Vector3 arcEnterPos
System.Single arcRadius
WaypointFlags flags

PathSegment(Single, Single, Vector3, Single, Single, Vector3, WaypointFlags)

Declaration
public PathSegment(float distanceSoFar, float angleDelta, Vector3 dir, float timeSoFar, float turningTime, Vector3 position, WaypointFlags flags)
Parameters
Type Name Description
System.Single distanceSoFar
System.Single angleDelta
System.Numerics.Vector3 dir
System.Single timeSoFar
System.Single turningTime
System.Numerics.Vector3 position
WaypointFlags flags

Fields

AngleDelta

Declaration
public readonly float AngleDelta
Field Value
Type Description
System.Single

ArcCenter

Declaration
public readonly Vector3 ArcCenter
Field Value
Type Description
System.Numerics.Vector3

ArcEnterPos

Declaration
public readonly Vector3 ArcEnterPos
Field Value
Type Description
System.Numerics.Vector3

ArcRadius

Declaration
public readonly float ArcRadius
Field Value
Type Description
System.Single

DistanceSoFar

Declaration
public readonly float DistanceSoFar
Field Value
Type Description
System.Single

EndDir

Declaration
public readonly Vector3 EndDir
Field Value
Type Description
System.Numerics.Vector3

EndPos

Declaration
public readonly Vector3 EndPos
Field Value
Type Description
System.Numerics.Vector3

Flags

Declaration
public readonly WaypointFlags Flags
Field Value
Type Description
WaypointFlags

Movement

Declaration
public readonly PathSegment.MovementType Movement
Field Value
Type Description
PathSegment.MovementType

TimeSoFar

Declaration
public readonly float TimeSoFar
Field Value
Type Description
System.Single

TurningTime

Declaration
public readonly float TurningTime
Field Value
Type Description
System.Single

Properties

DebugDesc

Declaration
public string DebugDesc { get; }
Property Value
Type Description
System.String

Methods

Equals(PathSegment)

Declaration
public bool Equals(PathSegment other)
Parameters
Type Name Description
PathSegment other
Returns
Type Description
System.Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

FromBytes(ref ByteSpanReader)

Declaration
public static PathSegment FromBytes(ref ByteSpanReader reader)
Parameters
Type Name Description
ByteSpanReader reader
Returns
Type Description
PathSegment

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

ToBytes(BinaryWriter)

Declaration
public void ToBytes(BinaryWriter writer)
Parameters
Type Name Description
System.IO.BinaryWriter writer

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

Equality(PathSegment, PathSegment)

Declaration
public static bool operator ==(PathSegment left, PathSegment right)
Parameters
Type Name Description
PathSegment left
PathSegment right
Returns
Type Description
System.Boolean

Inequality(PathSegment, PathSegment)

Declaration
public static bool operator !=(PathSegment left, PathSegment right)
Parameters
Type Name Description
PathSegment left
PathSegment right
Returns
Type Description
System.Boolean

Implements

System.IEquatable<>

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾