16 #ifndef __GEO_PrimParticle_H__
17 #define __GEO_PrimParticle_H__
29 #define PART_STATE_PRIMARY 0x0001
30 #define PART_STATE_DYING 0x0002
31 #define PART_STATE_STOPPED 0x0004
32 #define PART_STATE_COLLIDE 0x0008
33 #define PART_STATE_STUCK 0x0010
36 #define PART_STATE_DONTMOVE 0x0016
39 #define PART_STATE_SUPPALL 0x7f00
40 #define PART_STATE_SUPPPOS 0x0100
41 #define PART_STATE_SUPPVEL 0x0200
42 #define PART_STATE_SUPPUP 0x0400
43 #define PART_STATE_SUPPAGE 0x0800
44 #define PART_STATE_SUPPREAP 0x1000
45 #define PART_STATE_SUPPROT 0x2000
46 #define PART_STATE_SUPPANGVEL 0x4000
49 #define PART_STATE_SLIDING 0x8000
68 #if !GA_PRIMITIVE_VERTEXLIST
101 bool areRenderPropertiesEqual(
133 #if !GA_PRIMITIVE_VERTEXLIST
148 bool dry_run=
false)
override;
150 bool dry_run=
false)
override;
168 void deleteParticleByPoint(
GA_Offset pt);
193 #if !GA_PRIMITIVE_VERTEXLIST
198 void *
data = 0)
const;
208 if (i < myVertexList.entries())
212 virtual void beginVertex(const_iterator &i)
const;
213 virtual void nextVertex(const_iterator &i)
const;
220 void stashed(
bool beingstashed,
233 #if !GA_PRIMITIVE_VERTEXLIST
243 #if !GA_PRIMITIVE_VERTEXLIST
258 unsigned du,
unsigned dv)
const override;
261 float u_unit,
float=0,
262 unsigned du=0,
unsigned = 0)
const override;
277 void deleteParticleVertex(
GA_Offset vtxoff)
283 #if !GA_PRIMITIVE_VERTEXLIST
Definition of a geometry attribute.
virtual GEO_Primitive * copy(int preserve_shared_pts=0) const
virtual UT_Vector3 baryCenter() const
SYS_FORCE_INLINE GA_Detail & getDetail() const
virtual void copyPrimitive(const GEO_Primitive *src)=0
GEO_PartRender & getRenderAttribs()
virtual void clearForDeletion()
Used to pass options and map offset values during saving.
SYS_FORCE_INLINE GA_Size getVertexCount() const
Return the number of vertices used by this primitive.
~GEO_PrimParticle() override
void setVertexPoint(unsigned int i, GA_Offset pt)
virtual UT_Vector3D computeNormalD() const =0
const GEO_PartRender & getRenderAttribs() const
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
virtual void copySubclassData(const GA_Primitive *source)
bool enlargeBoundingBox(UT_BoundingRect &b, const GA_Attribute *p) const override
int getNumParticles() const
Returns the number of live particles.
bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const override
const GLuint GLenum const void * binary
virtual GA_DereferenceStatus dereferencePoint(GA_Offset point, bool dry_run=false)=0
JSON reader class which handles parsing of JSON or bJSON files.
void reverse() override=0
Reverse the order of vertices.
#define GA_DECLARE_INTRINSICS(OVERRIDE)
Class which writes ASCII or binary JSON streams.
Abstract base class for a range membership query object.
virtual void swapVertexOffsets(const GA_Defragment &defrag)
static GA_PrimitiveFamilyMask buildFamilyMask()
void wireVertex(GA_Offset vertex, GA_Offset point)
exint GA_Size
Defines the bit width for index and offset types in GA.
SYS_FORCE_INLINE int64 getBaseMemoryUsage() const
Report approximate memory usage for myVertexList for subclasses.
virtual bool loadH9(UT_IStream &is, const UT_Array< GA_AttribLoadDataH9 > &prim_attribs, const UT_Array< GA_AttribLoadDataH9 > &vtx_attribs)
virtual UT_Vector3 computeNormal() const =0
Return a normal vector for the primitive.
#define GA_INVALID_OFFSET
friend std::ostream & operator<<(std::ostream &os, const GEO_PrimParticle &d)
GA_OffsetList myVertexList
virtual bool isDegenerate() const =0
Is the primitive degenerate.
void destroyVertex(GA_Offset vertex)
virtual bool enlargeBoundingSphere(UT_BoundingSphere &b, const GA_Attribute *P) const
virtual const GA_PrimitiveJSON * getJSON() const =0
GLsizei GLsizei GLchar * source
Provide a JSON interface to a primitive.
A handle to simplify manipulation of multiple attributes.
Defragmentation of IndexMaps.
SYS_FORCE_INLINE GA_Offset vertexPoint(GA_Offset vertex) const
Given a vertex, return the point it references.
void addPointRefToGroup(GA_PointGroup &grp) const
GLboolean GLboolean GLboolean b
virtual GA_DereferenceStatus dereferencePoints(const GA_RangeMemberQuery &pt_q, bool dry_run=false)=0
virtual bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const
virtual bool evaluateBaryCenterRefMap(GA_Offset result_vtx, GA_AttributeRefMap &map) const
virtual bool vertexApply(bool(*apply)(GA_Offset vtx, void *), void *data=0) const
virtual int detachPoints(GA_PointGroup &grp)=0
GEO_PrimParticle(GA_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
static const UT_Array< GA_AttribSaveDataH9 > & theEmptySaveAttribs
Convience objects to pass as arguments to saveH9()/loadH9().
const GA_OffsetList & getVertexList() const
GA_Size GEO_ParticleVertexIndex
virtual bool getBBox(UT_BoundingBox *bbox) const =0
SYS_FORCE_INLINE GA_Offset getVertexOffset(GA_Size primvertexnum) const
Class to store JSON objects as C++ objects.
virtual bool evaluatePointRefMap(GA_Offset result_vtx, GA_AttributeRefMap &map, fpreal u, fpreal v=0, uint du=0, uint dv=0) const =0
virtual void addToBSphere(UT_BoundingSphere *bsphere) const
Container class for all geometry.
GLubyte GLubyte GLubyte GLubyte w
void countBaseMemory(UT_MemoryCounter &counter) const
virtual int evaluatePointV4(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const
virtual void stashed(bool beingstashed, GA_Offset offset=GA_INVALID_OFFSET)
GA_Offset vertexPoint(GA_Size i) const