10-14-2024, 02:11 PM
By default the maximum length of the arrow can be 1/3 of the line length (on the screen). This is controller by the static LineMaterial.MaxLineArrowLength property. But this value cannot be bigger than 1 (in this case 1 is used).
This works well for individual 3D lines. In case you move the camera so that it looks in the same direction as the line, then as the line length on the screen is reducing, also the length of the arrow is reducing.
But this does not work well for polylines or other connected lines where the individual line segments are very short. In this case this reduces the line arrow length to almost zero (1/3 of the line segment length), though the total length all all line segments is much bigger.
To solve that, I have updated the Ab3d.DXEngine so that by default the length of the arrow for polylines or other connected lines is at least 2 times the line thickness (this is controlled by a new static LineMaterial.MinLineStripArrowLength property). This can still reduce the length of line arrow but this the arrow is still big enough to be easily visible. Also reducing the size of the arrow solves the problem were the arrow could look disconnected from the line, for example:
See the updated Line caps sample that now demonstrates this:
You can also increase the min size of the arrows by increasing the value of MinLineStripArrowLength. See example for 4:
This improvement will be available in the next version of the Ab3d.DXEngine.
I will send you a link by email to get a pre-release version.
This works well for individual 3D lines. In case you move the camera so that it looks in the same direction as the line, then as the line length on the screen is reducing, also the length of the arrow is reducing.
But this does not work well for polylines or other connected lines where the individual line segments are very short. In this case this reduces the line arrow length to almost zero (1/3 of the line segment length), though the total length all all line segments is much bigger.
To solve that, I have updated the Ab3d.DXEngine so that by default the length of the arrow for polylines or other connected lines is at least 2 times the line thickness (this is controlled by a new static LineMaterial.MinLineStripArrowLength property). This can still reduce the length of line arrow but this the arrow is still big enough to be easily visible. Also reducing the size of the arrow solves the problem were the arrow could look disconnected from the line, for example:
See the updated Line caps sample that now demonstrates this:
You can also increase the min size of the arrows by increasing the value of MinLineStripArrowLength. See example for 4:
This improvement will be available in the next version of the Ab3d.DXEngine.
I will send you a link by email to get a pre-release version.
Andrej Benedik

