ModelBuilder WithSurface( string name )

book_4_sparkGenerated
code_blocksInput

Description

The WithSurface method of the ModelBuilder class allows you to specify a surface for the model being constructed. This method is part of a fluent interface, enabling you to chain multiple configuration methods together when building a model.

Usage

To use the WithSurface method, call it on an instance of ModelBuilder and pass the name of the surface as a string parameter. This method returns the same ModelBuilder instance, allowing for method chaining.

Example

// Example of using WithSurface method
var modelBuilder = new ModelBuilder();
modelBuilder.WithSurface("metal").WithMass(10.0f).Create();