14 #ifndef __GEO_PrimPoly_H__
15 #define __GEO_PrimPoly_H__
42 { myVertexList = vertex_list; }
47 return *theDefinition;
62 int unroll(
int append_pts = 1)
override;
68 int loft(
int newcount,
int start=-1,
int stop=-1)
override;
76 float sharpness = 0.0
f,
77 float bias = -1.0
f)
override;
81 int du=0)
const override;
96 float bias = .5
f,
float tolerance = 1.
f,
113 float tolerance = 1e-05F)
const override;
137 bool appendpts=
true);
155 const int *polygonpointnumbers,
156 const bool closed =
true);
161 const int *polygonpointnumbers,
162 const bool closed =
true);
184 const int *polygonpointnumbers,
185 const bool closed =
true)
201 const int *polygonpointnumbers,
202 const bool closed =
true)
241 bool isPlanar(
float tolerance = 0.0001F)
const;
244 bool isConvex(
float tolerance = 0.0001F)
const;
264 int findMaxDistance(
float &maxdist2,
265 int start,
int stop)
const;
294 UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!");
300 UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!");
305 float tmax = 1E17F,
float tol = 1E-12F,
308 float *u = 0,
float *
v = 0,
309 int ignoretrim=1)
const override
311 UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!");
317 float tol = 0.01F,
int ignoretrim=1)
const override
319 UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!");
325 {
UT_ASSERT_MSG(0,
"Implemented in GU_PrimPoly! This is just a stub so that GEO_PrimPoly is not abstract!"); }
338 friend class GU_PrimitiveFactory;
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
virtual int breakCount() const =0
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 override
SYS_FORCE_INLINE GEO_PrimPoly(GA_Detail *gdp, GA_Offset offset, const GA_OffsetListRef &vertex_list)
GLdouble GLdouble GLint GLint const GLdouble * points
const GA_PrimitiveDefinition & getTypeDef() const override
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)
const GLuint GLenum const void * binary
int intersect(const GEO_Primitive &prim, UT_Array< GU_RayInfoHit > &hit_list, float tol=0.01F, int ignoretrim=1) const override
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
#define UT_ASSERT_MSG(ZZ,...)
vint4 blend(const vint4 &a, const vint4 &b, const vbool4 &mask)
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
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.
bool supportsHedge() const override
A handle to simplify manipulation of multiple attributes.
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
GEO_Primitive * convertNew(GEO_ConvertParms &parms) override
void clip(UT_Vector3 normal, float distance=0, GA_PrimitiveGroup *clipgrp=NULL) override
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 unsigned getOrder() const =0
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().
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.
GEO_Primitive * convert(GEO_ConvertParms &parms, GA_PointGroup *usedpts=0) override
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.
SIM_API const UT_StringHolder distance
bool isDegenerate() const override
Is the primitive degenerate.
virtual int evaluateBreakpoint(int uidx, UT_Vector4 &pos, int du=0) const =0
virtual int deleteVertex(GA_Size num)
void computeInteriorPointWeights(UT_Array< GA_Offset > &vtxlist, UT_Array< float > &weightlist, fpreal u, fpreal v, fpreal w) const override
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)