Back to Aurora Vision Library Lite website
You are here: Start » Geometry 2D » Geometry 2D Interpolations » LerpSegments
LerpSegments
Header: | AVL.h |
---|---|
Namespace: | avl |
Linearly interpolates between two segments.
Syntax
void avl::LerpSegments ( const avl::Segment2D& inSegment0, const avl::Segment2D& inSegment1, float inLambda, bool inIgnoreOrientation, avl::Segment2D& outSegment )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inSegment0 | const Segment2D& | ||||
inSegment1 | const Segment2D& | ||||
inLambda | float | - - | 0.5f | Interpolation between the input segments where 0.0 value is equal to inSegment0 and 1.0 to inSegment1 | |
inIgnoreOrientation | bool | ||||
outSegment | Segment2D& |
In-place Processing
This function supports in-place data processing - you can pass the same reference to inSegment1 and outSegment
Read more about In-place Computation.
Examples
Remarks
Please note that:
- interpolation begins at inSegment0,
- for positive inLambda values interpolation is performed in the direction of inSegment1 while for negative - in the direction of a segment which is the result of the following operation: (inSegment0 - inSegment1), in example a segment consisting of inSegment1 points mirrored by the corresponding inSegment0 points.