Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Filter

[23:7] extends: FxObj

Wraps jbox2d's Filter (com.almasb.fxgl.physics.box2d.dynamics.Filter), the collision-filter record attached to every Fixture. Three fields:

  • categoryBits — usually one bit identifying this fixture
  • maskBits — which categories this fixture collides with
  • groupIndex — overrides mask: positive = always collide, negative = never collide, zero = ignored Fields are public Java fields, so the wrapper exposes getCategoryBits / setCategoryBits etc. through getMember / setMember on the underlying AJO.

Methods

  • Filter ()

    Creates a new Filter with the jbox2d defaults.

  • adopt (object Ajo)

    Wraps an existing Filter AussomJavaObject.

  • getCategoryBits ()

    Returns the categoryBits field as an int.

  • setCategoryBits (int Bits)

    Sets the categoryBits field.

  • getMaskBits ()

    Returns the maskBits field as an int.

  • setMaskBits (int Bits)

    Sets the maskBits field.

  • getGroupIndex ()

    Returns the groupIndex field as an int.

  • setGroupIndex (int Idx)

    Sets the groupIndex field.

  • set (object Other)

    Copies another Filter's fields into this one.