Lines Matching refs:a
54 flt VDot(vector *a, vector *b) { in VDot() argument
55 return (a->x * b->x + a->y * b->y + a->z * b->z); in VDot()
58 void VCross(vector *a, vector *b, vector *c) { in VCross() argument
59 c->x = (a->y * b->z) - (a->z * b->y); in VCross()
60 c->y = (a->z * b->x) - (a->x * b->z); in VCross()
61 c->z = (a->x * b->y) - (a->y * b->x); in VCross()
64 flt VLength(vector *a) { in VLength() argument
65 return (flt)sqrt((a->x * a->x) + (a->y * a->y) + (a->z * a->z)); in VLength()
68 void VNorm(vector *a) { in VNorm() argument
71 len = sqrt((a->x * a->x) + (a->y * a->y) + (a->z * a->z)); in VNorm()
73 a->x /= len; in VNorm()
74 a->y /= len; in VNorm()
75 a->z /= len; in VNorm()
79 void VAdd(vector *a, vector *b, vector *c) { in VAdd() argument
80 c->x = (a->x + b->x); in VAdd()
81 c->y = (a->y + b->y); in VAdd()
82 c->z = (a->z + b->z); in VAdd()
85 void VSub(vector *a, vector *b, vector *c) { in VSub() argument
86 c->x = (a->x - b->x); in VSub()
87 c->y = (a->y - b->y); in VSub()
88 c->z = (a->z - b->z); in VSub()
91 void VAddS(flt a, vector *A, vector *B, vector *C) { in VAddS() argument
92 C->x = (a * A->x) + B->x; in VAddS()
93 C->y = (a * A->y) + B->y; in VAddS()
94 C->z = (a * A->z) + B->z; in VAddS()
97 vector Raypnt(ray *a, flt t) { in Raypnt() argument
100 temp.x = a->o.x + (a->d.x * t); in Raypnt()
101 temp.y = a->o.y + (a->d.y * t); in Raypnt()
102 temp.z = a->o.z + (a->d.z * t); in Raypnt()
107 void VScale(vector *a, flt s) { in VScale() argument
108 a->x *= s; in VScale()
109 a->y *= s; in VScale()
110 a->z *= s; in VScale()
113 void ColorAddS(color *a, color *b, flt s) { in ColorAddS() argument
114 a->r += b->r * s; in ColorAddS()
115 a->g += b->g * s; in ColorAddS()
116 a->b += b->b * s; in ColorAddS()
119 void ColorAccum(color *a, color *b) { in ColorAccum() argument
120 a->r += b->r; in ColorAccum()
121 a->g += b->g; in ColorAccum()
122 a->b += b->b; in ColorAccum()
125 void ColorScale(color *a, flt s) { in ColorScale() argument
126 a->r *= s; in ColorScale()
127 a->g *= s; in ColorScale()
128 a->b *= s; in ColorScale()