Class GorgonStateBuilderCommon<TB, TRs>
Common functionality for the a state fluent builder.
Inheritance
GorgonStateBuilderCommon<TB, TRs>
Implements
IGorgonFluentBuilder<TB, TRs>
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public abstract class GorgonStateBuilderCommon<TB, TRs> : IGorgonFluentBuilder<TB, TRs> where TB : GorgonStateBuilderCommon<TB, TRs> where TRs : class
Type Parameters
Name | Description |
---|---|
TB | The type of builder. |
TRs | The type of state. |
Properties
| Edit this page View SourceWorkingState
Property to set or return the state being edited.
Declaration
protected TRs WorkingState { get; }
Property Value
Type | Description |
---|---|
TRs |
Methods
| Edit this page View SourceBuild()
Function to return the state.
Declaration
public TRs Build()
Returns
Type | Description |
---|---|
TRs | The state created or updated by this builder. |
Clear()
Function to clear the builder to a default state.
Declaration
public TB Clear()
Returns
Type | Description |
---|---|
TB | The fluent builder interface. |
OnClearState()
Function to clear the working state for the builder.
Declaration
protected abstract TB OnClearState()
Returns
Type | Description |
---|---|
TB | The fluent builder interface. |
OnCreateState()
Function to create a new state with the properties copied from the working copy.
Declaration
protected abstract TRs OnCreateState()
Returns
Type | Description |
---|---|
TRs | The new render state. |
OnResetTo(TRs)
Function to reset the builder to the specified state.
Declaration
protected abstract TB OnResetTo(TRs state)
Parameters
Type | Name | Description |
---|---|---|
TRs | state | The state to copy from. |
Returns
Type | Description |
---|---|
TB | The fluent builder interface. |
ResetTo(TRs)
Function to reset the builder to the specified state.
Declaration
public TB ResetTo(TRs state = null)
Parameters
Type | Name | Description |
---|---|---|
TRs | state | [Optional] The specified state to copy. |
Returns
Type | Description |
---|---|
TB | The fluent builder interface. |