00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Jeff Lait 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: GEO_PrimTriFan.h ( GEO Library, C++) 00015 * 00016 * COMMENTS: Implements a normal triangle fan. 00017 */ 00018 00019 #ifndef __GEO_PrimTriFan__ 00020 #define __GEO_PrimTriFan__ 00021 00022 #include "GEO_API.h" 00023 #include "GEO_TriMesh.h" 00024 #include "GEO_PrimType.h" 00025 00026 class GEO_Point; 00027 class GEO_Detail; 00028 00029 class GEO_API GEO_PrimTriFan : public GEO_TriMesh 00030 { 00031 public: 00032 GEO_PrimTriFan(GEO_Detail *d) : GEO_TriMesh(d) { } 00033 ~GEO_PrimTriFan(); 00034 00035 virtual unsigned getPrimitiveId() const; 00036 virtual int isDegenerate() const; 00037 virtual UT_Vector3 computeNormal() const; 00038 virtual void reverse(); 00039 00040 virtual float calcVolume(UT_Vector3 &refpt) const; 00041 virtual float calcArea() const; 00042 virtual float calcPerimeter() const; 00043 protected: 00044 // We don't need to save anything other than what's in a face 00045 virtual int savePrivate(ostream &, int binary) const; 00046 virtual bool loadPrivate(UT_IStream &); 00047 00048 private: 00049 friend ostream &operator<<(ostream &os, const GEO_PrimTriFan &d) 00050 { 00051 d.save(os, 0); 00052 return os; 00053 } 00054 }; 00055 00056 #endif 00057
1.5.9