|
0.0.2 | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectnet.cattaka.mathdrawer.entity.MdMath
public class MdMath
フィールドの概要 | |
---|---|
static java.lang.String |
NUMBER_FORMAT_REGEX
|
コンストラクタの概要 | |
---|---|
MdMath()
|
メソッドの概要 | |
---|---|
static double |
calcFromLine(Vector2d p,
Vector2d l1,
Vector2d l2)
l1,l2を通る直線からpまでの距離を返します。 |
static int |
checkOnBlock(Vector2d a1,
Vector2d a2,
Vector2d b)
a1とa2の間にbが存在するか調べる。 |
static int |
checkOnBlockInner(Vector3d a1,
Vector3d a2,
Vector3d b)
a1とa2の間の内部にbが存在するか調べる。 |
static double |
cyclicDouble(double d)
入力値を[0.0, 1.0)の範囲に変換します。 |
static boolean |
getIntersection(Vector2d dest,
Vector2d p11,
Vector2d p12,
Vector2d p21,
Vector2d p22)
線分p11-p12と線分p21-p22(両端を含む)の共有点を求める。 |
static boolean |
getIntersection(Vector2d dest,
Vector3d f1,
Vector3d f2)
2つの直線が交差する点を計算します。 |
static void |
getLineFunction(Vector3d dest,
Vector2d pos1,
Vector2d pos2)
pos1とpos2を通る一次関数を得る。 |
static void |
interpolateColor4d(Color4d out,
double rate,
Color4d c1,
Color4d c2)
2つのColor4dを補完して新しい色を作成します。 |
static boolean |
isIntersect(Vector2d dest,
Vector2d p11,
Vector2d p12,
Vector2d p21,
Vector2d p22)
線分p11-p12と線分p21-p22(両端を含む)の共有点を求める。 |
static boolean |
isIntersectInner(Vector2d dest,
Vector2d p11,
Vector2d p12,
Vector2d p21,
Vector2d p22)
線分p11-p12の内部と線分p21-p22の内部(両端を含まない)の共有点を求める。 |
static boolean |
isOnLine(Vector2d a1,
Vector2d a2,
Vector2d b)
a1とa2の線分上にbが存在するか調べる。 |
static boolean |
isOnLine(Vector3d a1,
Vector3d a2,
Vector3d b)
a1とa2の線分上にbが存在するか調べる。 |
static boolean |
isOnLineInner(Vector2d a1,
Vector2d a2,
Vector2d b)
a1とa2の線分の内部にbが存在するか調べる。 |
static boolean |
isOnLineInner(Vector3d a1,
Vector3d a2,
Vector3d b)
a1とa2の線分の内部にbが存在するか調べる。 |
static double |
limitDouble(double d)
入力値を[0.0, 1.0]の範囲に変換します。 |
static boolean |
solveQuadEquation(double[] ans,
Vector3d args)
0 = args.x * x^2 + args.y * y + args.zの二次関数の解2つを引数ansに出力する。 |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
public static java.lang.String NUMBER_FORMAT_REGEX
コンストラクタの詳細 |
---|
public MdMath()
メソッドの詳細 |
---|
public static double cyclicDouble(double d)
d
-
public static double limitDouble(double d)
d
-
public static boolean isOnLineInner(Vector2d a1, Vector2d a2, Vector2d b)
public static void interpolateColor4d(Color4d out, double rate, Color4d c1, Color4d c2)
out
- rate
- c1
- c2
- public static boolean isOnLine(Vector2d a1, Vector2d a2, Vector2d b)
public static boolean isOnLineInner(Vector3d a1, Vector3d a2, Vector3d b)
public static int checkOnBlock(Vector2d a1, Vector2d a2, Vector2d b)
public static int checkOnBlockInner(Vector3d a1, Vector3d a2, Vector3d b)
public static boolean isOnLine(Vector3d a1, Vector3d a2, Vector3d b)
public static boolean isIntersectInner(Vector2d dest, Vector2d p11, Vector2d p12, Vector2d p21, Vector2d p22)
dest
- 交点の出力先p11
- p12
- p21
- p22
-
public static boolean isIntersect(Vector2d dest, Vector2d p11, Vector2d p12, Vector2d p21, Vector2d p22)
dest
- 交点の出力先p11
- p12
- p21
- p22
-
public static boolean solveQuadEquation(double[] ans, Vector3d args)
ans
- 長さ2の配列で解の出力先args
- 二次関数を表すベクトル
public static boolean getIntersection(Vector2d dest, Vector2d p11, Vector2d p12, Vector2d p21, Vector2d p22)
dest
- 交点の出力先p11
- p12
- p21
- p22
-
public static void getLineFunction(Vector3d dest, Vector2d pos1, Vector2d pos2)
dest
- 一次関数の出力先pos1
- pos2
- public static boolean getIntersection(Vector2d dest, Vector3d f1, Vector3d f2)
dest
- f1
- f2
-
public static double calcFromLine(Vector2d p, Vector2d l1, Vector2d l2)
p
- l1
- l2
-
|
0.0.2 | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |