diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvoavatar.h | 52 |
1 files changed, 44 insertions, 8 deletions
diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index f942273..ff37848 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h | |||
@@ -76,6 +76,13 @@ class LLDriverParamInfo; | |||
76 | class LLHUDText; | 76 | class LLHUDText; |
77 | class LLHUDEffectSpiral; | 77 | class LLHUDEffectSpiral; |
78 | 78 | ||
79 | class LLVertexBufferAvatar : public LLVertexBuffer | ||
80 | { | ||
81 | public: | ||
82 | LLVertexBufferAvatar(); | ||
83 | virtual void setupVertexBuffer(U32 data_mask) const; | ||
84 | }; | ||
85 | |||
79 | typedef enum e_mesh_id | 86 | typedef enum e_mesh_id |
80 | { | 87 | { |
81 | MESH_ID_HAIR, | 88 | MESH_ID_HAIR, |
@@ -232,6 +239,25 @@ protected: | |||
232 | virtual ~LLVOAvatar(); | 239 | virtual ~LLVOAvatar(); |
233 | 240 | ||
234 | public: | 241 | public: |
242 | |||
243 | struct CompareScreenAreaGreater | ||
244 | { | ||
245 | bool operator()(const LLCharacter* const& lhs, const LLCharacter* const& rhs) | ||
246 | { | ||
247 | return lhs->getPixelArea() > rhs->getPixelArea(); | ||
248 | } | ||
249 | }; | ||
250 | |||
251 | enum | ||
252 | { | ||
253 | VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) | | ||
254 | (1 << LLVertexBuffer::TYPE_NORMAL) | | ||
255 | (1 << LLVertexBuffer::TYPE_TEXCOORD) | | ||
256 | (1 << LLVertexBuffer::TYPE_WEIGHT) | | ||
257 | (1 << LLVertexBuffer::TYPE_CLOTHWEIGHT) | ||
258 | } | ||
259 | eVertexDataMask; | ||
260 | |||
235 | LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); | 261 | LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); |
236 | /*virtual*/ void markDead(); | 262 | /*virtual*/ void markDead(); |
237 | 263 | ||
@@ -247,20 +273,24 @@ public: | |||
247 | const EObjectUpdateType update_type, | 273 | const EObjectUpdateType update_type, |
248 | LLDataPacker *dp); | 274 | LLDataPacker *dp); |
249 | virtual BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); | 275 | virtual BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); |
276 | virtual BOOL updateLOD(); | ||
250 | void setFootPlane(const LLVector4 &plane) { mFootPlane = plane; } | 277 | void setFootPlane(const LLVector4 &plane) { mFootPlane = plane; } |
251 | /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. | 278 | /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. |
252 | 279 | ||
253 | // Graphical stuff for objects - maybe broken out into render class later? | 280 | // Graphical stuff for objects - maybe broken out into render class later? |
254 | 281 | ||
255 | U32 renderSkinned(EAvatarRenderPass pass); | 282 | U32 renderFootShadows(); |
256 | U32 renderRigid(); | 283 | U32 renderRigid(); |
257 | 284 | U32 renderSkinned(EAvatarRenderPass pass); | |
285 | U32 renderTransparent(); | ||
258 | void renderCollisionVolumes(); | 286 | void renderCollisionVolumes(); |
259 | 287 | ||
260 | /*virtual*/ void updateTextures(LLAgent &agent); | 288 | /*virtual*/ void updateTextures(LLAgent &agent); |
261 | // If setting a baked texture, need to request it from a non-local sim. | 289 | // If setting a baked texture, need to request it from a non-local sim. |
262 | /*virtual*/ S32 setTETexture(const U8 te, const LLUUID& uuid); | 290 | /*virtual*/ S32 setTETexture(const U8 te, const LLUUID& uuid); |
263 | 291 | ||
292 | virtual U32 getPartitionType() const; | ||
293 | |||
264 | void updateVisibility(BOOL force_invisible); | 294 | void updateVisibility(BOOL force_invisible); |
265 | void updateAttachmentVisibility(U32 camera_mode); | 295 | void updateAttachmentVisibility(U32 camera_mode); |
266 | void clampAttachmentPositions(); | 296 | void clampAttachmentPositions(); |
@@ -278,11 +308,14 @@ public: | |||
278 | void updateShadowFaces(); | 308 | void updateShadowFaces(); |
279 | 309 | ||
280 | /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); | 310 | /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); |
281 | void updateJointLODs(); | 311 | BOOL updateJointLODs(); |
282 | 312 | ||
283 | void writeCAL3D(std::string& path, std::string& file_base); | 313 | void writeCAL3D(std::string& path, std::string& file_base); |
284 | 314 | ||
285 | virtual void updateRegion(LLViewerRegion *regionp); | 315 | virtual void updateRegion(LLViewerRegion *regionp); |
316 | |||
317 | |||
318 | void updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax); | ||
286 | 319 | ||
287 | //-------------------------------------------------------------------- | 320 | //-------------------------------------------------------------------- |
288 | // texture entry assignment | 321 | // texture entry assignment |
@@ -342,7 +375,7 @@ public: | |||
342 | virtual BOOL allocateCharacterJoints( U32 num ); | 375 | virtual BOOL allocateCharacterJoints( U32 num ); |
343 | virtual LLJoint *getCharacterJoint( U32 num ); | 376 | virtual LLJoint *getCharacterJoint( U32 num ); |
344 | virtual void requestStopMotion( LLMotion* motion ); | 377 | virtual void requestStopMotion( LLMotion* motion ); |
345 | virtual F32 getPixelArea(); | 378 | virtual F32 getPixelArea() const; |
346 | virtual LLPolyMesh* getHeadMesh(); | 379 | virtual LLPolyMesh* getHeadMesh(); |
347 | virtual LLPolyMesh* getUpperBodyMesh(); | 380 | virtual LLPolyMesh* getUpperBodyMesh(); |
348 | virtual LLVector3d getPosGlobalFromAgent(const LLVector3 &position); | 381 | virtual LLVector3d getPosGlobalFromAgent(const LLVector3 &position); |
@@ -362,7 +395,7 @@ public: | |||
362 | // Other public functions | 395 | // Other public functions |
363 | //-------------------------------------------------------------------- | 396 | //-------------------------------------------------------------------- |
364 | BOOL allocateCollisionVolumes( U32 num ); | 397 | BOOL allocateCollisionVolumes( U32 num ); |
365 | 398 | void resetHUDAttachments(); | |
366 | static void getAnimLabels( LLDynamicArray<const char*>* labels ); | 399 | static void getAnimLabels( LLDynamicArray<const char*>* labels ); |
367 | static void getAnimNames( LLDynamicArray<const char*>* names ); | 400 | static void getAnimNames( LLDynamicArray<const char*>* names ); |
368 | 401 | ||
@@ -439,6 +472,7 @@ public: | |||
439 | virtual void addChild(LLViewerObject *childp); | 472 | virtual void addChild(LLViewerObject *childp); |
440 | virtual void removeChild(LLViewerObject *childp); | 473 | virtual void removeChild(LLViewerObject *childp); |
441 | 474 | ||
475 | LLViewerJointAttachment* getTargetAttachmentPoint(LLViewerObject* viewer_object); | ||
442 | BOOL attachObject(LLViewerObject *viewer_object); | 476 | BOOL attachObject(LLViewerObject *viewer_object); |
443 | BOOL detachObject(LLViewerObject *viewer_object); | 477 | BOOL detachObject(LLViewerObject *viewer_object); |
444 | void lazyAttach(); | 478 | void lazyAttach(); |
@@ -543,7 +577,7 @@ public: | |||
543 | //-------------------------------------------------------------------- | 577 | //-------------------------------------------------------------------- |
544 | // avatar definition name | 578 | // avatar definition name |
545 | //-------------------------------------------------------------------- | 579 | //-------------------------------------------------------------------- |
546 | char mAvatarDefinition[64]; | 580 | char mAvatarDefinition[64]; /* Flawfinder: ignore */ |
547 | 581 | ||
548 | //-------------------------------------------------------------------- | 582 | //-------------------------------------------------------------------- |
549 | // skeleton for skinned avatar | 583 | // skeleton for skinned avatar |
@@ -836,7 +870,6 @@ protected: | |||
836 | 870 | ||
837 | F32 mRenderPriority; | 871 | F32 mRenderPriority; |
838 | F32 mAdjustedPixelArea; | 872 | F32 mAdjustedPixelArea; |
839 | S32 mNumAGPVertices; | ||
840 | 873 | ||
841 | LLWString mNameString; | 874 | LLWString mNameString; |
842 | LLString mTitle; | 875 | LLString mTitle; |
@@ -877,6 +910,8 @@ protected: | |||
877 | U32 mLowerMaskTexName; | 910 | U32 mLowerMaskTexName; |
878 | 911 | ||
879 | BOOL mCulled; | 912 | BOOL mCulled; |
913 | F32 mMinPixelArea; // debug | ||
914 | F32 mMaxPixelArea; // debug | ||
880 | 915 | ||
881 | //-------------------------------------------------------------------- | 916 | //-------------------------------------------------------------------- |
882 | // Global Colors | 917 | // Global Colors |
@@ -903,6 +938,7 @@ protected: | |||
903 | 938 | ||
904 | void requestLayerSetUpdate(LLVOAvatar::ELocTexIndex i); | 939 | void requestLayerSetUpdate(LLVOAvatar::ELocTexIndex i); |
905 | void addLocalTextureStats(LLVOAvatar::ELocTexIndex i, LLViewerImage* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked); | 940 | void addLocalTextureStats(LLVOAvatar::ELocTexIndex i, LLViewerImage* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked); |
941 | void addBakedTextureStats( LLViewerImage* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level); | ||
906 | static void onInitialBakedTextureLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ); | 942 | static void onInitialBakedTextureLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ); |
907 | static void onBakedTextureLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); | 943 | static void onBakedTextureLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); |
908 | void useBakedTexture(const LLUUID& id); | 944 | void useBakedTexture(const LLUUID& id); |