public class SCNPhysicsBody extends NSObject implements NSCopying, NSSecureCoding
The SCNPhysicsBody class describes the physics properties (such as mass, friction...) of a node.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
SCNPhysicsBody(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
static boolean |
accessInstanceVariablesDirectly() |
static SCNPhysicsBody |
alloc() |
static SCNPhysicsBody |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
boolean |
allowsResting()
Specifies if the receiver can be set at rest.
|
double |
angularDamping()
Specifies the angular damping of the receiver.
|
double |
angularRestingThreshold()
Angular velocity threshold under which the body may be considered resting.
|
SCNVector4 |
angularVelocity()
Specifies the angular velocity of the receiver as an axis angle.
|
SCNVector3 |
angularVelocityFactor()
Specifies a factor applied on the rotation on each axis that results from the physics simulation before applying it to the node.
|
void |
applyForceAtPositionImpulse(SCNVector3 direction,
SCNVector3 position,
boolean impulse)
Applies a linear force with the specified position and direction.
|
void |
applyForceImpulse(SCNVector3 direction,
boolean impulse)
Applies a linear force in the specified direction.
|
void |
applyTorqueImpulse(SCNVector4 torque,
boolean impulse)
Applies an angular force (torque).
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static SCNPhysicsBody |
bodyWithTypeShape(long type,
SCNPhysicsShape shape)
Creates an instance of a rigid body with a specific shape.
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
long |
categoryBitMask()
Defines what logical 'categories' this body belongs too.
|
SCNVector3 |
centerOfMassOffset()
Specifies an offset for the center of mass of the body.
|
double |
charge()
Specifies the charge on the body.
|
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
void |
clearAllForces()
Clears the forces applied one the receiver.
|
long |
collisionBitMask()
Defines what logical 'categories' of bodies this body responds to collisions with.
|
long |
contactTestBitMask()
A mask that defines which categories of bodies cause intersection notifications with this physics body.
|
double |
continuousCollisionDetectionThreshold()
Use discrete collision detection if the body’s distance traveled in one step is at or below this threshold, or continuous collision detection otherwise.
|
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
double |
damping()
Specifies the damping factor of the receiver.
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
static SCNPhysicsBody |
dynamicBody()
Creates an instance of a dynamic body with default properties.
|
void |
encodeWithCoder(NSCoder coder) |
double |
friction()
Specifies the force resisting the relative motion of solid sliding against each other.
|
static long |
hash_static() |
SCNPhysicsBody |
init() |
SCNPhysicsBody |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isAffectedByGravity()
If set to YES this node will be affected by gravity.
|
boolean |
isResting()
If the physics simulation has determined that this body is at rest it may set the resting property to YES.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static SCNPhysicsBody |
kinematicBody()
Creates an instance of a kinematic body with default properties.
|
double |
linearRestingThreshold()
Linear velocity threshold under which the body may be considered resting.
|
double |
mass()
Specifies the Mass of the body in kilogram.
|
SCNVector3 |
momentOfInertia()
Specifies the moment of inertia of the body as a vector in 3D.
|
static SCNPhysicsBody |
new_objc() |
SCNPhysicsShape |
physicsShape()
Specifies the physics shape of the receiver.
|
void |
resetTransform()
Reset the physical transform to the node's model transform.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
double |
restitution()
Specifies the restitution of collisions.
|
double |
rollingFriction()
Specifies the force resisting the relative motion of solid rolling against each other.
|
void |
setAffectedByGravity(boolean value)
If set to YES this node will be affected by gravity.
|
void |
setAllowsResting(boolean value)
Specifies if the receiver can be set at rest.
|
void |
setAngularDamping(double value)
Specifies the angular damping of the receiver.
|
void |
setAngularRestingThreshold(double value)
Angular velocity threshold under which the body may be considered resting.
|
void |
setAngularVelocity(SCNVector4 value)
Specifies the angular velocity of the receiver as an axis angle.
|
void |
setAngularVelocityFactor(SCNVector3 value)
Specifies a factor applied on the rotation on each axis that results from the physics simulation before applying it to the node.
|
void |
setCategoryBitMask(long value)
Defines what logical 'categories' this body belongs too.
|
void |
setCenterOfMassOffset(SCNVector3 value)
Specifies an offset for the center of mass of the body.
|
void |
setCharge(double value)
Specifies the charge on the body.
|
void |
setCollisionBitMask(long value)
Defines what logical 'categories' of bodies this body responds to collisions with.
|
void |
setContactTestBitMask(long value)
A mask that defines which categories of bodies cause intersection notifications with this physics body.
|
void |
setContinuousCollisionDetectionThreshold(double value)
Use discrete collision detection if the body’s distance traveled in one step is at or below this threshold, or continuous collision detection otherwise.
|
void |
setDamping(double value)
Specifies the damping factor of the receiver.
|
void |
setFriction(double value)
Specifies the force resisting the relative motion of solid sliding against each other.
|
void |
setLinearRestingThreshold(double value)
Linear velocity threshold under which the body may be considered resting.
|
void |
setMass(double value)
Specifies the Mass of the body in kilogram.
|
void |
setMomentOfInertia(SCNVector3 value)
Specifies the moment of inertia of the body as a vector in 3D.
|
void |
setPhysicsShape(SCNPhysicsShape value)
Specifies the physics shape of the receiver.
|
void |
setResting(boolean resting)
Sets a physics body at rest (or not)
|
void |
setRestitution(double value)
Specifies the restitution of collisions.
|
void |
setRollingFriction(double value)
Specifies the force resisting the relative motion of solid rolling against each other.
|
void |
setType(long value)
Specifies the type of the receiver.
|
void |
setUsesDefaultMomentOfInertia(boolean value)
Permits to disable the use of the default moment of inertia in favor of the one stored in momentOfInertia.
|
void |
setVelocity(SCNVector3 value)
Specifies the linear velocity of the receiver.
|
void |
setVelocityFactor(SCNVector3 value)
Specifies a factor applied on the translation that results from the physics simulation before applying it to the node.
|
static void |
setVersion_static(long aVersion) |
static SCNPhysicsBody |
staticBody()
Creates an instance of a static body with default properties.
|
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
long |
type()
Specifies the type of the receiver.
|
boolean |
usesDefaultMomentOfInertia()
Permits to disable the use of the default moment of inertia in favor of the one stored in momentOfInertia.
|
SCNVector3 |
velocity()
Specifies the linear velocity of the receiver.
|
SCNVector3 |
velocityFactor()
Specifies a factor applied on the translation that results from the physics simulation before applying it to the node.
|
static long |
version_static() |
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, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static SCNPhysicsBody alloc()
public static SCNPhysicsBody allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static SCNPhysicsBody bodyWithTypeShape(long type, SCNPhysicsShape shape)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static SCNPhysicsBody dynamicBody()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static SCNPhysicsBody kinematicBody()
public static SCNPhysicsBody new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static SCNPhysicsBody staticBody()
public static org.moe.natj.objc.Class superclass_static()
public static boolean supportsSecureCoding()
public static long version_static()
public boolean allowsResting()
public double angularDamping()
public SCNVector4 angularVelocity()
public SCNVector3 angularVelocityFactor()
public void applyForceAtPositionImpulse(SCNVector3 direction, SCNVector3 position, boolean impulse)
public void applyForceImpulse(SCNVector3 direction, boolean impulse)
public void applyTorqueImpulse(SCNVector4 torque, boolean impulse)
public long categoryBitMask()
public double charge()
public void clearAllForces()
public long collisionBitMask()
public long contactTestBitMask()
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingpublic double damping()
public void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingpublic double friction()
public SCNPhysicsBody init()
public SCNPhysicsBody initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodingpublic boolean isAffectedByGravity()
public void setAffectedByGravity(boolean value)
public boolean isResting()
public double mass()
public SCNVector3 momentOfInertia()
public SCNPhysicsShape physicsShape()
public void resetTransform()
public double restitution()
public double rollingFriction()
public void setAllowsResting(boolean value)
public void setAngularDamping(double value)
public void setAngularVelocity(SCNVector4 value)
public void setAngularVelocityFactor(SCNVector3 value)
public void setCategoryBitMask(long value)
public void setCharge(double value)
public void setCollisionBitMask(long value)
public void setContactTestBitMask(long value)
public void setDamping(double value)
public void setFriction(double value)
public void setMass(double value)
public void setMomentOfInertia(SCNVector3 value)
public void setPhysicsShape(SCNPhysicsShape value)
public void setRestitution(double value)
public void setRollingFriction(double value)
public void setType(long value)
public void setUsesDefaultMomentOfInertia(boolean value)
public void setVelocity(SCNVector3 value)
public void setVelocityFactor(SCNVector3 value)
public boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCodingpublic long type()
public boolean usesDefaultMomentOfInertia()
public SCNVector3 velocity()
public SCNVector3 velocityFactor()
public double angularRestingThreshold()
public SCNVector3 centerOfMassOffset()
public double continuousCollisionDetectionThreshold()
public double linearRestingThreshold()
public void setAngularRestingThreshold(double value)
public void setCenterOfMassOffset(SCNVector3 value)
public void setContinuousCollisionDetectionThreshold(double value)
public void setLinearRestingThreshold(double value)
public void setResting(boolean resting)