@NoOffset @Properties(inherit=liquidfun.class) public class b2Vec2 extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
b2Vec2()
Default constructor does nothing (for performance).
|
b2Vec2(float x,
float y)
Construct using coordinates.
|
b2Vec2(long size)
Native array allocator.
|
b2Vec2(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPut(b2Vec2 v)
Add a vector to this vector.
|
FloatPointer |
apply(int i)
Write to an indexed element.
|
b2Vec2 |
getPointer(long i) |
boolean |
IsValid()
Does this vector contain finite coordinates?
|
float |
Length()
Get the length of this vector (the norm).
|
float |
LengthSquared()
Get the length squared.
|
void |
multiplyPut(float a)
Multiply this vector by a scalar.
|
float |
Normalize()
Convert this vector into a unit vector.
|
b2Vec2 |
position(long position) |
void |
Set(float x_,
float y_)
Set this vector to some specified coordinates.
|
void |
SetZero()
Set this vector to all zeros.
|
b2Vec2 |
Skew()
Get the skew vector such that dot(skew_vec, other) == cross(vec, other)
|
b2Vec2 |
subtract()
Negate this vector.
|
void |
subtractPut(b2Vec2 v)
Subtract a vector from this vector.
|
float |
x() |
b2Vec2 |
x(float setter) |
float |
y() |
b2Vec2 |
y(float 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 b2Vec2(Pointer p)
Pointer(Pointer)
.public b2Vec2(long size)
Pointer.position(long)
.public b2Vec2()
public b2Vec2 getPointer(long i)
getPointer
in class Pointer
public void SetZero()
public void Set(@Cast(value="float32") float x_, @Cast(value="float32") float y_)
@Cast(value="float32*") @ByRef @Name(value="operator ()") public FloatPointer apply(@Cast(value="int32") int i)
@Name(value="operator +=") public void addPut(@Const @ByRef b2Vec2 v)
@Name(value="operator -=") public void subtractPut(@Const @ByRef b2Vec2 v)
@Name(value="operator *=") public void multiplyPut(@Cast(value="float32") float a)
@Cast(value="float32") public float LengthSquared()
@Cast(value="float32") public float Normalize()
@ByVal public b2Vec2 Skew()
public b2Vec2 x(float setter)
public b2Vec2 y(float setter)
Copyright © 2022. All rights reserved.