Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

SoftCSG.h

00001 /*
00002   File: SoftCSG.h
00003 
00004   Copyright(C) C. Kotterink, Computed Graphics
00005 */
00006 #ifndef SOFTCSG_H
00007 #define SOFTCSG_H
00008 
00009 #include<CSG.h>
00010 
00013 class SoftCSG : public CSG
00014 {
00015     DYNAMIC_OBJECT;
00016 public:
00018     typedef enum BlendFunction {
00020         SqrtBlend,
00022         OneOverBlend,
00028         WaveBlend,
00034         CosBlend,
00039         SqrBlend,
00044         FlatBlend
00045     };
00046     SoftCSG();
00047 
00048     // Inherited from ImplicitShape
00049     real distance(const Vertex3 &v);
00050 
00051     // Inherited from Shape
00052     real intersect(
00053         const Ray &ray, real t = step, real T = infinity);
00054     Vertex3 normal(const Vertex3 &v);
00055     Color4 calculateShade(
00056         const SurfaceInfo &s, Vertex3 &transformed, Scene &scene);
00057 
00058     // Inherited from DynamicObject
00059     void parseSymbol(Token &t, ObjectFile &file);
00060     void writeParams(ostream &stream);
00061 
00062 protected:
00063     // Inherited from DynamicObject
00064     void createSymbols();
00065 
00066     real blend(real x);
00067 
00068     bool blendShade;
00069     real n;
00070     BlendFunction type;
00071 
00072 private:
00073     typedef CSG super;
00074 };
00075 #endif

This documentation was generated using doxygen. If you have any comments or additions please mail me.