00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __GU_PrimGroup_h__
00021 #define __GU_PrimGroup_h__
00022
00023 #include "GU_API.h"
00024 #include <GEO/GEO_Primitive.h>
00025 #include "GU_Group.h"
00026 #include "GU_Detail.h"
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 class GU_API GU_PrimGroup : public GU_Group
00037 {
00038 public:
00039 GU_PrimGroup(const char *n, GU_Detail *gdp, unsigned mask = 0xffffffff)
00040 : GU_Group(gdp, mask)
00041 { newGroup(n); }
00042 GU_PrimGroup(GU_Detail *gdp, GB_PrimitiveGroup *primGroup)
00043 : GU_Group(gdp)
00044 {
00045 theName = primGroup->getName();
00046 setGroup(primGroup);
00047 }
00048 virtual ~GU_PrimGroup();
00049
00050 virtual GB_Group *newGroup(const char *name);
00051 virtual GB_Group *find(const char *name) const;
00052 virtual void destroy(void);
00053
00054
00055
00056 void generateGroup(const GU_GroupParms &parms);
00057
00058
00059 void range(int num, int, int, int, int, int) const;
00060 void pattern(char *pattern, int nelements, int) const;
00061 int boundingBox(float, float, float, float, float, float,
00062 float, float, float);
00063 void boundingSphere(float tx, float ty, float tz,
00064 float radx, float rady, float radz)
00065 const;
00066 void normal(UT_Vector3 &nml, float angle) const;
00067 void backface(const UT_Vector3 &eye) const;
00068 void degenerate(bool degenerate, bool zaf, bool doOpen,
00069 float tol) const;
00070
00071 void nonplanar(float tol) const;
00072
00073 private:
00074 const char *theName;
00075
00076 int primInsideSphere(GEO_Primitive *prim, float, float,
00077 float, float, float, float) const;
00078 };
00079
00080 #endif