Package physx.physics

Class PxQueryFilterData

java.lang.Object
physx.NativeObject
physx.physics.PxQueryFilterData

public class PxQueryFilterData extends NativeObject
Scene query filtering data.

Whenever the scene query intersects a shape, filtering is performed in the following order:

\li For non-batched queries only:
If the data field is non-zero, and the bitwise-AND value of data AND the shape's queryFilterData is zero, the shape is skipped \li If filter callbacks are enabled in flags field (see #PxQueryFlags) they will get invoked accordingly. \li If neither #PxQueryFlag::ePREFILTER or #PxQueryFlag::ePOSTFILTER is set, the hit defaults to type #PxQueryHitType::eBLOCK when the value of PxHitCallback::nbTouches provided with the query is zero and to type #PxQueryHitType::eTOUCH when PxHitCallback::nbTouches is positive.

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxQueryFilterData

      protected PxQueryFilterData(long address)
    • PxQueryFilterData

      public PxQueryFilterData()
      default constructor
    • PxQueryFilterData

      public PxQueryFilterData(PxFilterData fd, PxQueryFlags f)
      constructor to set both filter data and filter flags
    • PxQueryFilterData

      public PxQueryFilterData(PxQueryFlags f)
      constructor to set filter flags only
  • Method Details

    • wrapPointer

      public static PxQueryFilterData wrapPointer(long address)
    • arrayGet

      public static PxQueryFilterData arrayGet(long baseAddress, int index)
    • createAt

      public static PxQueryFilterData createAt(long address)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      Returns:
      Stack allocated object of PxQueryFilterData
    • createAt

      public static <T> PxQueryFilterData createAt(T allocator, NativeObject.Allocator<T> allocate)
      Type Parameters:
      T - Allocator class, e.g. LWJGL's MemoryStack.
      Parameters:
      allocator - Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.
      allocate - Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.
      Returns:
      Stack allocated object of PxQueryFilterData
    • createAt

      public static PxQueryFilterData createAt(long address, PxFilterData fd, PxQueryFlags f)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      fd - WebIDL type: PxFilterData [Const, Ref]
      f - WebIDL type: PxQueryFlags [Ref]
      Returns:
      Stack allocated object of PxQueryFilterData
    • createAt

      public static <T> PxQueryFilterData createAt(T allocator, NativeObject.Allocator<T> allocate, PxFilterData fd, PxQueryFlags f)
      Type Parameters:
      T - Allocator class, e.g. LWJGL's MemoryStack.
      Parameters:
      allocator - Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.
      allocate - Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.
      fd - WebIDL type: PxFilterData [Const, Ref]
      f - WebIDL type: PxQueryFlags [Ref]
      Returns:
      Stack allocated object of PxQueryFilterData
    • createAt

      public static PxQueryFilterData createAt(long address, PxQueryFlags f)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      f - WebIDL type: PxQueryFlags [Ref]
      Returns:
      Stack allocated object of PxQueryFilterData
    • createAt

      public static <T> PxQueryFilterData createAt(T allocator, NativeObject.Allocator<T> allocate, PxQueryFlags f)
      Type Parameters:
      T - Allocator class, e.g. LWJGL's MemoryStack.
      Parameters:
      allocator - Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.
      allocate - Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.
      f - WebIDL type: PxQueryFlags [Ref]
      Returns:
      Stack allocated object of PxQueryFilterData
    • destroy

      public void destroy()
    • getData

      public PxFilterData getData()
      Filter data associated with the scene query
    • setData

      public void setData(PxFilterData value)
      Filter data associated with the scene query
    • getFlags

      public PxQueryFlags getFlags()
      Filter flags (see #PxQueryFlags)
    • setFlags

      public void setFlags(PxQueryFlags value)
      Filter flags (see #PxQueryFlags)