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 * Mark Elendt 00008 * Side Effects 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: GEO library (C++) 00015 * 00016 * COMMENTS: Particle Render Options 00017 * 00018 */ 00019 00020 #ifndef __GEO_PartRender_h__ 00021 #define __GEO_PartRender_h__ 00022 00023 #include "GEO_API.h" 00024 #include <iostream.h> 00025 class UT_IStream; 00026 00027 typedef enum { 00028 GEO_PARTICLE_SPHERE, // Render as spheres 00029 GEO_PARTICLE_CIRCLE, // Render as oriented circles 00030 GEO_PARTICLE_LINE, // Render as lines 00031 GEO_PARTICLE_TUBE, // Render as open tubes 00032 GEO_PARTICLE_TUBEC, // Render as capped tubes 00033 GEO_PARTICLE_TUBES // Render as rounded tubes 00034 } GEO_PART_TYPE; 00035 00036 #define GEO_PART_MOTIONBLUR 0x0001 // Particles are motion blurred 00037 #define GEO_PART_SPHERENML 0x0002 // Oriented circles use sphere normals 00038 #define GEO_PART_VIRTUAL 0x0004 // Particles not to be rendered 00039 00040 class GEO_API GEO_PartRender { 00041 public: 00042 GEO_PartRender(); 00043 ~GEO_PartRender(); 00044 00045 int save(ostream &os, int binary) const; 00046 bool load(UT_IStream &is); 00047 00048 void setSize(float radius) { mySize = radius; } 00049 void setBlurTime(float bt) { myBlurTime = bt; } 00050 void setType(GEO_PART_TYPE t){ myType = t; } 00051 void setMotionBlur(int onOff) 00052 { 00053 if (onOff) myFlag |= GEO_PART_MOTIONBLUR; 00054 else myFlag &= ~GEO_PART_MOTIONBLUR; 00055 } 00056 void setSphereNormals(int onOff) 00057 { 00058 if (onOff) myFlag |= GEO_PART_SPHERENML; 00059 else myFlag &= ~GEO_PART_SPHERENML; 00060 } 00061 void setVirtual(int onOff) 00062 { 00063 if (onOff) myFlag |= GEO_PART_VIRTUAL; 00064 else myFlag &= ~GEO_PART_VIRTUAL; 00065 } 00066 00067 00068 float getSize() const { return mySize; } 00069 float getBlurTime() const { return myBlurTime; } 00070 GEO_PART_TYPE getType() const { return myType; } 00071 int isMotionBlur() const 00072 { return myFlag & GEO_PART_MOTIONBLUR; } 00073 int isSphereNormal() const 00074 { return myFlag & GEO_PART_SPHERENML; } 00075 int isVirtual() const 00076 { return myFlag & GEO_PART_VIRTUAL; } 00077 00078 private: 00079 int myFlag; 00080 float mySize; 00081 float myBlurTime; 00082 GEO_PART_TYPE myType; 00083 }; 00084 00085 #endif
1.5.9