aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerpartsim.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llviewerpartsim.h
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerpartsim.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/linden/indra/newview/llviewerpartsim.h b/linden/indra/newview/llviewerpartsim.h
index 7983838..c1ef43b 100644
--- a/linden/indra/newview/llviewerpartsim.h
+++ b/linden/indra/newview/llviewerpartsim.h
@@ -50,7 +50,7 @@ typedef void (*LLVPCallback)(LLViewerPart &part, const F32 dt);
50// 50//
51 51
52 52
53class LLViewerPart : public LLPartData 53class LLViewerPart : public LLPartData, public LLRefCount
54{ 54{
55public: 55public:
56 LLViewerPart(); 56 LLViewerPart();
@@ -90,19 +90,26 @@ public:
90 90
91 void cleanup(); 91 void cleanup();
92 92
93 BOOL addPart(LLViewerPart &part); 93 BOOL addPart(LLViewerPart* part, const F32 desired_size = -1.f);
94 94
95 void updateParticles(const F32 dt); 95 void updateParticles(const F32 dt);
96 96
97 BOOL posInGroup(const LLVector3 &pos); 97 BOOL posInGroup(const LLVector3 &pos, const F32 desired_size = -1.f);
98 98
99 void shift(const LLVector3 &offset); 99 void shift(const LLVector3 &offset);
100 100
101 LLDynamicArray<LLViewerPart> mParticles; 101 typedef std::vector<LLPointer<LLViewerPart> > part_list_t;
102 part_list_t mParticles;
102 103
103 const LLVector3 &getCenterAgent() const { return mCenterAgent; } 104 const LLVector3 &getCenterAgent() const { return mCenterAgent; }
104 S32 getCount() const { return mParticles.count(); } 105 S32 getCount() const { return (S32) mParticles.size(); }
105 LLViewerRegion *getRegion() const { return mRegionp; } 106 LLViewerRegion *getRegion() const { return mRegionp; }
107
108 LLPointer<LLVOPartGroup> mVOPartGroupp;
109
110 BOOL mUniformParticles;
111 U32 mID;
112
106protected: 113protected:
107 void removePart(const S32 part_num); 114 void removePart(const S32 part_num);
108 115
@@ -112,11 +119,9 @@ protected:
112 LLVector3 mMinObjPos; 119 LLVector3 mMinObjPos;
113 LLVector3 mMaxObjPos; 120 LLVector3 mMaxObjPos;
114 121
115 LLPointer<LLVOPartGroup> mVOPartGroupp;
116 LLViewerRegion *mRegionp; 122 LLViewerRegion *mRegionp;
117}; 123};
118 124
119
120class LLViewerPartSim 125class LLViewerPartSim
121{ 126{
122public: 127public:
@@ -132,7 +137,7 @@ public:
132 void cleanupRegion(LLViewerRegion *regionp); 137 void cleanupRegion(LLViewerRegion *regionp);
133 138
134 BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping) 139 BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
135 void addPart(LLViewerPart &part); 140 void addPart(LLViewerPart* part);
136 void cleanMutedParticles(const LLUUID& task_id); 141 void cleanMutedParticles(const LLUUID& task_id);
137 142
138 friend class LLViewerPartGroup; 143 friend class LLViewerPartGroup;
@@ -144,15 +149,18 @@ public:
144 static void incPartCount(const S32 count) { sParticleCount += count; } 149 static void incPartCount(const S32 count) { sParticleCount += count; }
145 static void decPartCount(const S32 count) { sParticleCount -= count; } 150 static void decPartCount(const S32 count) { sParticleCount -= count; }
146 151
152 U32 mID;
153
147protected: 154protected:
148 LLViewerPartGroup *createViewerPartGroup(const LLVector3 &pos_agent); 155 LLViewerPartGroup *createViewerPartGroup(const LLVector3 &pos_agent, const F32 desired_size);
149 LLViewerPartGroup *put(LLViewerPart &part); 156 LLViewerPartGroup *put(LLViewerPart* part);
150 157
151protected: 158protected:
152 LLDynamicArray<LLViewerPartGroup *> mViewerPartGroups; 159 typedef std::vector<LLViewerPartGroup *> group_list_t;
153 LLDynamicArrayPtr<LLPointer<LLViewerPartSource> > mViewerPartSources; 160 typedef std::vector<LLPointer<LLViewerPartSource> > source_list_t;
161 group_list_t mViewerPartGroups;
162 source_list_t mViewerPartSources;
154 LLFrameTimer mSimulationTimer; 163 LLFrameTimer mSimulationTimer;
155
156 static S32 sMaxParticleCount; 164 static S32 sMaxParticleCount;
157 static S32 sParticleCount; 165 static S32 sParticleCount;
158}; 166};