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 * NAME: GAS_GrainObject.C ( GAS Library, C++) 00007 * 00008 * COMMENTS: Create composite-sphere grain object. 00009 * 00010 */ 00011 00012 #ifndef __GAS_GrainObject__ 00013 #define __GAS_GrainObject__ 00014 00015 #include "GAS_API.h" 00016 00017 #include <UT/UT_RefArray.h> 00018 #include <UT/UT_Vector3.h> 00019 00020 #include <GU/GU_Detail.h> 00021 00022 class GAS_API GAS_GrainSphere 00023 { 00024 public: 00025 UT_Vector3 myCenter; 00026 fpreal myRadius; 00027 int myParticle; 00028 int mySphereID; 00029 }; 00030 00031 class GAS_API GAS_GrainObject 00032 { 00033 public: 00034 GAS_GrainObject(); 00035 ~GAS_GrainObject(); 00036 00037 // Build an instanced grain from a base grain and an 00038 // appropriate transform. 00039 void instanceFrom(const GAS_GrainObject *base, 00040 int ptnum, 00041 const UT_DMatrix4 &xform); 00042 00043 // Build a grain from the gdp that defines spheres 00044 // instanced onto a geometry. 00045 void buildGrainFromGdp(const GU_Detail *gdp); 00046 00047 UT_RefArray<GAS_GrainSphere> mySpheres; 00048 int myParticle; 00049 }; 00050 00051 #endif
1.5.9