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 * David Wong 00008 * Side Effects 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: TS_SuperQuad (C++) 00015 * 00016 * COMMENTS: 00017 * 00018 */ 00019 00020 #ifndef _TS_SuperQuad_h_ 00021 #define _TS_SuperQuad_h_ 00022 00023 #include "TS_API.h" 00024 #include "TS_Primitive.h" 00025 00026 class TS_API TS_MetaSuperQuadric: public TS_MetaPrimitive { 00027 public: 00028 TS_MetaSuperQuadric(); 00029 TS_MetaSuperQuadric(const TS_MetaSuperQuadric *); 00030 float density(const UT_Vector3 &p) const; 00031 UT_Interval density(const UT_BoundingBox &p) const; 00032 float grad(const UT_Vector3 &point, UT_Vector3 &grad) const; 00033 int setRay(const TS_Ray &ray); 00034 float rayDensity(float t) const; 00035 UT_Interval rayDensity(const UT_Interval &t) const; 00036 void transform(const UT_Matrix4 &); 00037 TS_MetaExpression *duplicate() const; 00038 void setXYexp(float arg); 00039 float getXYexp() const; 00040 void setZexp(float arg); 00041 float getZexp() const; 00042 void init(); 00043 void reset(); 00044 private: 00045 #ifdef LINUX 00046 public: 00047 virtual ~TS_MetaSuperQuadric(); 00048 private: 00049 #else 00050 virtual ~TS_MetaSuperQuadric(); 00051 #endif 00052 void setLUTs(); 00053 float xyexp; 00054 float zexp, xyzexp; 00055 float izexp1, xyzexp1; 00056 UT_LUT *xylut, *zlut, *izlut; 00057 UT_LUT *xy1lut, *z1lut, *iz1lut; 00058 UT_Matrix4 m; 00059 UT_Matrix4 im; 00060 UT_Vector3 dir, anchor; 00061 int hitFlag; 00062 }; 00063 00064 #endif
1.5.9