public sealed class FoliageEditThe volume being painted, and the drag in flight over it.
Remarks
What TerrainEdit is to a heightfield. The mode owns keys, a strip and a claim on the viewport; this owns the volume, the palette selection and the stroke — which is the split that lets a test drive a whole stroke with world points and assert the trees, with no shell and no window.
⚠ Selection is by address and is re-resolved after every edit. An address is only valid until its chunk changes: removing an instance shifts the ones after it, so a selection held across an erase stroke points at somebody else's tree.
Fields and properties (9)
public FoliageVolume? VolumeThe volume being painted, or while none is.
public TerrainBrushSettings BrushThe brush every tool in both modes shares.
public FoliageSettings SettingsWhat foliage adds to it.
public IFoliageSurface? SurfaceWhat answers "what is the ground here", or null while nothing does.
public IReadOnlySet<int> ChosenWhich palette entries a stroke places, by index.
public IReadOnlyList<FoliageAddress> SelectionWhat is selected, for the gizmo.
public bool IsStrokingWhether a drag is in flight.
public string? RefusalWhat the last Begin refused for, or .
public bool CanStrokeWhether a stroke could start.
Events (1)
public Action<FoliageVolume>? ChangedTold which instances changed, whenever any do.
Methods (8)
public void Choose(int type, bool add = false)Chooses a palette entry, or adds it to the choice.
public bool Begin(Vector2 ground, bool invert = false)Starts a stroke at a point on the ground.
public void Extend(Vector2 ground, bool invert = false)Carries the stroke to a point.
public IEditorCommand? Commit()Ends the stroke and hands back the entry that undoes it.
public void Cancel()Abandons the stroke, putting the instances back the way they were.
public int Select(Vector2 ground, bool add = false)Selects everything of the chosen types within the brush.
public void Deselect()Drops the selection.
public IEditorCommand? MoveSelection(Vector3 offset)Moves the selected instances, as a gizmo drag does.
Used by (3)
- FoliageModeVixen.Editor.Terrain
- FoliageModeTestsVixen.Editor.Terrain.Tests
- TerrainModuleVixen.Editor.Terrain