00001 
00032 #ifndef LL_LLVIEWEROBJECT_H
00033 #define LL_LLVIEWEROBJECT_H
00034 
00035 #include <map>
00036 
00037 #include "linked_lists.h"
00038 #include "llassetstorage.h"
00039 #include "lldarrayptr.h"
00040 #include "llhudtext.h"
00041 #include "llhudicon.h"
00042 #include "llinventory.h"
00043 #include "llmemory.h"
00044 #include "llmemtype.h"
00045 #include "llprimitive.h"
00046 #include "lluuid.h"
00047 #include "llvoinventorylistener.h"
00048 #include "object_flags.h"
00049 #include "llquaternion.h"
00050 #include "v3dmath.h"
00051 #include "v3math.h"
00052 #include "llvertexbuffer.h"
00053 
00054 class LLAgent;                  
00055 class LLAudioSource;
00056 class LLAudioSourceVO;
00057 class LLBBox;
00058 class LLDataPacker;
00059 class LLColor4;
00060 class LLFrameTimer;
00061 class LLDrawable;
00062 class LLHost;
00063 class LLWorld;
00064 class LLNameValue;
00065 class LLNetMap;
00066 class LLMessageSystem;
00067 class LLPrimitive;
00068 class LLPipeline;
00069 class LLTextureEntry;
00070 class LLViewerImage;
00071 class LLViewerInventoryItem;
00072 class LLViewerObject;
00073 class LLViewerPartSourceScript;
00074 class LLViewerRegion;
00075 class LLViewerObjectMedia;
00076 class LLVOInventoryListener;
00077 
00078 typedef enum e_object_update_type
00079 {
00080         OUT_FULL,
00081         OUT_TERSE_IMPROVED,
00082         OUT_FULL_COMPRESSED,
00083         OUT_FULL_CACHED,
00084 } EObjectUpdateType;
00085 
00086 
00087 
00088 typedef void (*inventory_callback)(LLViewerObject*,
00089                                                                    InventoryObjectList*,
00090                                                                    S32 serial_num,
00091                                                                    void*);
00092 
00093 
00094 struct LLVOJointInfo
00095 {
00096         EHavokJointType mJointType;
00097         LLVector3 mPivot;                       
00098         
00099         
00100         
00101         
00102         LLVector3 mAxisOrAnchor;        
00103 };
00104 
00105 
00106 struct LLMaterialExportInfo
00107 {
00108 public:
00109         LLMaterialExportInfo(S32 mat_index, S32 texture_index, LLColor4 color) : 
00110           mMaterialIndex(mat_index), mTextureIndex(texture_index), mColor(color) {};
00111 
00112         S32                     mMaterialIndex;
00113         S32                     mTextureIndex;
00114         LLColor4        mColor;
00115 };
00116 
00117 
00118 
00119 class LLViewerObject : public LLPrimitive, public LLRefCount
00120 {
00121 protected:
00122         ~LLViewerObject(); 
00123 
00124         
00125         struct ExtraParameter
00126         {
00127                 BOOL in_use;
00128                 LLNetworkData *data;
00129         };
00130         std::map<U16, ExtraParameter*> mExtraParameterList;
00131 
00132 public:
00133         typedef std::vector<LLPointer<LLViewerObject> > child_list_t;
00134 
00135         LLViewerObject(const LLUUID &id, const LLPCode type, LLViewerRegion *regionp);
00136         MEM_TYPE_NEW(LLMemType::MTYPE_OBJECT);
00137 
00138         virtual void markDead();                                
00139         BOOL isDead() const                                                                     {return mDead;}
00140         BOOL isOrphaned() const                                                         { return mOrphaned; }
00141         BOOL isParticleSource() const;
00142 
00143         static void initVOClasses();
00144         static void cleanupVOClasses();
00145 
00146         void                    addNVPair(const std::string& data);
00147         BOOL                    removeNVPair(const char *name);
00148         LLNameValue             *getNVPair(const char *name) const;                     
00149 
00150         
00151         virtual BOOL    idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
00152 
00153         
00154         enum { MEDIA_TYPE_NONE = 0, MEDIA_TYPE_WEB_PAGE = 1 };
00155 
00156         
00157         enum { MEDIA_URL_REMOVED = 0x1, MEDIA_URL_ADDED = 0x2, MEDIA_URL_UPDATED = 0x4 };
00158 
00159         enum { CLICK_ACTION_TOUCH = 0, CLICK_ACTION_SIT = 1, CLICK_ACTION_BUY = 2 };
00160 
00161         virtual U32             processUpdateMessage(LLMessageSystem *mesgsys,
00162                                                                                 void **user_data,
00163                                                                                 U32 block_num,
00164                                                                                 const EObjectUpdateType update_type,
00165                                                                                 LLDataPacker *dp);
00166 
00167 
00168         virtual BOOL    isActive() const; 
00169         BOOL                    onActiveList() const                            {return mOnActiveList;}
00170         void                    setOnActiveList(BOOL on_active)         { mOnActiveList = on_active; }
00171 
00172         virtual BOOL    isAttachment() const { return FALSE; }
00173         virtual BOOL    isHUDAttachment() const { return FALSE; }
00174         virtual void    updateRadius() {};
00175         virtual F32     getVObjRadius() const; 
00176         
00177         BOOL                    isJointChild() const { return mJointInfo ? TRUE : FALSE; } 
00178         EHavokJointType getJointType() const { return mJointInfo ? mJointInfo->mJointType : HJT_INVALID; }
00179         
00180         LLViewerObject* getSubParent();
00181         const LLViewerObject* getSubParent() const;
00182         
00183         
00184         virtual void setPixelAreaAndAngle(LLAgent &agent); 
00185 
00186         virtual U32 getNumVertices() const;
00187         virtual U32 getNumIndices() const;
00188         S32 getNumFaces() const { return mNumFaces; }
00189 
00190         
00191         virtual void updateTextures(LLAgent &agent);
00192         virtual void boostTexturePriority(BOOL boost_children = TRUE);  
00193         
00194         virtual LLDrawable* createDrawable(LLPipeline *pipeline);
00195         virtual BOOL            updateGeometry(LLDrawable *drawable);
00196         virtual void            updateFaceSize(S32 idx);
00197         virtual BOOL            updateLOD();
00198         virtual BOOL            setDrawableParent(LLDrawable* parentp);
00199         virtual BOOL            updateLighting(BOOL do_lighting) { return TRUE; };
00200         F32                                     getRotTime() { return mRotTime; }
00201         void                            resetRot();
00202         void                            applyAngularVelocity(F32 dt);
00203 
00204         void setLineWidthForWindowSize(S32 window_width);
00205 
00206         static void increaseArrowLength();                              
00207         static void decreaseArrowLength();                              
00208 
00209         
00210         LLViewerRegion* getRegion() const                               { return mRegionp; }
00211 
00212         BOOL isSelected() const                                                 { return mUserSelected; }
00213         virtual void setSelected(BOOL sel)                              { mUserSelected = sel; mRotTime = 0.f;}
00214 
00215         const LLUUID &getID() const                                             { return mID; }
00216         U32 getLocalID() const                                                  { return mLocalID; }
00217         U32 getCRC() const                                                              { return mTotalCRC; }
00218 
00219         virtual BOOL isFlexible() const                                 { return false; }
00220 
00221         
00222         
00223         BOOL isOverAgentOwnedLand() const;
00224 
00225         
00226         
00227         BOOL isOverGroupOwnedLand() const;
00228 
00229         
00230 
00231 
00232 
00233 
00234 
00235 
00236 
00237 
00238         virtual void setParent(LLViewerObject* parent);
00239         virtual void addChild(LLViewerObject *childp);
00240         virtual void removeChild(LLViewerObject *childp);
00241         child_list_t& getChildren();
00242         void addThisAndAllChildren(LLDynamicArray<LLViewerObject*>& objects);
00243         void addThisAndNonJointChildren(LLDynamicArray<LLViewerObject*>& objects);
00244         BOOL isChild(LLViewerObject *childp) const;
00245         BOOL isSeat() const;
00246         
00247 
00248         
00249         
00250         
00251         virtual BOOL lineSegmentIntersect(const LLVector3& start, LLVector3& end) const;
00252         
00253         const LLVector3d getPositionGlobal() const;
00254         const LLVector3 &getPositionRegion() const;
00255         const LLVector3 getPositionEdit() const;
00256         const LLVector3 &getPositionAgent() const;
00257         const LLVector3 getRenderPosition() const;
00258 
00259         virtual const LLVector3 getPivotPositionAgent() const; 
00260 
00261         LLViewerObject* getRootEdit() const;
00262 
00263         const LLQuaternion getRotationRegion() const;
00264         const LLQuaternion getRotationEdit() const;
00265         const LLQuaternion getRenderRotation() const;
00266         virtual const LLMatrix4 getRenderMatrix() const;
00267 
00268         void setPosition(const LLVector3 &pos, BOOL damped = FALSE);
00269         void setPositionGlobal(const LLVector3d &position, BOOL damped = FALSE);
00270         void setPositionRegion(const LLVector3 &position, BOOL damped = FALSE);
00271         void setPositionEdit(const LLVector3 &position, BOOL damped = FALSE);
00272         void setPositionAgent(const LLVector3 &pos_agent, BOOL damped = FALSE);
00273         void setPositionParent(const LLVector3 &pos_parent, BOOL damped = FALSE);
00274         void setPositionAbsoluteGlobal( const LLVector3d &pos_global, BOOL damped = FALSE );
00275         void sendPositionUpdate() const;
00276 
00277         virtual const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const             { return xform->getWorldMatrix(); }
00278 
00279         inline void setRotation(const F32 x, const F32 y, const F32 z, BOOL damped = FALSE);
00280         inline void setRotation(const LLQuaternion& quat, BOOL damped = FALSE);
00281         void sendRotationUpdate() const;
00282 
00283              void    setNumTEs(const U8 num_tes);
00284              void    setTE(const U8 te, const LLTextureEntry &texture_entry);
00285          S32         setTETexture(const U8 te, const LLUUID &uuid);
00286         S32 setTETextureCore(const U8 te, const LLUUID& uuid, LLHost host);
00287          S32         setTEColor(const U8 te, const LLColor4 &color);
00288          S32         setTEScale(const U8 te, const F32 s, const F32 t);
00289          S32         setTEScaleS(const U8 te, const F32 s);
00290          S32         setTEScaleT(const U8 te, const F32 t);
00291          S32         setTEOffset(const U8 te, const F32 s, const F32 t);
00292          S32         setTEOffsetS(const U8 te, const F32 s);
00293          S32         setTEOffsetT(const U8 te, const F32 t);
00294          S32         setTERotation(const U8 te, const F32 r);
00295              S32             setTEBumpmap(const U8 te, const U8 bump );
00296              S32             setTETexGen(const U8 te, const U8 texgen );
00297              S32             setTEShiny(const U8 te, const U8 shiny );
00298              S32             setTEFullbright(const U8 te, const U8 fullbright );
00299              S32             setTEMediaFlags(const U8 te, const U8 media_flags );
00300              BOOL    setMaterial(const U8 material);
00301         virtual         void    setTEImage(const U8 te, LLViewerImage *imagep); 
00302         LLViewerImage           *getTEImage(const U8 te) const;
00303         
00304         void fitFaceTexture(const U8 face);
00305         void sendTEUpdate() const;                      
00306         
00307         virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
00308         void sendScaleUpdate();
00309 
00310         void sendShapeUpdate();
00311 
00312         U8 getState()                                                   { return mState; }
00313 
00314         F32 getAppAngle() const                                 { return mAppAngle; }
00315         F32 getPixelArea() const                                { return mPixelArea; }
00316         void setPixelArea(F32 area)                             { mPixelArea = area; }
00317         F32 getMaxScale() const;
00318         F32 getMidScale() const;
00319         F32 getMinScale() const;
00320 
00321         
00322         void setAttachedSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain, const U8 flags);
00323         void adjustAudioGain(const F32 gain);
00324         void clearAttachedSound()                                                               { mAudioSourcep = NULL; }
00325 
00326          
00327         LLAudioSource *getAudioSource(const LLUUID& owner_id);
00328 
00329         U8 getMediaType() const;
00330         void setMediaType(U8 media_type);
00331 
00332         const LLString& getMediaURL() const;
00333         void setMediaURL(const LLString& media_url);
00334 
00335         BOOL getMediaPassedWhitelist() const;
00336         void setMediaPassedWhitelist(BOOL passed);
00337 
00338         void sendMaterialUpdate() const;
00339 
00340         void setCanSelect(BOOL canSelect);
00341 
00342         void setDebugText(const std::string &utf8text);
00343         void setIcon(LLViewerImage* icon_image);
00344         void clearIcon();
00345 
00346         void markForUpdate(BOOL priority);
00347         void updateVolume(const LLVolumeParams& volume_params);
00348         virtual void updateSpatialExtents(LLVector3& min, LLVector3& max);
00349         virtual F32 getBinRadius();
00350         
00351         LLBBox                          getBoundingBoxAgent() const;
00352 
00353         void updatePositionCaches() const; 
00354         void updateText(); 
00355         virtual void updateDrawable(BOOL force_damped); 
00356 
00357         void setDrawableState(U32 state, BOOL recursive = TRUE);
00358         void clearDrawableState(U32 state, BOOL recursive = TRUE);
00359 
00360         
00361         virtual void onShift(const LLVector3 &shift_vector)     { }
00362                 
00364         
00365         
00366         
00367 
00368         
00369         
00370         
00371         void registerInventoryListener(LLVOInventoryListener* listener, void* user_data);
00372         void removeInventoryListener(LLVOInventoryListener* listener);
00373         BOOL isInventoryPending() { return mInventoryPending; }
00374         void clearInventoryListeners();
00375         void requestInventory();
00376         static void processTaskInv(LLMessageSystem* msg, void** user_data);
00377         void removeInventory(const LLUUID& item_id);
00378 
00379         
00380         
00381         
00382         void updateInventory(LLViewerInventoryItem* item, U8 key, bool is_new);
00383         LLInventoryObject* getInventoryObject(const LLUUID& item_id);
00384         void getInventoryContents(InventoryObjectList& objects);
00385         LLInventoryObject* getInventoryRoot();
00386         LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id);
00387         S16 getInventorySerial() const { return mInventorySerialNum; }
00388 
00389         
00390         void updateViewerInventoryAsset(
00391                 const LLViewerInventoryItem* item,
00392                 const LLUUID& new_asset);
00393 
00394         
00395         void dirtyInventory();
00396         BOOL isInventoryDirty() { return mInventoryDirty; }
00397 
00398         
00399         
00400         
00401         void saveScript(const LLViewerInventoryItem* item, BOOL active, bool is_new);
00402 
00403         
00404         
00405         
00406         void moveInventory(const LLUUID& agent_folder, const LLUUID& item_id);
00407 
00408         
00409         S32 countInventoryContents( LLAssetType::EType type );
00410 
00411         BOOL                    permAnyOwner() const;   
00412         BOOL                    permYouOwner() const;
00413         BOOL                    permGroupOwner() const;
00414         BOOL                    permOwnerModify() const;
00415         BOOL                    permModify() const;     
00416         BOOL                    permCopy() const;       
00417         BOOL                    permMove() const;               
00418         BOOL                    permTransfer() const;
00419         inline BOOL             usePhysics() const                              { return ((mFlags & FLAGS_USE_PHYSICS) != 0); }
00420         inline BOOL             flagScripted() const                    { return ((mFlags & FLAGS_SCRIPTED) != 0); }
00421         inline BOOL             flagHandleTouch() const                 { return ((mFlags & FLAGS_HANDLE_TOUCH) != 0); }
00422         inline BOOL             flagTakesMoney() const                  { return ((mFlags & FLAGS_TAKES_MONEY) != 0); }
00423         inline BOOL             flagPhantom() const                             { return ((mFlags & FLAGS_PHANTOM) != 0); }
00424         inline BOOL             flagInventoryEmpty() const              { return ((mFlags & FLAGS_INVENTORY_EMPTY) != 0); }
00425         inline BOOL             flagCastShadows() const                 { return ((mFlags & FLAGS_CAST_SHADOWS) != 0); }
00426         inline BOOL             flagAllowInventoryAdd() const   { return ((mFlags & FLAGS_ALLOW_INVENTORY_DROP) != 0); }
00427         inline BOOL             flagTemporary() const                   { return ((mFlags & FLAGS_TEMPORARY) != 0); }
00428         inline BOOL             flagTemporaryOnRez() const              { return ((mFlags & FLAGS_TEMPORARY_ON_REZ) != 0); }
00429         inline BOOL             flagAnimSource() const                  { return ((mFlags & FLAGS_ANIM_SOURCE) != 0); }
00430         inline BOOL             flagCameraSource() const                { return ((mFlags & FLAGS_CAMERA_SOURCE) != 0); }
00431         inline BOOL             flagCameraDecoupled() const             { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); }
00432 
00433         bool getIncludeInSearch() const;
00434         void setIncludeInSearch(bool include_in_search);
00435 
00436         
00437         BOOL allowOpen() const;
00438 
00439         void setClickAction(U8 action) { mClickAction = action; }
00440         U8 getClickAction() const { return mClickAction; }
00441         bool specialHoverCursor() const;        
00442 
00443         void                    setRegion(LLViewerRegion *regionp);
00444         virtual void    updateRegion(LLViewerRegion *regionp) {}
00445 
00446         void updateFlags();
00447         BOOL setFlags(U32 flag, BOOL state);
00448         
00449         virtual void dump() const;
00450         static U32              getNumZombieObjects()                   { return sNumZombieObjects; }
00451 
00452         void printNameValuePairs() const;
00453 
00454         virtual S32 getLOD() const { return 3; } 
00455         virtual U32 getPartitionType() const;
00456 
00457         virtual LLNetworkData* getParameterEntry(U16 param_type) const;
00458         virtual bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin);
00459         virtual BOOL getParameterEntryInUse(U16 param_type) const;
00460         virtual bool setParameterEntryInUse(U16 param_type, BOOL in_use, bool local_origin);
00461         
00462         virtual void parameterChanged(U16 param_type, bool local_origin);
00463         virtual void parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin);
00464         
00465         friend class LLViewerObjectList;
00466         friend class LLViewerMediaList;
00467 
00468 private:
00469         ExtraParameter* createNewParameterEntry(U16 param_type);
00470         ExtraParameter* getExtraParameterEntry(U16 param_type) const;
00471         ExtraParameter* getExtraParameterEntryCreate(U16 param_type);
00472         bool unpackParameterEntry(U16 param_type, LLDataPacker *dp);
00473         
00474 public:
00475         
00476         
00477         
00478         typedef enum e_vo_types
00479         {
00480                 LL_VO_CLOUDS =                          LL_PCODE_APP | 0x20,
00481                 LL_VO_SURFACE_PATCH =           LL_PCODE_APP | 0x30,
00482                 LL_VO_STARS =                           LL_PCODE_APP | 0x40,
00483                 LL_VO_SQUARE_TORUS =            LL_PCODE_APP | 0x50,
00484                 LL_VO_SKY =                                     LL_PCODE_APP | 0x60,
00485                 LL_VO_WATER =                           LL_PCODE_APP | 0x70,
00486                 LL_VO_GROUND =                          LL_PCODE_APP | 0x80,
00487                 LL_VO_PART_GROUP =                      LL_PCODE_APP | 0x90,
00488                 LL_VO_TRIANGLE_TORUS =          LL_PCODE_APP | 0xa0,
00489         } EVOType;
00490 
00491         child_list_t    mChildList;
00492         LLUUID                  mID;
00493 
00494         
00495         
00496         U32                             mLocalID;
00497 
00498         
00499         U32                             mTotalCRC;
00500 
00501         LLPointer<LLViewerImage> *mTEImages;
00502 
00503         
00504         U32                             mGLName;                        
00505         BOOL                    mbCanSelect;            
00506 
00507         
00508         U32                             mFlags;
00509 
00510         
00511         LLPointer<LLDrawable> mDrawable;
00512 
00513         
00514         BOOL mCreateSelected;
00515 
00516         
00517         BOOL mRenderMedia;
00518 
00519         
00520         S32                             mBestUpdatePrecision;
00521 
00522         
00523         LLPointer<LLHUDText> mText;
00524         LLPointer<LLHUDIcon> mIcon;
00525 
00526         static                  BOOL            sUseSharedDrawables;
00527 
00528 protected:
00529         
00530         
00531         
00532         void deleteInventoryItem(const LLUUID& item_id);
00533 
00534         
00535         
00536         void doUpdateInventory(LLViewerInventoryItem* item, U8 key, bool is_new);
00537 
00538 
00539         static LLViewerObject *createObject(const LLUUID &id, LLPCode pcode, LLViewerRegion *regionp);
00540 
00541         BOOL setData(const U8 *datap, const U32 data_size);
00542 
00543         
00544         void    hideExtraDisplayItems( BOOL hidden );
00545 
00547         
00548         
00549         
00550 
00551         static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status);
00552         void loadTaskInvFile(const char* filename);
00553         void doInventoryCallback();
00554         
00555         BOOL isOnMap();
00556 
00557         void unpackParticleSource(const S32 block_num, const LLUUID& owner_id);
00558         void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id);
00559         void deleteParticleSource();
00560 
00561 private:
00562         void setNameValueList(const std::string& list);         
00563         void deleteTEImages(); 
00564         
00565 protected:
00566         typedef std::map<char *, LLNameValue *> name_value_map_t;
00567         name_value_map_t mNameValuePairs;       
00568 
00569         F64                             mLastInterpUpdateSecs;                  
00570         F64                             mLastMessageUpdateSecs;                 
00571         TPACKETID               mLatestRecvPacketID;                    
00572         
00573         U8* mData;
00574 public:
00575         LLPointer<LLViewerPartSourceScript>             mPartSourcep;   
00576 protected:
00577         LLAudioSourceVO* mAudioSourcep;
00578         F32                             mAudioGain;
00579         
00580         F32                             mAppAngle;      
00581         F32                             mPixelArea; 
00582 
00583         
00584         InventoryObjectList* mInventory;
00585         class LLInventoryCallbackInfo
00586         {
00587         public:
00588                 ~LLInventoryCallbackInfo();
00589                 LLVOInventoryListener* mListener;
00590                 void* mInventoryData;
00591         };
00592         LLLinkedList<LLInventoryCallbackInfo> mInventoryCallbacks;
00593         S16 mInventorySerialNum;
00594 
00595         LLViewerRegion  *mRegionp;                                      
00596         BOOL                    mInventoryPending;
00597         BOOL                    mInventoryDirty;
00598         BOOL                    mDead;
00599         BOOL                    mOrphaned;                                      
00600         BOOL                    mUserSelected;                          
00601         BOOL                    mOnActiveList;
00602         BOOL                    mOnMap;                                         
00603         BOOL                    mStatic;                                        
00604         S32                             mNumFaces;
00605 
00606         S32                             mLastUpdateFrame;                       
00607                                                                                                 
00608 
00609         F32                             mTimeDilation;                          
00610         F32                             mRotTime;                                       
00611         LLQuaternion    mLastRot;                                       
00612 
00613         LLVOJointInfo*  mJointInfo;
00614         U8                              mState; 
00615         LLViewerObjectMedia* mMedia;    
00616         U8 mClickAction;
00617 
00618         static                  U32                     sNumZombieObjects;                      
00619 
00620         static                  BOOL            sMapDebug;                                      
00621         static                  LLColor4        sEditSelectColor;
00622         static                  LLColor4        sNoEditSelectColor;
00623         static                  F32                     sCurrentPulse;
00624         static                  BOOL            sPulseEnabled;
00625 
00626         static                  S32                     sAxisArrowLength;
00627 
00628         
00629         mutable LLVector3               mPositionRegion;
00630         mutable LLVector3               mPositionAgent;
00631 
00632 private:        
00633         static S32 sNumObjects;
00634 };
00635 
00637 
00638 
00639 
00640 
00641 
00642 inline void LLViewerObject::setRotation(const LLQuaternion& quat, BOOL damped)
00643 {
00644         LLPrimitive::setRotation(quat);
00645         setChanged(ROTATED | SILHOUETTE);
00646         updateDrawable(damped);
00647 }
00648 
00649 inline void LLViewerObject::setRotation(const F32 x, const F32 y, const F32 z, BOOL damped)
00650 {
00651         LLPrimitive::setRotation(x, y, z);
00652         setChanged(ROTATED | SILHOUETTE);
00653         updateDrawable(damped);
00654 }
00655 
00656 class LLViewerObjectMedia
00657 {
00658 public:
00659         LLViewerObjectMedia() : mMediaURL(), mPassedWhitelist(FALSE), mMediaType(0) { }
00660 
00661         LLString mMediaURL;     
00662         BOOL mPassedWhitelist;  
00663         U8 mMediaType;                  
00664 };
00665 
00666 
00667 class LLAlphaObject : public LLViewerObject
00668 {
00669 public:
00670         LLAlphaObject(const LLUUID &id, const LLPCode type, LLViewerRegion *regionp)
00671         : LLViewerObject(id,type,regionp) 
00672         { mDepth = 0.f; }
00673 
00674         virtual BOOL isParticle();
00675         virtual F32 getPartSize(S32 idx);
00676         virtual void getGeometry(S32 idx,
00677                                                                 LLStrider<LLVector3>& verticesp,
00678                                                                 LLStrider<LLVector3>& normalsp, 
00679                                                                 LLStrider<LLVector2>& texcoordsp,
00680                                                                 LLStrider<LLColor4U>& colorsp, 
00681                                                                 LLStrider<U32>& indicesp) = 0;
00682 
00683         F32 mDepth;
00684 };
00685 
00686 class LLStaticViewerObject : public LLViewerObject
00687 {
00688 public:
00689         LLStaticViewerObject(const LLUUID& id, const LLPCode type, LLViewerRegion* regionp)
00690                 : LLViewerObject(id,type,regionp)
00691         { }
00692 
00693         virtual void updateDrawable(BOOL force_damped);
00694 };
00695 
00696 #endif