Description
The EndLine
method finalizes the current line drawing operation in a SceneLineObject
. This method should be called after adding all desired line points using the AddLinePoint
method. It effectively signals that the line is complete and ready for rendering in the scene.
Usage
To use the EndLine
method, first create an instance of SceneLineObject
. Begin the line drawing with StartLine
, add points using AddLinePoint
, and finally call EndLine
to complete the line.
Example
// Create a new SceneLineObject
SceneLineObject lineObject = new SceneLineObject();
// Start the line
lineObject.StartLine();
// Add points to the line
Vector3 point1 = new Vector3(0, 0, 0);
Color color1 = Color.Red;
float width1 = 1.0f;
lineObject.AddLinePoint(ref point1, color1, width1);
Vector3 point2 = new Vector3(1, 1, 0);
Color color2 = Color.Blue;
float width2 = 1.0f;
lineObject.AddLinePoint(ref point2, color2, width2);
// End the line
lineObject.EndLine();