Description
The Center
field represents the center point of the Sphere
in 3D space. It is a public instance field of type Vector3
, which means it can be accessed and modified directly on an instance of the Sphere
struct. This field is marked with the JsonInclude
attribute, indicating that it should be included during JSON serialization.
Usage
To use the Center
field, you need to have an instance of the Sphere
struct. You can then access or modify the Center
field directly to get or set the center position of the sphere in 3D space.
Example
// Example of using the Center field
// Create a new Sphere instance
Sphere mySphere = new Sphere();
// Set the center of the sphere
mySphere.Center = new Vector3(1.0f, 2.0f, 3.0f);
// Access the center of the sphere
Vector3 center = mySphere.Center;
// Output the center coordinates
// Note: Use appropriate methods to display the vector values in your application
// e.g., Debug.Log(center) in a game engine context