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 * Side Effects Software Inc 00008 * 477 Richmond Street West 00009 * Toronto, Ontario 00010 * Canada M5V 3E7 00011 * 416-504-9876 00012 * 00013 * NAME: GU_RandomPoint.h ( GU Library, C++) 00014 * 00015 * COMMENTS: Create a cloud of points on a surface 00016 */ 00017 00018 #ifndef __GU_RandomPoint__ 00019 #define __GU_RandomPoint__ 00020 00021 #include "GU_API.h" 00022 #include <SYS/SYS_Types.h> 00023 00024 class UT_FloatArray; 00025 class GU_Detail; 00026 class GB_PrimitiveGroup; 00027 00028 class GU_API GU_RandomPoint { 00029 public: 00030 //!Random Point Generation 00031 // 00032 /// This method generates random points from the primitives in the detail. 00033 /// gdp - geometry containing the primitives (and which will contain 00034 /// the points) 00035 /// npoints - The number of points to generate 00036 /// seed - random number seed 00037 /// probability - A probability array. There should be one entry per 00038 /// primitive which determines the probabilty of that primitive 00039 /// having a point generated from it. 00040 /// group - Optionally, only generate from this group of primitives 00041 /// 00042 /// Points will be generated using as close to a uniform distribution as 00043 /// possible (in uv space on the primitives). The point locations should 00044 /// remain constant based on primitive number, regardless of shearing or 00045 /// scaling. 00046 static void generatePoints(GU_Detail &gdp, int npoints, uint seed, 00047 UT_FloatArray &probability, 00048 const GB_PrimitiveGroup *group); 00049 }; 00050 00051 #endif
1.5.9