00001 /* ************************************************************************* 00002 surfacepatch3d.h - description 00003 ------------------- 00004 begin : Sat Nov 30 2002 00005 copyright : (C) 2002 by Micha Riser 00006 email : mriser@gmx.net 00007 00008 $Id: surfacepatch3d_8h-source.html,v 1.1 2005/02/04 21:02:27 micha Exp $ 00009 00010 ************************************************************************* */ 00011 00012 /* ************************************************************************* 00013 * * 00014 * This program is free software; you can redistribute it and/or modify * 00015 * it under the terms of the GNU General Public License as published by * 00016 * the Free Software Foundation; either version 2 of the License, or * 00017 * (at your option) any later version. * 00018 * * 00019 ************************************************************************* */ 00020 00021 #ifndef SURFACEPATCH_H 00022 #define SURFACEPATCH_H 00023 00024 #include "types.h" 00025 #include "vector.h" 00026 00027 class Intersection; 00028 class Ray; 00029 00033 class SurfacePatch3D { 00034 00035 public: // Constructor and destructor 00036 SurfacePatch3D() {} 00037 virtual ~SurfacePatch3D() {} 00038 00039 public: 00040 // Methods used during pre-rendering stage: 00041 00045 virtual SurfacePatch3D* duplicate() const = 0; 00046 00049 virtual bool hasFinitBounding() const = 0; 00050 00053 virtual Vector3 getBoundingMin() const = 0; 00054 00057 virtual Vector3 getBoundingMax() const = 0; 00058 00064 virtual void prepareToRender() {} 00065 00066 00067 // Methods used during rendering: 00068 00074 virtual DBL intersectBounding(const Ray &r) const = 0; 00075 00082 virtual DBL intersectBounding(const Ray &r, DBL tmax) const = 0; 00083 00088 virtual Intersection* intersect(const Ray &r) const; 00089 00095 virtual Intersection* intersectLimitedTime(const Ray &r, DBL maxtime) const = 0; 00096 00097 }; 00098 00099 #endif
1.3.8