载入中...
搜索中...
未找到
Math.h
浏览该文件的文档.
108 float closestPointOnSegment2X(float px, float py, float ax, float ay, float bx, float by) const;
109 float closestPointOnSegment2Y(float px, float py, float ax, float ay, float bx, float by) const;
Definition Module.h:43
Math module — glm-backed vectors/matrices, noise, bezier, random. Script: math <- eve....
Definition Math.h:21
bool pointInSphere(float px, float py, float pz, float cx, float cy, float cz, float radius) const
Definition Math.cpp:411
float bezierQuadratic(float t, float p0, float p1, float p2) const
Definition Math.cpp:649
bool spheresOverlap(float x1, float y1, float z1, float r1, float x2, float y2, float z2, float r2) const
Definition Math.cpp:422
Mat4 * newMat4Scale(float sx, float sy, float sz)
Definition Math.cpp:97
float warpNoise2(float x, float y, float warpAmp=1.f) const
Domain warp: sample noise at (x,y) + warpAmp * (noise-0.5). Useful for organic terrain / caves.
Definition Math.cpp:643
float normalize3X(float x, float y, float z) const
Definition Math.cpp:262
bool boxesOverlap(float minAx, float minAy, float minAz, float maxAx, float maxAy, float maxAz, float minBx, float minBy, float minBz, float maxBx, float maxBy, float maxBz) const
Definition Math.cpp:430
float normalize3Z(float x, float y, float z) const
Definition Math.cpp:270
Module_REG(Math)
float voronoi2(float x, float y) const
Worley / Voronoi F1 distance in [0, ~1.5] (cell size 1). voronoiEdge2 = F2 - F1 (cell borders).
Definition Math.cpp:631
float approach(float current, float target, float maxDelta) const
Definition Math.cpp:139
float turbulence2(float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const
Definition Math.cpp:618
float closestPointOnSegment2Y(float px, float py, float ax, float ay, float bx, float by) const
Definition Math.cpp:405
Mat4 * newMat4Translation(float x, float y, float z)
Definition Math.cpp:91
float ease(float t, const std::string &kind) const
Easing on [0,1]. kind: "linear"|"inQuad"|"outQuad"|"inOutQuad"|"inCubic"|"outCubic"|"inOutCubic"| "in...
Definition Math.cpp:184
float bezierQuadratic2X(float t, float x0, float y0, float x1, float y1, float x2, float y2) const
Definition Math.cpp:663
float raycastPlane(float ox, float oy, float oz, float dx, float dy, float dz, float px, float py, float pz, float nx, float ny, float nz) const
Ray vs infinite plane through (px,py,pz) with normal (nx,ny,nz). Returns parametric t,...
Definition Math.cpp:479
float raycastBox(float ox, float oy, float oz, float dx, float dy, float dz, float minX, float minY, float minZ, float maxX, float maxY, float maxZ) const
Definition Math.cpp:455
float angleBetween2(float x1, float y1, float x2, float y2) const
Definition Math.cpp:242
float normalize3Y(float x, float y, float z) const
Definition Math.cpp:266
float closestPointOnSegment2X(float px, float py, float ax, float ay, float bx, float by) const
Definition Math.cpp:400
bool circleRectOverlap(float cx, float cy, float radius, float rx, float ry, float rw, float rh) const
Definition Math.cpp:310
float smootherstep(float edge0, float edge1, float x) const
Definition Math.cpp:165
float closestPointOnSegment3Y(float px, float py, float pz, float ax, float ay, float az, float bx, float by, float bz) const
Definition Math.cpp:492
float smoothstep(float edge0, float edge1, float x) const
Definition Math.cpp:116
~Math() override=default
bool rectsOverlap(float x1, float y1, float w1, float h1, float x2, float y2, float w2, float h2) const
Definition Math.cpp:305
float rotate2X(float x, float y, float radians) const
Rotate (x,y) by radians around origin.
Definition Math.cpp:275
float cross2(float x1, float y1, float x2, float y2) const
Definition Math.cpp:239
float closestPointOnSegment3X(float px, float py, float pz, float ax, float ay, float az, float bx, float by, float bz) const
Definition Math.cpp:487
float rotate2Y(float x, float y, float radians) const
Definition Math.cpp:279
float closestPointOnSegment3Z(float px, float py, float pz, float ax, float ay, float az, float bx, float by, float bz) const
Definition Math.cpp:497
float bezierCubic2Y(float t, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) const
Definition Math.cpp:678
bool pointInCircle(float px, float py, float cx, float cy, float radius) const
Definition Math.cpp:289
float bezierQuadratic2Y(float t, float x0, float y0, float x1, float y1, float x2, float y2) const
Definition Math.cpp:668
float dot3(float x1, float y1, float z1, float x2, float y2, float z2) const
Definition Math.cpp:235
bool pointInBox(float px, float py, float pz, float minX, float minY, float minZ, float maxX, float maxY, float maxZ) const
Inclusive AABB test against [min,max] on each axis.
Definition Math.cpp:417
float ridged3(float x, float y, float z, int octaves=4, float lacunarity=2.f, float gain=0.5f) const
Definition Math.cpp:602
float bezierCubic(float t, float p0, float p1, float p2, float p3) const
Definition Math.cpp:655
float bilinear(float v00, float v10, float v01, float v11, float u, float v) const
Bilinear sample of 4 corners (v00,v10,v01,v11) with u,v in [0,1].
Definition Math.cpp:503
float ridged2(float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const
Definition Math.cpp:586
float cartesianRadius(float x, float y) const
Definition Math.cpp:286
float distance2(float x1, float y1, float x2, float y2) const
Definition Math.cpp:226
float bias(float t, float b) const
Schlick bias/gain — shape [0,1] distributions (procgen falloff).
Definition Math.cpp:171
float raycastRect2(float ox, float oy, float dx, float dy, float rx, float ry, float rw, float rh) const
Ray vs axis-aligned rect (x,y,w,h). Returns parametric t >= 0, else -1.
Definition Math.cpp:359
float distance3(float x1, float y1, float z1, float x2, float y2, float z2) const
Definition Math.cpp:230
float inverseLerp(float a, float b, float x) const
Inverse of lerp: t such that lerp(a,b,t) ≈ x.
Definition Math.cpp:160
bool segmentsIntersect(float ax, float ay, float bx, float by, float cx, float cy, float dx, float dy) const
True if segments AB and CD intersect (including endpoints).
Definition Math.cpp:319
float remap(float x, float inMin, float inMax, float outMin, float outMax) const
Definition Math.cpp:122
float randomGaussian(float mean, float stddev)
Box-Muller Gaussian (mean, stddev).
Definition Math.cpp:540
float bezierCubic2X(float t, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) const
Definition Math.cpp:673
float fbm3(float x, float y, float z, int octaves=4, float lacunarity=2.f, float gain=0.5f) const
Definition Math.cpp:573
float dot2(float x1, float y1, float x2, float y2) const
Definition Math.cpp:234
float raycastCircle2(float ox, float oy, float dx, float dy, float cx, float cy, float radius) const
Ray vs circle. Hit point = (ox,oy) + t*(dx,dy). Returns t >= 0 on hit, else -1. Direction need not be...
Definition Math.cpp:341
bool pointInRect(float px, float py, float rx, float ry, float rw, float rh) const
Definition Math.cpp:294
bool circlesOverlap(float x1, float y1, float r1, float x2, float y2, float r2) const
Definition Math.cpp:298
float fbm2(float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const
Fractal Brownian Motion / ridged / turbulence. octaves >= 1; lacunarity ~2; gain/persistence ~0....
Definition Math.cpp:560
float raycastSphere(float ox, float oy, float oz, float dx, float dy, float dz, float cx, float cy, float cz, float radius) const
Definition Math.cpp:437
Definition Mat4.cpp:10