aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvovolume.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llvovolume.h')
-rw-r--r--linden/indra/newview/llvovolume.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h
index d09a198..39d9227 100644
--- a/linden/indra/newview/llvovolume.h
+++ b/linden/indra/newview/llvovolume.h
@@ -36,6 +36,8 @@
36#include "llviewerobject.h" 36#include "llviewerobject.h"
37#include "llviewerimage.h" 37#include "llviewerimage.h"
38#include "llframetimer.h" 38#include "llframetimer.h"
39#include "llmediadataclient.h"
40#include "llviewermedia.h"
39#include "llapr.h" 41#include "llapr.h"
40#include <map> 42#include <map>
41 43
@@ -43,6 +45,8 @@ class LLViewerTextureAnim;
43class LLDrawPool; 45class LLDrawPool;
44class LLSelectNode; 46class LLSelectNode;
45 47
48typedef std::vector<viewer_media_t> media_list_t;
49
46enum LLVolumeInterfaceType 50enum LLVolumeInterfaceType
47{ 51{
48 INTERFACE_FLEXIBLE = 1, 52 INTERFACE_FLEXIBLE = 1,
@@ -217,6 +221,46 @@ public:
217 221
218 // tag: vaa emerald local_asset_browser 222 // tag: vaa emerald local_asset_browser
219 void setSculptChanged(BOOL has_changed) { mSculptChanged = has_changed; } 223 void setSculptChanged(BOOL has_changed) { mSculptChanged = has_changed; }
224
225
226 // Functions that deal with media, or media navigation
227
228 // Update this object's media data with the given media data array
229 // (typically this is only called upon a response from a server request)
230 void updateObjectMediaData(const LLSD &media_data_array, const std::string &media_version);
231
232 // Bounce back media at the given index to its current URL (or home URL, if current URL is empty)
233 void mediaNavigateBounceBack(U8 texture_index);
234
235 // Returns whether or not this object has permission to navigate or control
236 // the given media entry
237 enum MediaPermType {
238 MEDIA_PERM_INTERACT, MEDIA_PERM_CONTROL
239 };
240 bool hasMediaPermission(const LLMediaEntry* media_entry, MediaPermType perm_type);
241
242 void mediaNavigated(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, std::string new_location);
243 void mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, LLViewerMediaObserver::EMediaEvent event);
244
245 // Sync the given media data with the impl and the given te
246 void syncMediaData(S32 te, const LLSD &media_data, bool merge, bool ignore_agent);
247
248 // Send media data update to the simulator.
249 void sendMediaDataUpdate();
250
251 viewer_media_t getMediaImpl(U8 face_id) const;
252 S32 getFaceIndexWithMediaImpl(const LLViewerMediaImpl* media_impl, S32 start_face_id);
253 F64 getTotalMediaInterest() const;
254
255 bool hasMedia() const;
256
257 LLVector3 getApproximateFaceNormal(U8 face_id);
258
259 // Returns 'true' iff the media data for this object is in flight
260 bool isMediaDataBeingFetched() const;
261
262 // Returns the "last fetched" media version, or -1 if not fetched yet
263 S32 getLastFetchedMediaVersion() const { return mLastFetchedMediaVersion; }
220 264
221protected: 265protected:
222 S32 computeLODDetail(F32 distance, F32 radius); 266 S32 computeLODDetail(F32 distance, F32 radius);
@@ -224,6 +268,11 @@ protected:
224 LLFace* addFace(S32 face_index); 268 LLFace* addFace(S32 face_index);
225 void updateTEData(); 269 void updateTEData();
226 270
271 void requestMediaDataUpdate(bool isNew);
272 void cleanUpMediaImpls();
273 void addMediaImpl(LLViewerMediaImpl* media_impl, S32 texture_index) ;
274 void removeMediaImpl(S32 texture_index) ;
275
227public: 276public:
228 LLViewerTextureAnim *mTextureAnimp; 277 LLViewerTextureAnim *mTextureAnimp;
229 U8 mTexAnimMode; 278 U8 mTexAnimMode;
@@ -242,12 +291,16 @@ private:
242 LLVolumeInterface *mVolumeImpl; 291 LLVolumeInterface *mVolumeImpl;
243 LLPointer<LLViewerImage> mSculptTexture; 292 LLPointer<LLViewerImage> mSculptTexture;
244 S32 mIndexInTex; // index of this volume in the texture's volume list 293 S32 mIndexInTex; // index of this volume in the texture's volume list
294 media_list_t mMediaImplList;
295 S32 mLastFetchedMediaVersion; // as fetched from the server, starts as -1
245 296
246 // statics 297 // statics
247public: 298public:
248 static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop 299 static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop
249 static F32 sLODFactor; // LOD scale factor 300 static F32 sLODFactor; // LOD scale factor
250 static F32 sDistanceFactor; // LOD distance factor 301 static F32 sDistanceFactor; // LOD distance factor
302 static LLPointer<LLObjectMediaDataClient> sObjectMediaClient;
303 static LLPointer<LLObjectMediaNavigateClient> sObjectMediaNavigateClient;
251 304
252protected: 305protected:
253 static S32 sNumLODChanges; 306 static S32 sNumLODChanges;