Table of Contents

Class TreeFlyweight

Example IFlyweight that stores shared tree mesh and texture data. Many tree instances in the scene can reference a single TreeFlyweight; each instance provides its own position via the extrinsic state argument.

public class TreeFlyweight : IFlyweight
Inheritance
TreeFlyweight
Implements
Inherited Members

Fields

Mesh

Shared mesh asset name/path (intrinsic state).

public string Mesh

Field Value

string

Texture

Shared texture asset name/path (intrinsic state).

public string Texture

Field Value

string

Methods

Operation(object)

Draws this tree using the shared mesh/texture and the per-instance position provided via extrinsicState.

public void Operation(object extrinsicState)

Parameters

extrinsicState object

The world position (or transform) of this particular tree instance.