101 NDotE /= refractindex;
104 refracted = n*NDotE - Env*NDotN;
111 *
this-= (p.
d + (*
this|p.
n))*p.
n;
118 projected.
w = 1.0f / projected.
w;
120 projected.
x*=projected.
w;
121 projected.
y*=projected.
w;
122 projected.
z*=projected.
w;
124 projected.
x *= halfrenderwidth; projected.
x += halfrenderwidth;
125 projected.
y *= -halfrenderheight; projected.
y += halfrenderheight;
146 x = a.
x * mat.
m[0][0] + a.
y * mat.
m[0][1] + a.
z * mat.
m[0][2];
147 y = a.
x * mat.
m[1][0] + a.
y * mat.
m[1][1] + a.
z * mat.
m[1][2];
148 z = a.
x * mat.
m[2][0] + a.
y * mat.
m[2][1] + a.
z * mat.
m[2][2];
154 x = a1.
x * mat1.
m[0][0] + a1.
y * mat1.
m[0][1] + a1.
z * mat1.
m[0][2] + a2.
x * mat2.
m[0][0] + a2.
y * mat2.
m[0][1] + a2.
z * mat2.
m[0][2];
155 y = a1.
x * mat1.
m[1][0] + a1.
y * mat1.
m[1][1] + a1.
z * mat1.
m[1][2] + a2.
x * mat2.
m[1][0] + a2.
y * mat2.
m[1][1] + a2.
z * mat2.
m[1][2];
156 z = a1.
x * mat1.
m[2][0] + a1.
y * mat1.
m[2][1] + a1.
z * mat1.
m[2][2] + a2.
x * mat2.
m[2][0] + a2.
y * mat2.
m[2][1] + a2.
z * mat2.
m[2][2];
162 x += a.
x * mat.
m[0][0] + a.
y * mat.
m[0][1] + a.
z * mat.
m[0][2];
163 y += a.
x * mat.
m[1][0] + a.
y * mat.
m[1][1] + a.
z * mat.
m[1][2];
164 z += a.
x * mat.
m[2][0] + a.
y * mat.
m[2][1] + a.
z * mat.
m[2][2];
170 x = a.
x * mat.
m[0][0] + a.
y * mat.
m[1][0] + a.
z * mat.
m[2][0];
171 y = a.
x * mat.
m[0][1] + a.
y * mat.
m[1][1] + a.
z * mat.
m[2][1];
172 z = a.
x * mat.
m[0][2] + a.
y * mat.
m[1][2] + a.
z * mat.
m[2][2];
178 x = r.
x * rotpos.
m[0][0] + r.
y * rotpos.
m[0][1] + r.
z * rotpos.
m[0][2] + linpos.
x;
179 y = r.
x * rotpos.
m[1][0] + r.
y * rotpos.
m[1][1] + r.
z * rotpos.
m[1][2] + linpos.
y;
180 z = r.
x * rotpos.
m[2][0] + r.
y * rotpos.
m[2][1] + r.
z * rotpos.
m[2][2] + linpos.
z;
186 float sx = r.
x - linpos.
x;
187 float sy = r.
y - linpos.
y;
188 float sz = r.
z - linpos.
z;
189 x = sx * rotpos.
m[0][0] + sy * rotpos.
m[1][0] + sz * rotpos.
m[2][0];
190 y = sx * rotpos.
m[0][1] + sy * rotpos.
m[1][1] + sz * rotpos.
m[2][1];
191 z = sx * rotpos.
m[0][2] + sy * rotpos.
m[1][2] + sz * rotpos.
m[2][2];
inline_ Point & Mac(const Point &a, const Point &b, float scalar)
this = a + b * scalar
#define IR(x)
Integer representation of a floating-point value.
Point & PositiveUnitRandomVector()
Sets positive unit random vector.
inline_ Point & Transform(const Point &r, const Matrix3x3 &rotpos, const Point &linpos)
this = rotpos * r + linpos
int BOOL
Another boolean type.
inline_ Point & Mult2(const Matrix3x3 &mat1, const Point &a1, const Matrix3x3 &mat2, const Point &a2)
this = mat1 * a1 + mat2 * a2
Point n
The normal to the plane.
Point & UnitRandomVector()
Sets unit random vector.
inline_ float UnitRandomFloat()
Returns a unit random floating-point value.
void SetNotUsed()
Stuff magic values in the point, marking it as explicitely not used.
void ProjectToScreen(float halfrenderwidth, float halfrenderheight, const Matrix4x4 &mat, HPoint &projected) const
Projects the point onto the screen.
BOOL IsNotUsed() const
Checks the point is marked as not used.
float w
Cast a HPoint to a Point. w is discarded.
inline_ Point & Normalize()
Normalizes the vector.
Point & ProjectToPlane(const Plane &p)
Projects the point onto a plane.
inline_ Point & Mult(float s)
Multiplies by a scalar.
Point & Refract(const Point &eye, const Point &n, float refractindex, Point &refracted)
Refracts the point.
inline_ Point & InvTransform(const Point &r, const Matrix3x3 &rotpos, const Point &linpos)
this = trans(rotpos) * (r - linpos)
float d
The distance from the origin.
inline_ Point & TransMult(const Matrix3x3 &mat, const Point &a)
this = transpose(mat) * a