Package apple.scenekit
Class SCNPhysicsField
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.scenekit.SCNPhysicsField
-
- All Implemented Interfaces:
NSCoding,NSCopying,NSSecureCoding,NSObject
public class SCNPhysicsField extends NSObject implements NSCopying, NSSecureCoding
SCNPhysicsField SCNPhysicsField is an abstract class that describes a force field that applies in the physics world.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSCNPhysicsField.Block_customFieldWithEvaluationBlock-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSCNPhysicsField(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()static SCNPhysicsFieldalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)longcategoryBitMask()[@property] categoryBitMask Determines the node physicsBody's categories that will be influenced by the receiver.static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()java.lang.ObjectcopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)static SCNPhysicsFieldcustomFieldWithEvaluationBlock(SCNPhysicsField.Block_customFieldWithEvaluationBlock block)A field force with a custom force evaluator.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()SCNVector3direction()Direction of the field.static SCNPhysicsFielddragField()Slows an object proportionally to the object’s velocity.static SCNPhysicsFieldelectricField()A force proportional to the charge on the object.voidencodeWithCoder(NSCoder coder)doublefalloffExponent()Changes the power of the force based on the distance from the center of the field (1 / distance ^ falloffExponent).SCNVector3halfExtent()Specifies the half extent of the area of effect.static longhash_static()SCNPhysicsFieldinit()SCNPhysicsFieldinitWithCoder(NSCoder coder)NS_DESIGNATED_INITIALIZERstatic NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisActive()Specifies whether force field is active or not.booleanisExclusive()If YES, it suppresses any other field in its area.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static SCNPhysicsFieldlinearGravityField()Applies a force in the direction of the "direction" vector in the local space.static SCNPhysicsFieldmagneticField()A force proportional to the charge on the object and the object’s velocity.doubleminimumDistance()Distance from the center of the field where the effect is at full strength.static java.lang.Objectnew_objc()static SCNPhysicsFieldnoiseFieldWithSmoothnessAnimationSpeed(double smoothness, double speed)A time varying differentiable Perlin simplex noise field.SCNVector3offset()Offset of origin effect within the area.static SCNPhysicsFieldradialGravityField()Applies a force in the direction of the origin of the field in local space.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)longscope()Controls whether the force field should apply inside or outside of the area.voidsetActive(boolean value)Specifies whether force field is active or not.voidsetCategoryBitMask(long value)[@property] categoryBitMask Determines the node physicsBody's categories that will be influenced by the receiver.voidsetDirection(SCNVector3 value)Direction of the field.voidsetExclusive(boolean value)If YES, it suppresses any other field in its area.voidsetFalloffExponent(double value)Changes the power of the force based on the distance from the center of the field (1 / distance ^ falloffExponent).voidsetHalfExtent(SCNVector3 value)Specifies the half extent of the area of effect.voidsetMinimumDistance(double value)Distance from the center of the field where the effect is at full strength.voidsetOffset(SCNVector3 value)Offset of origin effect within the area.voidsetScope(long value)Controls whether the force field should apply inside or outside of the area.voidsetStrength(double value)The strength factor of the force field.voidsetUsesEllipsoidalExtent(boolean value)YES means that the area of effect is rounded within the extent.static voidsetVersion_static(long aVersion)static SCNPhysicsFieldspringField()A Hooke’s law force - a force linearly proportional to distance from the center of the field.doublestrength()The strength factor of the force field.static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()static SCNPhysicsFieldturbulenceFieldWithSmoothnessAnimationSpeed(double smoothness, double speed)Just like Noise, except the strength of the noise is proportional to the velocity of the object in the field.booleanusesEllipsoidalExtent()YES means that the area of effect is rounded within the extent.static longversion_static()static SCNPhysicsFieldvortexField()Applies a force tangential to the direction from the sample point to the field's position.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static SCNPhysicsField alloc()
-
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()
-
customFieldWithEvaluationBlock
public static SCNPhysicsField customFieldWithEvaluationBlock(SCNPhysicsField.Block_customFieldWithEvaluationBlock block)
A field force with a custom force evaluator.
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
dragField
public static SCNPhysicsField dragField()
Slows an object proportionally to the object’s velocity. Use this to simulate effects such as friction from motion through the air.
-
electricField
public static SCNPhysicsField electricField()
A force proportional to the charge on the object. An example use of this field is to make objects behavior differently from one another when they enter a region, or to make an object's behavior different than its mass based behavior This field models the first part of the Lorentz equation, F = qE
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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)
-
linearGravityField
public static SCNPhysicsField linearGravityField()
Applies a force in the direction of the "direction" vector in the local space. To repel objects, use a negative strength. The force is the same everywhere in the field. Varies with the mass of the object according to F = ma The field node's rotation property can be used to orient the gravity in a particular direction.
-
magneticField
public static SCNPhysicsField magneticField()
A force proportional to the charge on the object and the object’s velocity. An example use of this field is to make objects behavior differently from one another when they enter a region, or to make an object's behavior different than its mass based behavior This field models the second part of the Lorentz equation, F = qvB
-
new_objc
public static java.lang.Object new_objc()
-
noiseFieldWithSmoothnessAnimationSpeed
public static SCNPhysicsField noiseFieldWithSmoothnessAnimationSpeed(double smoothness, double speed)
A time varying differentiable Perlin simplex noise field. A smoothness of 0 means as noisy as possible. Use this to simulate such effects as fireflies, or snow. To freeze the noise in place, set animationSpeed to 0.0. Mass is ignored. You can change the "smoothness" and "animationSpeed" using KVC.
-
radialGravityField
public static SCNPhysicsField radialGravityField()
Applies a force in the direction of the origin of the field in local space. To repel objects, use a negative strength. The force is proportional to the distance from the field origin. Varies with the mass of the object according to F = ma The field node's rotation property can be used to orient the gravity in a particular direction.
-
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)
-
springField
public static SCNPhysicsField springField()
A Hooke’s law force - a force linearly proportional to distance from the center of the field. An object in this field will oscillate with a period proportional to the inverse of the mass. An example use is to keep objects confined to a particular region.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
turbulenceFieldWithSmoothnessAnimationSpeed
public static SCNPhysicsField turbulenceFieldWithSmoothnessAnimationSpeed(double smoothness, double speed)
Just like Noise, except the strength of the noise is proportional to the velocity of the object in the field.
-
version_static
public static long version_static()
-
vortexField
public static SCNPhysicsField vortexField()
Applies a force tangential to the direction from the sample point to the field's position. The force will be CCW to the direction. Make the strength negative to apply force in the CW direction. Amount is proportional to distance from center and the object's mass. Use this to create effects such as tornadoes.
-
categoryBitMask
public long categoryBitMask()
[@property] categoryBitMask Determines the node physicsBody's categories that will be influenced by the receiver. Defaults to all bit set.
-
copyWithZone
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
- Specified by:
copyWithZonein interfaceNSCopying
-
direction
public SCNVector3 direction()
Direction of the field. Only applies to linear gravity and vortex fields. Defaults to (0,-1,0).
-
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
- Specified by:
encodeWithCoderin interfaceNSCoding
-
falloffExponent
public double falloffExponent()
Changes the power of the force based on the distance from the center of the field (1 / distance ^ falloffExponent). Defaults to 0.0.
-
halfExtent
public SCNVector3 halfExtent()
Specifies the half extent of the area of effect. Defaults to FLT_MAX.
-
init
public SCNPhysicsField init()
-
initWithCoder
public SCNPhysicsField initWithCoder(NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
isActive
public boolean isActive()
Specifies whether force field is active or not. Defaults to YES.
-
setActive
public void setActive(boolean value)
Specifies whether force field is active or not. Defaults to YES.
-
isExclusive
public boolean isExclusive()
If YES, it suppresses any other field in its area. Defaults to NO.
-
setExclusive
public void setExclusive(boolean value)
If YES, it suppresses any other field in its area. Defaults to NO.
-
minimumDistance
public double minimumDistance()
Distance from the center of the field where the effect is at full strength. Defaults to 1e-6.
-
offset
public SCNVector3 offset()
Offset of origin effect within the area.
-
scope
public long scope()
Controls whether the force field should apply inside or outside of the area. Defaults to inside.
-
setCategoryBitMask
public void setCategoryBitMask(long value)
[@property] categoryBitMask Determines the node physicsBody's categories that will be influenced by the receiver. Defaults to all bit set.
-
setDirection
public void setDirection(SCNVector3 value)
Direction of the field. Only applies to linear gravity and vortex fields. Defaults to (0,-1,0).
-
setFalloffExponent
public void setFalloffExponent(double value)
Changes the power of the force based on the distance from the center of the field (1 / distance ^ falloffExponent). Defaults to 0.0.
-
setHalfExtent
public void setHalfExtent(SCNVector3 value)
Specifies the half extent of the area of effect. Defaults to FLT_MAX.
-
setMinimumDistance
public void setMinimumDistance(double value)
Distance from the center of the field where the effect is at full strength. Defaults to 1e-6.
-
setOffset
public void setOffset(SCNVector3 value)
Offset of origin effect within the area.
-
setScope
public void setScope(long value)
Controls whether the force field should apply inside or outside of the area. Defaults to inside.
-
setStrength
public void setStrength(double value)
The strength factor of the force field. Defaults to 1.0.
-
setUsesEllipsoidalExtent
public void setUsesEllipsoidalExtent(boolean value)
YES means that the area of effect is rounded within the extent. Defaults to NO.
-
strength
public double strength()
The strength factor of the force field. Defaults to 1.0.
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis 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:
_supportsSecureCodingin interfaceNSSecureCoding
-
usesEllipsoidalExtent
public boolean usesEllipsoidalExtent()
YES means that the area of effect is rounded within the extent. Defaults to NO.
-
-