static void quilted (const Vector3d& EPoint, const TNORMAL *Tnormal, Vector3d& normal) { Vector3d value; DBL t; value[X] = EPoint[X]-FLOOR(EPoint[X])-0.5; value[Y] = EPoint[Y]-FLOOR(EPoint[Y])-0.5; value[Z] = EPoint[Z]-FLOOR(EPoint[Z])-0.5; t = value.length(); t = quilt_cubic(t, dynamic_cast<QuiltedPattern*>(Tnormal->pattern.get())->Control0, dynamic_cast<QuiltedPattern*>(Tnormal->pattern.get())->Control1); value *= t; normal += (DBL)Tnormal->Amount * value; }
static void quilted (const VECTOR EPoint, const TNORMAL *Tnormal, VECTOR normal) { VECTOR value; DBL t; value[X] = EPoint[X]-FLOOR(EPoint[X])-0.5; value[Y] = EPoint[Y]-FLOOR(EPoint[Y])-0.5; value[Z] = EPoint[Z]-FLOOR(EPoint[Z])-0.5; t = sqrt(value[X]*value[X]+value[Y]*value[Y]+value[Z]*value[Z]); t = quilt_cubic(t, Tnormal->Vals.Quilted.Control0, Tnormal->Vals.Quilted.Control1); value[X] *= t; value[Y] *= t; value[Z] *= t; VAddScaledEq (normal, Tnormal->Amount,value); }