Class SCNPhysicsWorld

  • All Implemented Interfaces:
    NSCoding, NSSecureCoding, NSObject

    public class SCNPhysicsWorld
    extends NSObject
    implements NSSecureCoding
    SCNPhysicsWorld The SCNPhysicsWorld class describes and allows to control the physics simulation of a 3d scene. The SCNPhysicsWorld class should not be allocated directly but retrieved from the SCNScene class using the physicsWorld property.
    • Constructor Detail

      • SCNPhysicsWorld

        protected SCNPhysicsWorld​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • addBehavior

        public void addBehavior​(SCNPhysicsBehavior behavior)
        Behaviors management
      • contactDelegate

        public SCNPhysicsContactDelegate contactDelegate()
        A delegate that is called when two physic bodies come in contact with each other. On iOS 11 or lower the property is unsafe_unretained and it's the responsibility of the client to set it to nil before deallocating the delegate. Starting in iOS12, the property is weak
      • gravity

        public SCNVector3 gravity()
        A global 3D vector specifying the field force acceleration due to gravity. The unit is meter per second. Default is {0, -9.8, 0}.
      • rayTestWithSegmentFromPointToPointOptions

        public NSArray<? extends SCNHitTestResult> rayTestWithSegmentFromPointToPointOptions​(SCNVector3 origin,
                                                                                             SCNVector3 dest,
                                                                                             NSDictionary<java.lang.String,​?> options)
        Performs a ray test on the physics bodies and their physics shapes.
      • removeAllBehaviors

        public void removeAllBehaviors()
      • setContactDelegate_unsafe

        public void setContactDelegate_unsafe​(SCNPhysicsContactDelegate value)
        A delegate that is called when two physic bodies come in contact with each other. On iOS 11 or lower the property is unsafe_unretained and it's the responsibility of the client to set it to nil before deallocating the delegate. Starting in iOS12, the property is weak
      • setContactDelegate

        public void setContactDelegate​(SCNPhysicsContactDelegate value)
        A delegate that is called when two physic bodies come in contact with each other. On iOS 11 or lower the property is unsafe_unretained and it's the responsibility of the client to set it to nil before deallocating the delegate. Starting in iOS12, the property is weak
      • setGravity

        public void setGravity​(SCNVector3 value)
        A global 3D vector specifying the field force acceleration due to gravity. The unit is meter per second. Default is {0, -9.8, 0}.
      • setSpeed

        public void setSpeed​(double value)
        A speed multiplier applied to the physics simulation. Default is 1.0. The speed can be reduced to slowdown the simulation, but beware that increasing the speed factor will decrease the accuracy of the simulation.
      • setTimeStep

        public void setTimeStep​(double value)
        The time step of the physics simulation. Default is 1/60s (60 Hz).
      • speed

        public double speed()
        A speed multiplier applied to the physics simulation. Default is 1.0. The speed can be reduced to slowdown the simulation, but beware that increasing the speed factor will decrease the accuracy of the simulation.
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • timeStep

        public double timeStep()
        The time step of the physics simulation. Default is 1/60s (60 Hz).
      • updateCollisionPairs

        public void updateCollisionPairs()
        Force the physics engine to re-evaluate collisions. This needs to be called if kinematic are moved and the contacts are wanted before the next simulation step.