@Properties(inherit=Bullet3Common.class) public class b3Vector3 extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
b3Vector3()
Default native constructor.
|
b3Vector3(long size)
Native array allocator.
|
b3Vector3(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
b3Vector3 |
absolute()
\brief Return a vector will the absolute values of each element
|
b3Vector3 |
addPut(b3Vector3 v)
\brief Add a vector to this one
|
float |
angle(b3Vector3 v)
\brief Return the angle between this and another vector
|
FloatPointer |
asFloatPointer()
operator b3Scalar*() replaces operator[], using implicit conversion.
|
int |
closestAxis() |
b3Vector3 |
cross(b3Vector3 v)
\brief Return the cross product between this and another vector
|
void |
deSerialize(b3Vector3FloatData dataIn) |
void |
deSerializeDouble(b3Vector3DoubleData dataIn) |
void |
deSerializeFloat(b3Vector3FloatData dataIn) |
float |
distance(b3Vector3 v)
\brief Return the distance between the ends of this and another vector
This is symantically treating the vector like a point
|
float |
distance2(b3Vector3 v)
\brief Return the distance squared between the ends of this and another vector
This is symantically treating the vector like a point
|
b3Vector3 |
dividePut(float s)
\brief Inversely scale the vector
|
float |
dot(b3Vector3 v)
\brief Return the dot product
|
b3Vector3 |
dot3(b3Vector3 v0,
b3Vector3 v1,
b3Vector3 v2) |
boolean |
equals(b3Vector3 other) |
int |
furthestAxis() |
boolean |
fuzzyZero() |
b3Vector3 |
getPointer(long i) |
void |
getSkewSymmetricMatrix(b3Vector3 v0,
b3Vector3 v1,
b3Vector3 v2) |
float |
getW()
\brief Return the w value
|
float |
getX()
\brief Return the x value
|
float |
getY()
\brief Return the y value
|
float |
getZ()
\brief Return the z value
|
boolean |
isZero() |
float |
length()
\brief Return the length of the vector
|
float |
length2()
\brief Return the length of the vector squared
|
b3Vector3 |
lerp(b3Vector3 v,
float t)
\brief Return the linear interpolation between this and another vector
|
FloatPointer |
m_floats() |
float |
m_floats(int i) |
b3Vector3 |
m_floats(int i,
float setter) |
int |
maxAxis()
\brief Return the axis with the largest value
Note return values are 0,1,2 for x, y, or z
|
long |
maxDot(b3Vector3 array,
long array_count,
float[] dotOut) |
long |
maxDot(b3Vector3 array,
long array_count,
FloatBuffer dotOut) |
long |
maxDot(b3Vector3 array,
long array_count,
FloatPointer dotOut)
\brief returns index of maximum dot product between this and vectors in array[]
|
int |
minAxis()
\brief Return the axis with the smallest value
Note return values are 0,1,2 for x, y, or z
|
long |
minDot(b3Vector3 array,
long array_count,
float[] dotOut) |
long |
minDot(b3Vector3 array,
long array_count,
FloatBuffer dotOut) |
long |
minDot(b3Vector3 array,
long array_count,
FloatPointer dotOut)
\brief returns index of minimum dot product between this and vectors in array[]
|
b3Vector3 |
multiplyPut(b3Vector3 v)
\brief Elementwise multiply this vector by the other
|
b3Vector3 |
multiplyPut(float s)
\brief Scale the vector
|
b3Vector3 |
normalize()
\brief Normalize this vector
x^2 + y^2 + z^2 = 1
|
b3Vector3 |
normalized()
\brief Return a normalized version of this vector
|
boolean |
notEquals(b3Vector3 other) |
b3Vector3 |
position(long position) |
b3Vector3 |
rotate(b3Vector3 wAxis,
float angle)
\brief Return a rotated version of this vector
|
b3Vector3 |
safeNormalize() |
void |
serialize(b3Vector3FloatData dataOut) |
void |
serializeDouble(b3Vector3DoubleData dataOut) |
void |
serializeFloat(b3Vector3FloatData dataOut) |
void |
setInterpolate3(b3Vector3 v0,
b3Vector3 v1,
float rt) |
void |
setMax(b3Vector3 other)
\brief Set each element to the max of the current values and the values of another b3Vector3
|
void |
setMin(b3Vector3 other)
\brief Set each element to the min of the current values and the values of another b3Vector3
|
void |
setValue(float _x,
float _y,
float _z) |
void |
setW(float _w)
\brief Set the w value
|
void |
setX(float _x)
\brief Set the x value
|
void |
setY(float _y)
\brief Set the y value
|
void |
setZ(float _z)
\brief Set the z value
|
void |
setZero() |
b3Vector3 |
subtractPut(b3Vector3 v)
\brief Subtract a vector from this one
|
float |
triple(b3Vector3 v1,
b3Vector3 v2) |
float |
w() |
b3Vector3 |
w(float setter) |
float |
x() |
b3Vector3 |
x(float setter) |
float |
y() |
b3Vector3 |
y(float setter) |
float |
z() |
b3Vector3 |
z(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 b3Vector3()
public b3Vector3(long size)
Pointer.position(long)
.public b3Vector3(Pointer p)
Pointer(Pointer)
.public b3Vector3 getPointer(long i)
getPointer
in class Pointer
public float m_floats(int i)
public b3Vector3 m_floats(int i, float setter)
@MemberGetter public FloatPointer m_floats()
public float x()
public b3Vector3 x(float setter)
public float y()
public b3Vector3 y(float setter)
public float z()
public b3Vector3 z(float setter)
public float w()
public b3Vector3 w(float setter)
@ByRef @Name(value="operator +=") public b3Vector3 addPut(@Const @ByRef b3Vector3 v)
The
- vector to add to this one@ByRef @Name(value="operator -=") public b3Vector3 subtractPut(@Const @ByRef b3Vector3 v)
The
- vector to subtract@ByRef @Name(value="operator *=") public b3Vector3 multiplyPut(@Cast(value="const b3Scalar") float s)
s
- Scale factor@ByRef @Name(value="operator /=") public b3Vector3 dividePut(@Cast(value="const b3Scalar") float s)
s
- Scale factor to divide by@Cast(value="b3Scalar") public float dot(@Const @ByRef b3Vector3 v)
v
- The other vector in the dot product@Cast(value="b3Scalar") public float length2()
@Cast(value="b3Scalar") public float distance2(@Const @ByRef b3Vector3 v)
@Cast(value="b3Scalar") public float distance(@Const @ByRef b3Vector3 v)
@ByVal public b3Vector3 rotate(@Const @ByRef b3Vector3 wAxis, @Cast(value="const b3Scalar") float angle)
wAxis
- The axis to rotate aboutangle
- The angle to rotate by@Cast(value="b3Scalar") public float angle(@Const @ByRef b3Vector3 v)
v
- The other vector@ByVal public b3Vector3 absolute()
@ByVal public b3Vector3 cross(@Const @ByRef b3Vector3 v)
v
- The other vector@Cast(value="b3Scalar") public float triple(@Const @ByRef b3Vector3 v1, @Const @ByRef b3Vector3 v2)
public int minAxis()
public int maxAxis()
public int furthestAxis()
public int closestAxis()
public void setInterpolate3(@Const @ByRef b3Vector3 v0, @Const @ByRef b3Vector3 v1, @Cast(value="b3Scalar") float rt)
@ByVal public b3Vector3 lerp(@Const @ByRef b3Vector3 v, @Cast(value="const b3Scalar") float t)
v
- The other vectort
- The ration of this to v (t = 0 => return this, t=1 => return other)@ByRef @Name(value="operator *=") public b3Vector3 multiplyPut(@Const @ByRef b3Vector3 v)
v
- The other vector@Cast(value="b3Scalar*") @Name(value="operator b3Scalar*") public FloatPointer asFloatPointer()
@Cast(value="bool") @Name(value="operator ==") public boolean equals(@Const @ByRef b3Vector3 other)
@Cast(value="bool") @Name(value="operator !=") public boolean notEquals(@Const @ByRef b3Vector3 other)
public void setMax(@Const @ByRef b3Vector3 other)
other
- The other b3Vector3 to compare withpublic void setMin(@Const @ByRef b3Vector3 other)
other
- The other b3Vector3 to compare withpublic void setValue(@Cast(value="const b3Scalar") float _x, @Cast(value="const b3Scalar") float _y, @Cast(value="const b3Scalar") float _z)
public void setZero()
public void serialize(@ByRef b3Vector3FloatData dataOut)
public void deSerialize(@Const @ByRef b3Vector3FloatData dataIn)
public void serializeFloat(@ByRef b3Vector3FloatData dataOut)
public void deSerializeFloat(@Const @ByRef b3Vector3FloatData dataIn)
public void serializeDouble(@ByRef b3Vector3DoubleData dataOut)
public void deSerializeDouble(@Const @ByRef b3Vector3DoubleData dataIn)
public long maxDot(@Const b3Vector3 array, long array_count, @Cast(value="b3Scalar*") @ByRef FloatPointer dotOut)
array
- The other vectorsarray_count
- The number of other vectorsdotOut
- The maximum dot productpublic long maxDot(@Const b3Vector3 array, long array_count, @Cast(value="b3Scalar*") @ByRef FloatBuffer dotOut)
public long maxDot(@Const b3Vector3 array, long array_count, @Cast(value="b3Scalar*") @ByRef float[] dotOut)
public long minDot(@Const b3Vector3 array, long array_count, @Cast(value="b3Scalar*") @ByRef FloatPointer dotOut)
array
- The other vectorsarray_count
- The number of other vectorsdotOut
- The minimum dot productpublic long minDot(@Const b3Vector3 array, long array_count, @Cast(value="b3Scalar*") @ByRef FloatBuffer dotOut)
public long minDot(@Const b3Vector3 array, long array_count, @Cast(value="b3Scalar*") @ByRef float[] dotOut)
Copyright © 2024. All rights reserved.