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_SHAPES_DISK_H
00029 #define PBRT_SHAPES_DISK_H
00030
00031
00032 #include "shape.h"
00033
00034
00035 class Disk : public Shape {
00036 public:
00037
00038 Disk(const Transform *o2w, const Transform *w2o, bool ro, float height,
00039 float radius, float innerRadius, float phiMax);
00040 BBox ObjectBound() const;
00041 bool Intersect(const Ray &ray, float *tHit, float *rayEpsilon,
00042 DifferentialGeometry *dg) const;
00043 bool IntersectP(const Ray &ray) const;
00044 float Area() const;
00045 Point Sample(float u1, float u2, Normal *Ns) const;
00046 private:
00047
00048 float height, radius, innerRadius, phiMax;
00049 };
00050
00051
00052 Disk *CreateDiskShape(const Transform *o2w, const Transform *w2o,
00053 bool reverseOrientation, const ParamSet ¶ms);
00054
00055 #endif // PBRT_SHAPES_DISK_H