Interface ISplicedVectorPoint<TPoint, TVectorPoint>
A partial vector point is a point that can be translated by "adding" a vector point.
Partial vectors can be seen as a pair, one of which is a vector(of type TVectorPoint). All the operations actually operate on the vector of this pair.
Partial vector points are used in SplicedGrids, where the second of the pair is an index that denotes the sub-cell.For example, for a tri point, the vector is a hex point, and the index denotes whether the point refers to the up or down triangle.
[Version(1, 0, 0)]
public interface ISplicedVectorPoint<TPoint, TVectorPoint> where TPoint : ISplicedVectorPoint<TPoint, TVectorPoint> where TVectorPoint : IVectorPoint<TVectorPoint>
Type Parameters
TPoint
The type that implements this interface.
TVectorPoint
The type used to translate TPoints.
- Extension Methods
Methods
MoveBackBy(TPoint)
If a spliced vectors u and v has base vector B and index I
TPoint MoveBackBy(TPoint splicedVector)
Parameters
splicedVector
TPoint
Returns
- TPoint
Remarks
new SplicedVector(u.B.Subtract(v.B), (SpliceCount + u.I - v.I) % SpliceCount))
MoveBy(TPoint)
If a spliced vectors u and v has base vector B and index I,
TPoint MoveBy(TPoint splicedVector)
Parameters
splicedVector
TPoint
Returns
- TPoint
Remarks
This operation is the same as
new SplicedVector(u.B.Translate(v.B), (u.I + v.I) % SpliceCount))
Negate()
Returns a new point with the vector component negated.
TPoint Negate()
Returns
- TPoint
Subtract(TVectorPoint)
Translates this point by the negation of the given vector.
TPoint Subtract(TVectorPoint vector)
Parameters
vector
TVectorPoint
Returns
- TPoint
Translate(TVectorPoint)
Translate this point by the given vector.
TPoint Translate(TVectorPoint vector)
Parameters
vector
TVectorPoint
Returns
- TPoint