Class ScopedPhysicsAccessor

    Definition

    Namespace:
    Tizen.NUI.Physics2D
    Assembly:
    Tizen.NUI.Physics2D.dll

    Scoped accessor to the physics world.

    Automatically locks the physics world with a mutex to prevent the integration step from running whilst the developer is accessing the world, e.g. to add/remove bodies or constraints, or to perform hit-test.

    When it is disposed, the mutex is unlocked, and the integration step can resume.

    Suggest that this is created with a "using" block:

    using(accessor=physicsAdaptor.GetAccessor()) { var space = accessor.GetNative(); // Perform operations on space or bodies. } // automatically disposed.

    public class ScopedPhysicsAccessor : IDisposable
    Inheritance
    object
    ScopedPhysicsAccessor

    Methods

    View Source

    Dispose()

    Disposes the Space object.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Dispose of this object. This ensures that the integration step is resumed

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    View Source

    GetNative()

    Get a weak handle to the native physics space. Disposing of this handle does not destroy the space.

    Declaration
    public SpaceRef GetNative()
    Returns
    Type Description
    SpaceRef
    View Source

    HitTest(Vector3, Vector3, ShapeFilter, Vector3, out float)

    Perform a hit test on the given physics world ray, with a possible filter. The ray can be created with PhysicsAdaptor.BuildPickingRay(). Returns a body if hit, along with the local pivot coordinates and the distance from the ray origin (usually camera)

    Declaration
    public Body HitTest(Vector3 rayFromWorld, Vector3 rayToWorld, ShapeFilter filter, Vector3 localPivot, out float distanceFromCamera)
    Parameters
    Type Name Description
    Vector3 rayFromWorld
    Vector3 rayToWorld
    ShapeFilter filter
    Vector3 localPivot
    float distanceFromCamera
    Returns
    Type Description
    Body

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX