Package org.robovm.apple.spritekit
Class SKPhysicsBody
- java.lang.Object
-
- org.robovm.rt.bro.NativeObject
-
- org.robovm.objc.ObjCObject
-
- org.robovm.apple.foundation.NSObject
-
- org.robovm.apple.spritekit.SKPhysicsBody
-
- All Implemented Interfaces:
NSCoding
,NSObjectProtocol
,NSSecureCoding
,org.robovm.objc.ObjCProtocol
public class SKPhysicsBody extends NSObject implements NSSecureCoding
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SKPhysicsBody.SKPhysicsBodyPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInit
-
-
Field Summary
-
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAIN
-
-
Constructor Summary
Constructors Modifier Constructor Description SKPhysicsBody()
SKPhysicsBody(NSCoder decoder)
protected
SKPhysicsBody(NSObject.Handle h, long handle)
protected
SKPhysicsBody(NSObject.SkipInit skipInit)
-
Method Summary
-
Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValues
-
-
-
-
Constructor Detail
-
SKPhysicsBody
public SKPhysicsBody()
-
SKPhysicsBody
protected SKPhysicsBody(NSObject.Handle h, long handle)
-
SKPhysicsBody
protected SKPhysicsBody(NSObject.SkipInit skipInit)
-
SKPhysicsBody
public SKPhysicsBody(NSCoder decoder)
-
-
Method Detail
-
isDynamic
public boolean isDynamic()
-
setDynamic
public void setDynamic(boolean v)
-
usesPreciseCollisionDetection
public boolean usesPreciseCollisionDetection()
-
setUsesPreciseCollisionDetection
public void setUsesPreciseCollisionDetection(boolean v)
-
allowsRotation
public boolean allowsRotation()
-
setAllowsRotation
public void setAllowsRotation(boolean v)
-
isPinned
public boolean isPinned()
- Since:
- Available in iOS 8.0 and later.
-
setPinned
public void setPinned(boolean v)
- Since:
- Available in iOS 8.0 and later.
-
isResting
public boolean isResting()
-
setResting
public void setResting(boolean v)
-
getFriction
public double getFriction()
-
setFriction
public void setFriction(double v)
-
getCharge
public double getCharge()
- Since:
- Available in iOS 8.0 and later.
-
setCharge
public void setCharge(double v)
- Since:
- Available in iOS 8.0 and later.
-
getRestitution
public double getRestitution()
-
setRestitution
public void setRestitution(double v)
-
getLinearDamping
public double getLinearDamping()
-
setLinearDamping
public void setLinearDamping(double v)
-
getAngularDamping
public double getAngularDamping()
-
setAngularDamping
public void setAngularDamping(double v)
-
getDensity
public double getDensity()
-
setDensity
public void setDensity(double v)
-
getMass
public double getMass()
-
setMass
public void setMass(double v)
-
getArea
public double getArea()
-
isAffectedByGravity
public boolean isAffectedByGravity()
-
setAffectedByGravity
public void setAffectedByGravity(boolean v)
-
getFieldBitMask
public int getFieldBitMask()
- Since:
- Available in iOS 8.0 and later.
-
setFieldBitMask
public void setFieldBitMask(int v)
- Since:
- Available in iOS 8.0 and later.
-
getCategoryBitMask
public int getCategoryBitMask()
-
setCategoryBitMask
public void setCategoryBitMask(int v)
-
getCollisionBitMask
public int getCollisionBitMask()
-
setCollisionBitMask
public void setCollisionBitMask(int v)
-
getContactTestBitMask
public int getContactTestBitMask()
-
setContactTestBitMask
public void setContactTestBitMask(int v)
-
getJoints
public NSArray<SKPhysicsJoint> getJoints()
-
getNode
public SKNode getNode()
-
getVelocity
public CGVector getVelocity()
-
setVelocity
public void setVelocity(CGVector v)
-
getAngularVelocity
public double getAngularVelocity()
-
setAngularVelocity
public void setAngularVelocity(double v)
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
applyForce
public void applyForce(CGVector force)
-
applyTorque
public void applyTorque(double torque)
-
applyImpulse
public void applyImpulse(CGVector impulse)
-
applyAngularImpulse
public void applyAngularImpulse(double impulse)
-
getAllContactedBodies
public NSArray<SKPhysicsBody> getAllContactedBodies()
-
createCircle
public static SKPhysicsBody createCircle(double r)
-
createCircle
public static SKPhysicsBody createCircle(double r, CGPoint center)
-
createRectangle
public static SKPhysicsBody createRectangle(CGSize s)
-
createRectangle
public static SKPhysicsBody createRectangle(CGSize s, CGPoint center)
-
createPolygon
public static SKPhysicsBody createPolygon(CGPath path)
-
createEdge
public static SKPhysicsBody createEdge(CGPoint p1, CGPoint p2)
-
createEdgeChain
public static SKPhysicsBody createEdgeChain(CGPath path)
-
createEdgeLoop
public static SKPhysicsBody createEdgeLoop(CGPath path)
-
createEdgeLoop
public static SKPhysicsBody createEdgeLoop(CGRect rect)
-
createWithTexture
public static SKPhysicsBody createWithTexture(SKTexture texture, CGSize size)
- Since:
- Available in iOS 8.0 and later.
-
createWithTexture
public static SKPhysicsBody createWithTexture(SKTexture texture, float alphaThreshold, CGSize size)
- Since:
- Available in iOS 8.0 and later.
-
createWithBodies
public static SKPhysicsBody createWithBodies(NSArray<SKPhysicsBody> bodies)
-
init
protected long init(NSCoder decoder)
-
-