Vixen
02b45cc4
csharp
public struct FoliageBlockerComponent

A box a scene puts in the world that nothing grows inside.

Read the guide page for this →

Remarks

[docs/plan/31 § T9]'s owed item: blocking volumes as scene objects. FoliageBlocker is the kernel's form and it is a centre and an extent — device-free, testable, and unable to say where it is, because a kernel that knew about entities would be a kernel that needs a world to run.

⚠ The extent is half-sizes and the transform is the entity's. A blocker where a building will be is a person dragging a box in the viewport, so its placement is a LocalTransform like everything else's — and the component carries only the shape. Giving it a position of its own would be two answers to where it is.

⚠ Axis-aligned in world space, and the rotation is deliberately dropped. The kernel's test is a box containment against a candidate's XZ, which is two comparisons; an oriented box is a matrix inverse per candidate per step, and a growth simulation tests every seed against every blocker at every one of its steps. What a rotated blocker buys is a tighter fit around a diagonal wall, and the answer to that is two blockers.

⚠ It blocks growth, not painting. A foliage stroke is a person aiming at the ground and a blocker that refused it would be a tool that silently did nothing where somebody clicked. The simulation is the thing that places without being watched, which is what makes a volume worth having.

Fields and properties (2)

  • public Vector3 Extent

    How far the box reaches from its centre, in metres, before the entity's scale.

  • public bool IsEnabled

    Whether the volume is blocking at all.

Methods (2)

Used by (5)

  • ComponentRegistrationVixen.Rendering.Terrain
  • FoliageBlockerTestsVixen.Rendering.Terrain.Tests
  • FoliageBlockersVixen.Rendering.Terrain
  • Vixen_Rendering_Terrain_FoliageBlockerComponentSerializerVixen.Rendering.Terrain
  • MaterialIconsVixen.Editor.App