|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.Math
public class Math
| Nested Class Summary | |
|---|---|
static class |
Math.AngleUnit
|
| Field Summary |
|---|
| Fields inherited from class org.xbig.base.NativeObject |
|---|
deleted, object, remote |
| Constructor Summary | |
|---|---|
|
Math(InstancePointer p)
This constructor is public for internal useage only! |
protected |
Math(InstancePointer p,
boolean remote)
Creates a Java wrapper object for an existing C++ object. |
|
Math(long trigTableSize)
Default constructor. |
|
Math(WithoutNativeObject val)
Allows creation of Java objects without C++ objects. |
| Method Summary | |
|---|---|
static float |
Abs(float fValue)
|
static void |
Abs(IDegree returnValue,
IDegree dValue)
|
static void |
Abs(IRadian returnValue,
IRadian rValue)
|
static void |
ACos(IRadian returnValue,
float fValue)
|
static float |
AngleUnitsToDegrees(float units)
Convert from the current AngleUnit to degrees. |
static float |
AngleUnitsToRadians(float units)
Convert from the current AngleUnit to radians. |
static void |
ASin(IRadian returnValue,
float fValue)
|
static void |
ATan(IRadian returnValue,
float fValue)
|
static void |
ATan2(IRadian returnValue,
float fY,
float fX)
|
static void |
buildReflectionMatrix(IMatrix4 returnValue,
IPlane p)
Build a reflection matrix for the passed in plane. |
static void |
calculateBasicFaceNormal(IVector3 returnValue,
IVector3 v1,
IVector3 v2,
IVector3 v3)
Calculate a face normal, no w-information. |
static void |
calculateBasicFaceNormalWithoutNormalize(IVector3 returnValue,
IVector3 v1,
IVector3 v2,
IVector3 v3)
Calculate a face normal without normalize, no w-information. |
static void |
calculateFaceNormal(IVector4 returnValue,
IVector3 v1,
IVector3 v2,
IVector3 v3)
Calculate a face normal, including the w component which is the offset from the origin. |
static void |
calculateFaceNormalWithoutNormalize(IVector4 returnValue,
IVector3 v1,
IVector3 v2,
IVector3 v3)
Calculate a face normal without normalize, including the w component which is the offset from the origin. |
static void |
calculateTangentSpaceVector(IVector3 returnValue,
IVector3 position1,
IVector3 position2,
IVector3 position3,
float u1,
float v1,
float u2,
float v2,
float u3,
float v3)
Calculates the tangent space vector for a given set of positions / texture coords. |
static float |
Ceil(float fValue)
|
static float |
Cos(float fValue,
boolean useTables)
Cosine function. |
static float |
Cos(IRadian fValue,
boolean useTables)
Cosine function. |
static float |
DegreesToAngleUnits(float degrees)
Convert from degrees to the current AngleUnit. |
static float |
DegreesToRadians(float degrees)
|
void |
delete()
Deletes the corresponding C++ object. |
static float |
Exp(float fValue)
|
void |
finalize()
|
static float |
Floor(float fValue)
|
static float |
gaussianDistribution(float x,
float offset,
float scale)
Generates a value based on the Gaussian (normal) distribution function with the given offset and scale parameters. |
static Math.AngleUnit |
getAngleUnit()
Get the unit being used for angles. |
static float |
getfDeg2Rad()
|
static float |
getfRad2Deg()
|
static float |
getHALF_PI()
|
static float |
getNEG_INFINITY()
|
static float |
getPI()
|
static float |
getPOS_INFINITY()
|
static float |
getTWO_PI()
|
static int |
IAbs(int iValue)
|
static int |
ICeil(float fValue)
|
static int |
IFloor(float fValue)
|
static void |
intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
IAxisAlignedBox box)
/ box intersection, returns boolean result and distance. |
static void |
intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
Ilist<IPlane> planeList,
boolean normalIsOutside)
/ convex plane list intersection test. |
static void |
intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
IPlane plane)
/ plane intersection, returns boolean result and distance. |
static void |
intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
ISphere sphere,
boolean discardInside)
/ sphere intersection, returns boolean result and distance. |
static void |
intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
Ivector<IPlane> planeList,
boolean normalIsOutside)
/ convex plane list intersection test. |
static void |
intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
IVector3 a,
IVector3 b,
IVector3 c,
boolean positiveSide,
boolean negativeSide)
/ triangle intersection, returns boolean result and distance. |
static void |
intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
IVector3 a,
IVector3 b,
IVector3 c,
IVector3 normal,
boolean positiveSide,
boolean negativeSide)
/ triangle intersection, returns boolean result and distance. |
static boolean |
intersects(IPlane plane,
IAxisAlignedBox box)
/ box intersection test. |
static boolean |
intersects(IRay ray,
IAxisAlignedBox box,
FloatPointer d1,
FloatPointer d2)
/ box intersection, returns boolean result and two intersection distance. |
static boolean |
intersects(ISphere sphere,
IAxisAlignedBox box)
/ box intersection test. |
static boolean |
intersects(ISphere sphere,
IPlane plane)
/ plane intersection test. |
static float |
InvSqrt(float fValue)
Inverse square root i.e. 1 / Sqrt(x), good for vector normalisation. |
static int |
ISign(int iValue)
|
static float |
Log(float fValue)
|
static void |
makeViewMatrix(IMatrix4 returnValue,
IVector3 position,
IQuaternion orientation,
IMatrix4 reflectMatrix)
|
static boolean |
pointInTri2D(IVector2 p,
IVector2 a,
IVector2 b,
IVector2 c)
Checks whether a given point is inside a triangle, in a 2-dimensional (Cartesian) space. |
static boolean |
pointInTri3D(IVector3 p,
IVector3 a,
IVector3 b,
IVector3 c,
IVector3 normal)
Checks whether a given 3D point is inside a triangle. |
static float |
Pow(float fBase,
float fExponent)
|
static float |
RadiansToAngleUnits(float radians)
Convert from radians to the current AngleUnit . |
static float |
RadiansToDegrees(float radians)
|
static float |
RangeRandom(float fLow,
float fHigh)
|
static boolean |
RealEqual(float a,
float b,
float tolerance)
Compare 2 reals, using tolerance for inaccuracies. |
static void |
setAngleUnit(Math.AngleUnit unit)
These functions used to set the assumed angle units (radians or degrees) expected when using the type. |
static float |
Sign(float fValue)
|
static void |
Sign(IDegree returnValue,
IDegree dValue)
|
static void |
Sign(IRadian returnValue,
IRadian rValue)
|
static float |
Sin(float fValue,
boolean useTables)
Sine function. |
static float |
Sin(IRadian fValue,
boolean useTables)
Sine function. |
static float |
Sqr(float fValue)
|
static float |
Sqrt(float fValue)
|
static void |
Sqrt(IDegree returnValue,
IDegree fValue)
|
static void |
Sqrt(IRadian returnValue,
IRadian fValue)
|
static float |
SymmetricRandom()
|
static float |
Tan(float fValue,
boolean useTables)
Tangent function. |
static float |
Tan(IRadian fValue,
boolean useTables)
Tangent function. |
static float |
UnitRandom()
|
| Methods inherited from class org.xbig.base.NativeObject |
|---|
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xbig.base.INativeObject |
|---|
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer |
| Constructor Detail |
|---|
public Math(InstancePointer p)
protected Math(InstancePointer p,
boolean remote)
public Math(WithoutNativeObject val)
WithoutNativeObject,
INativeObject.disconnectFromNativeObject()public Math(long trigTableSize)
| Method Detail |
|---|
public void delete()
INativeObjectSubclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!
delete in interface INativeObjectdelete in class NativeObject#remotepublic void finalize()
finalize in class NativeObjectpublic static int IAbs(int iValue)
public static int ICeil(float fValue)
public static int IFloor(float fValue)
public static int ISign(int iValue)
public static float Abs(float fValue)
public static void Abs(IDegree returnValue,
IDegree dValue)
public static void Abs(IRadian returnValue,
IRadian rValue)
public static void ACos(IRadian returnValue,
float fValue)
public static void ASin(IRadian returnValue,
float fValue)
public static void ATan(IRadian returnValue,
float fValue)
public static void ATan2(IRadian returnValue,
float fY,
float fX)
public static float Ceil(float fValue)
public static float Cos(IRadian fValue,
boolean useTables)
public static float Cos(float fValue,
boolean useTables)
public static float Exp(float fValue)
public static float Floor(float fValue)
public static float Log(float fValue)
public static float Pow(float fBase,
float fExponent)
public static float Sign(float fValue)
public static void Sign(IRadian returnValue,
IRadian rValue)
public static void Sign(IDegree returnValue,
IDegree dValue)
public static float Sin(IRadian fValue,
boolean useTables)
public static float Sin(float fValue,
boolean useTables)
public static float Sqr(float fValue)
public static float Sqrt(float fValue)
public static void Sqrt(IRadian returnValue,
IRadian fValue)
public static void Sqrt(IDegree returnValue,
IDegree fValue)
public static float InvSqrt(float fValue)
public static float UnitRandom()
public static float RangeRandom(float fLow,
float fHigh)
public static float SymmetricRandom()
public static float Tan(IRadian fValue,
boolean useTables)
public static float Tan(float fValue,
boolean useTables)
public static float DegreesToRadians(float degrees)
public static float RadiansToDegrees(float radians)
public static void setAngleUnit(Math.AngleUnit unit)
public static Math.AngleUnit getAngleUnit()
public static float AngleUnitsToRadians(float units)
public static float RadiansToAngleUnits(float radians)
public static float AngleUnitsToDegrees(float units)
public static float DegreesToAngleUnits(float degrees)
public static boolean pointInTri2D(IVector2 p,
IVector2 a,
IVector2 b,
IVector2 c)
public static boolean pointInTri3D(IVector3 p,
IVector3 a,
IVector3 b,
IVector3 c,
IVector3 normal)
public static void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
IPlane plane)
public static void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
ISphere sphere,
boolean discardInside)
public static void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
IAxisAlignedBox box)
public static boolean intersects(IRay ray,
IAxisAlignedBox box,
FloatPointer d1,
FloatPointer d2)
public static void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
IVector3 a,
IVector3 b,
IVector3 c,
IVector3 normal,
boolean positiveSide,
boolean negativeSide)
public static void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
IVector3 a,
IVector3 b,
IVector3 c,
boolean positiveSide,
boolean negativeSide)
public static boolean intersects(ISphere sphere,
IAxisAlignedBox box)
public static boolean intersects(IPlane plane,
IAxisAlignedBox box)
public static void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
Ivector<IPlane> planeList,
boolean normalIsOutside)
public static void intersects(Ipair<java.lang.Boolean,java.lang.Float> returnValue,
IRay ray,
Ilist<IPlane> planeList,
boolean normalIsOutside)
public static boolean intersects(ISphere sphere,
IPlane plane)
public static boolean RealEqual(float a,
float b,
float tolerance)
public static void calculateTangentSpaceVector(IVector3 returnValue,
IVector3 position1,
IVector3 position2,
IVector3 position3,
float u1,
float v1,
float u2,
float v2,
float u3,
float v3)
public static void buildReflectionMatrix(IMatrix4 returnValue,
IPlane p)
public static void calculateFaceNormal(IVector4 returnValue,
IVector3 v1,
IVector3 v2,
IVector3 v3)
public static void calculateBasicFaceNormal(IVector3 returnValue,
IVector3 v1,
IVector3 v2,
IVector3 v3)
public static void calculateFaceNormalWithoutNormalize(IVector4 returnValue,
IVector3 v1,
IVector3 v2,
IVector3 v3)
public static void calculateBasicFaceNormalWithoutNormalize(IVector3 returnValue,
IVector3 v1,
IVector3 v2,
IVector3 v3)
public static float gaussianDistribution(float x,
float offset,
float scale)
public static void makeViewMatrix(IMatrix4 returnValue,
IVector3 position,
IQuaternion orientation,
IMatrix4 reflectMatrix)
public static float getPOS_INFINITY()
public static float getNEG_INFINITY()
public static float getPI()
public static float getTWO_PI()
public static float getHALF_PI()
public static float getfDeg2Rad()
public static float getfRad2Deg()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||