float Thickness { get; set; }

robot_2Generated
code_blocksInput

Description

The Thickness property of the Surface class represents the thickness of a surface in inches. If the thickness is greater than 0, the object is considered hollow, which affects its automatically generated mass. This property is useful for simulating the physical characteristics of hollow objects in a physics simulation.

Usage

To use the Thickness property, simply get or set its value on an instance of the Surface class. The value should be a floating-point number representing the thickness in inches. The valid range for this property is from 0 to 100 inches.

Example

// Example of setting the Thickness property
Surface mySurface = new Surface();
mySurface.Thickness = 2.5f; // Set thickness to 2.5 inches

// Example of getting the Thickness property
float currentThickness = mySurface.Thickness;
Console.WriteLine($"Current Thickness: {currentThickness} inches");