14 #ifndef __GEO_PrimPoly_H__
15 #define __GEO_PrimPoly_H__
42 { myVertexList = vertex_list; }
47 return *theDefinition;
62 virtual int unroll(
int append_pts = 1);
68 virtual int loft(
int newcount,
int start=-1,
int stop=-1);
76 float sharpness = 0.0
f,
float bias = -1.0
f);
95 float bias = .5
f,
float tolerance = 1.
f,
111 float tolerance = 1e-05F)
const;
131 bool appendpts=
true);
149 const int *polygonpointnumbers,
150 const bool closed =
true);
155 const int *polygonpointnumbers,
156 const bool closed =
true);
178 const int *polygonpointnumbers,
179 const bool closed =
true)
195 const int *polygonpointnumbers,
196 const bool closed =
true)
235 bool isPlanar(
float tolerance = 0.0001F)
const;
238 bool isConvex(
float tolerance = 0.0001F)
const;
258 int findMaxDistance(
float &maxdist2,
259 int start,
int stop)
const;
286 UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!");
292 UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!");
297 float tmax = 1E17F,
float tol = 1E-12F,
300 float *u = 0,
float *
v = 0,
301 int ignoretrim=1)
const
303 UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!");
309 float tol = 0.01F,
int ignoretrim=1)
const
311 UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!");
317 {
UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!"); }
330 friend class GU_PrimitiveFactory;
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
virtual int breakCount() const =0
SYS_FORCE_INLINE GEO_PrimPoly(GA_Detail *gdp, GA_Offset offset, const GA_OffsetListRef &vertex_list)
virtual void clip(UT_Vector3 normal, float distance=0, GA_PrimitiveGroup *clipgrp=NULL)
static GA_Offset buildBlock(GA_Detail *detail, const GA_Offset startpt, const GA_Size npoints, const GEO_PolyCounts &polygonsizelist, const int *polygonpointnumbers, const bool closed=true)
SYS_FORCE_INLINE GEO_PrimPoly(GA_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
void computeInteriorPointWeights(UT_Array< GA_Offset > &vtxlist, UT_FloatArray &weightlist, fpreal u, fpreal v, fpreal w) const override
const GLuint GLenum const void * binary
GA_Offset prevBoundaryVertex(unsigned int i) const
virtual GA_Size stealVertex(GA_Offset vtx, GA_Offset insert_before_vtx=GA_INVALID_OFFSET)
bool loadPrivateH9(UT_IStream &is) override=0
virtual int loft(int newcount, int start=-1, int stop=-1)=0
virtual int64 getMemoryUsage() const
SYS_FORCE_INLINE bool isClosed() const
virtual int warp(float u, const UT_Vector3 &delta, GA_AttributeRefMap &map, float sharpness=0.0f, float bias=-1.0f)=0
exint GA_Size
Defines the bit width for index and offset types in GA.
virtual float unitLengthToUnitDomain(float ulength, float tolerance=1e-04F) const
#define GA_INVALID_OFFSET
SYS_FORCE_INLINE GA_Offset getFastVertexOffset(GA_Size index) const
virtual int intersect(const GEO_Primitive &prim, UT_Array< GU_RayInfoHit > &hitList, float tol=0.01F, int ignoretrim=1) const
static GA_Offset buildBlock(GA_Detail *detail, const GA_Offset startpt, const GA_Size npoints, const GA_PolyCounts &polygonsizelist, const int *polygonpointnumbers, const bool closed=true)
virtual int evaluateInteriorPointV4(UT_Vector4 &pos, fpreal u, fpreal v, fpreal w=0) const
T distance(const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
virtual GA_Size appendVertex(GA_Offset ppt)
virtual void countMemory(UT_MemoryCounter &counter) const
virtual int attach(const GEO_Face &face, int blend=1, float bias=0.5f, float tolerance=1.0f, int unrefine=1, GA_PointGroup *ptgroup=0)=0
virtual GD_Face * planar(GD_Detail &dgdp, int copyxy=0) const =0
virtual const GA_PrimitiveJSON * getJSON() const =0
Provide a JSON interface to a primitive.
virtual unsigned getOrder(void) const =0
A handle to simplify manipulation of multiple attributes.
virtual const GA_PrimitiveDefinition & getTypeDef() const
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
static GA_PrimitiveFamilyMask buildFamilyMask()
virtual bool evaluateInteriorPointRefMap(GA_Offset result_vtx, GA_AttributeRefMap &map, fpreal u, fpreal v, fpreal w=0) const
friend std::ostream & operator<<(std::ostream &os, const GEO_PrimPoly &d)
virtual void getAdjacentBoundaryVertices(GA_Offset vtx, GA_Offset &prev_vtx, GA_Offset &next_vtx) const
static const UT_Array< GA_AttribSaveDataH9 > & theEmptySaveAttribs
Convience objects to pass as arguments to saveH9()/loadH9().
virtual bool supportsHedge() const
GA_Offset nextBoundaryVertex(unsigned int i) const
bool savePrivateH9(std::ostream &os, bool binary) const override=0
static GA_PrimitiveFamilyMask buildFamilyMask()
Container class for all geometry.
png_infop png_uint_32 int num
GLubyte GLubyte GLubyte GLubyte w
SYS_FORCE_INLINE GA_Size getFastVertexCount() const
virtual float unitToUnitLengthDomain(float uparm) const
virtual GA_Size insertVertex(GA_Offset ppt, GA_Size where=0)
Definition of a geometric primitive.
bool isDegenerate() const override
Is the primitive degenerate.
virtual int evaluateBreakpoint(int uidx, UT_Vector4 &pos, int du=0) const =0
virtual int intersectRay(const UT_Vector3 &o, const UT_Vector3 &d, float tmax=1E17F, float tol=1E-12F, float *distance=0, UT_Vector3 *pos=0, UT_Vector3 *nml=0, int accurate=0, float *u=0, float *v=0, int ignoretrim=1) const
#define UT_ASSERT_MSG(ZZ, MM)
virtual int deleteVertex(GA_Size num)
virtual GEO_Primitive * convertNew(GEO_ConvertParms &parms)
virtual GEO_Primitive * convert(GEO_ConvertParms &parms, GA_PointGroup *usedpts=0)
virtual int unroll(int append_pts=1)
bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const override
static GA_Offset buildBlock(GA_PrimitiveTypeId type, GA_Detail *detail, const GA_Offset startpt, const GA_Size npoints, const GEO_PolyCounts &facesizelist, const int *facepointnumbers, const bool closed=true)