00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "lux.h"
00025 #include "shape.h"
00026 #include "geometry.h"
00027 #include "dynload.h"
00028 #include "texture.h"
00029
00030 namespace lux
00031 {
00032
00033
00034 class NURBS : public Shape {
00035 public:
00036
00037 NURBS(const Transform &o2w, bool reverseOrientation, int nu, int uorder,
00038 const float *uknot, float umin, float umax,
00039 int nv, int vorder, const float *vknot, float vmin, float vmax,
00040 const float *P, bool isHomogeneous);
00041 ~NURBS();
00042 virtual BBox ObjectBound() const;
00043 virtual BBox WorldBound() const;
00044 virtual bool CanIntersect() const { return false; }
00045 virtual void Refine(vector<boost::shared_ptr<Shape> > &refined) const;
00046
00047 static Shape* CreateShape(const Transform &o2w, bool reverseOrientation, const ParamSet ¶ms);
00048 private:
00049
00050 int nu, uorder, nv, vorder;
00051 float umin, umax, vmin, vmax;
00052 float *uknot, *vknot;
00053 bool isHomogeneous;
00054 float *P;
00055 };
00056
00057 }