public DifferentialGeometry(Point P, Vector DPDU, Vector DPDV, Normal DNDU, Normal DNDV, double uu, double vv, Shape sh) { p = P; dpdu = DPDU; dpdv = DPDV; dndu = DNDU; dndv = DNDV; // Initialize _DifferentialGeometry_ from parameters nn = new Normal(Geometry.Normalize(Geometry.Cross(dpdu, dpdv))); u = uu; v = vv; shape = sh; dudx = dvdx = dudy = dvdy = 0.0d; // Adjust normal based on orientation and handedness if (shape != null && (shape.ReverseOrientation ^ shape.TransformSwapsHandedness)) nn *= -1.0d; }
public GeometricPrimitive(Shape s, Material m, AreaLight a) { shape = s; material = m; areaLight = a; }