Vector3 Center { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Center property of the Line struct provides the midpoint between the start and end points of the line. This property is useful for determining the central position of the line in 3D space.

Usage

To access the Center property, you need to have an instance of the Line struct. The property is read-only and returns a Vector3 representing the midpoint of the line.

Example

// Example of using the Center property
Line line = new Line
{
    Start = new Vector3(0, 0, 0),
    End = new Vector3(10, 10, 10)
};

Vector3 center = line.Center;
// center will be (5, 5, 5)