public struct FoliageBlockerComponentA box a scene puts in the world that nothing grows inside.
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 ExtentHow far the box reaches from its centre, in metres, before the entity's scale.
public bool IsEnabledWhether the volume is blocking at all.
Methods (2)
public static FoliageBlockerComponent Of(Vector3 extent)A blocker of a given size, enabled.
public static FoliageBlockerComponent Cube(float size)A cube blocker.
Used by (5)
- ComponentRegistrationVixen.Rendering.Terrain
- FoliageBlockerTestsVixen.Rendering.Terrain.Tests
- FoliageBlockersVixen.Rendering.Terrain
- Vixen_Rendering_Terrain_FoliageBlockerComponentSerializerVixen.Rendering.Terrain
- MaterialIconsVixen.Editor.App