00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if defined(_MSC_VER)
00025 #pragma once
00026 #endif
00027
00028 #ifndef PBRT_CORE_DIFFGEOM_H
00029 #define PBRT_CORE_DIFFGEOM_H
00030
00031
00032 #include "pbrt.h"
00033 #include "geometry.h"
00034
00035
00036 struct DifferentialGeometry {
00037 DifferentialGeometry() { u = v = 0.; shape = NULL; }
00038
00039 DifferentialGeometry(const Point &P, const Vector &DPDU,
00040 const Vector &DPDV, const Normal &DNDU,
00041 const Normal &DNDV, float uu, float vv,
00042 const Shape *sh);
00043 void ComputeDifferentials(const RayDifferential &r) const;
00044
00045
00046 Point p;
00047 Normal nn;
00048 float u, v;
00049 const Shape *shape;
00050 Vector dpdu, dpdv;
00051 Normal dndu, dndv;
00052 mutable Vector dpdx, dpdy;
00053 mutable float dudx, dvdx, dudy, dvdy;
00054 };
00055
00056
00057
00058 #endif // PBRT_CORE_DIFFGEOM_H