VisuStruct3DTrack (FB)
FUNCTION_BLOCK VisuStruct3DTrack
This FB hosts a path or a track consisting of a number of points in 3D
The data array has a ring buffer design.
The points are added into the array after each other, while udiNumberOfPointsToDraw is incremented by 1.
After udiNumberOfPointsToDraw equals udiNumberOfPointsInArray, the data provider can override the first point again.
udiNumberOfPointsInArray is no longer incremented, but udiFirstPoint must be incremented, because the oldest point is the one, which is located one position after the newly generated one.
- InOut:
Scope
Name
Type
Comment
Input
pDataPOINTER TO ARRAY [0..0] OF VisuStruct3DPathPoint
points to an array of VisuStruct3DPathPoint elements
udiNumberOfPointsInArrayUDINTnumber of elements (points) of the above array
udiFirstPointUDINTcontains the position of first point of the path or track. 0 means thatpData^[0]is the first point:0 <=udiFirstPoint<udiNumberOfPointsInArrayudiNumberOfPointsToDrawUDINTdefines how many of the points are valid and must be painted:0 <=udiNumberOfPointsToDraw<=udiNumberOfPointsInArraypProjectionPOINTER TO Projection
Feedback of projection into path/track is done by:
VisuStruct3DTrack.pProjection. It is a variable that is set by the visualization element. The application may only read it. It contains information of the projection: by using the methodProjection.ApplyorProjection.ApplyVone can see if the transformed position lies inside the visu painting area described byProjection.ElementRector outside.