@NoOffset @Properties(inherit=liquidfun.class) public class b2BodyDef extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
b2BodyDef()
This constructor sets the body definition default values.
|
b2BodyDef(long size)
Native array allocator.
|
b2BodyDef(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
b2Vec2 |
_position()
The world position of the body.
|
b2BodyDef |
_position(b2Vec2 setter) |
boolean |
active()
Does this body start out active?
|
b2BodyDef |
active(boolean setter) |
boolean |
allowSleep()
Set this flag to false if this body should never fall asleep.
|
b2BodyDef |
allowSleep(boolean setter) |
float |
angle()
The world angle of the body in radians.
|
b2BodyDef |
angle(float setter) |
float |
angularDamping()
Angular damping is use to reduce the angular velocity.
|
b2BodyDef |
angularDamping(float setter) |
float |
angularVelocity()
The angular velocity of the body.
|
b2BodyDef |
angularVelocity(float setter) |
boolean |
awake()
Is this body initially awake or sleeping?
|
b2BodyDef |
awake(boolean setter) |
boolean |
bullet()
Is this a fast moving body that should be prevented from tunneling through
other moving bodies? Note that all bodies are prevented from tunneling through
kinematic and static bodies.
|
b2BodyDef |
bullet(boolean setter) |
boolean |
fixedRotation()
Should this body be prevented from rotating? Useful for characters.
|
b2BodyDef |
fixedRotation(boolean setter) |
b2BodyDef |
getPointer(long i) |
float |
gravityScale()
Scale the gravity applied to this body.
|
b2BodyDef |
gravityScale(float setter) |
float |
linearDamping()
Linear damping is use to reduce the linear velocity.
|
b2BodyDef |
linearDamping(float setter) |
b2Vec2 |
linearVelocity()
The linear velocity of the body's origin in world co-ordinates.
|
b2BodyDef |
linearVelocity(b2Vec2 setter) |
b2BodyDef |
position(long position) |
void |
SetPosition(float positionX,
float positionY)
Set position with direct floats.
|
int |
type()
The body type: static, kinematic, or dynamic.
|
b2BodyDef |
type(int setter) |
Pointer |
userData()
Use this to store application specific body data.
|
b2BodyDef |
userData(Pointer setter) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public b2BodyDef(Pointer p)
Pointer(Pointer)
.public b2BodyDef(long size)
Pointer.position(long)
.public b2BodyDef()
public b2BodyDef getPointer(long i)
getPointer
in class Pointer
public void SetPosition(@Cast(value="float32") float positionX, @Cast(value="float32") float positionY)
@Cast(value="b2BodyType") public int type()
public b2BodyDef type(int setter)
@ByRef @Name(value="position") public b2Vec2 _position()
public b2BodyDef angle(float setter)
@ByRef public b2Vec2 linearVelocity()
@Cast(value="float32") public float angularVelocity()
public b2BodyDef angularVelocity(float setter)
@Cast(value="float32") public float linearDamping()
public b2BodyDef linearDamping(float setter)
@Cast(value="float32") public float angularDamping()
public b2BodyDef angularDamping(float setter)
@Cast(value="bool") public boolean allowSleep()
public b2BodyDef allowSleep(boolean setter)
public b2BodyDef awake(boolean setter)
@Cast(value="bool") public boolean fixedRotation()
public b2BodyDef fixedRotation(boolean setter)
@Cast(value="bool") public boolean bullet()
public b2BodyDef bullet(boolean setter)
public b2BodyDef active(boolean setter)
public Pointer userData()
@Cast(value="float32") public float gravityScale()
public b2BodyDef gravityScale(float setter)
Copyright © 2022. All rights reserved.