00001
00032 #ifndef LL_LLVOPARTGROUP_H
00033 #define LL_LLVOPARTGROUP_H
00034
00035 #include "llviewerobject.h"
00036 #include "v3math.h"
00037 #include "v3color.h"
00038 #include "llframetimer.h"
00039
00040 class LLViewerPartGroup;
00041
00042 class LLVOPartGroup : public LLAlphaObject
00043 {
00044 public:
00045 enum
00046 {
00047 VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) |
00048 (1 << LLVertexBuffer::TYPE_NORMAL) |
00049 (1 << LLVertexBuffer::TYPE_TEXCOORD) |
00050 (1 << LLVertexBuffer::TYPE_COLOR)
00051 };
00052
00053 LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
00054
00055 BOOL isActive() const;
00056 BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
00057
00058 virtual F32 getBinRadius();
00059 virtual void updateSpatialExtents(LLVector3& newMin, LLVector3& newMax);
00060 virtual U32 getPartitionType() const;
00061
00062 void setPixelAreaAndAngle(LLAgent &agent);
00063 void updateTextures(LLAgent &agent);
00064
00065 LLDrawable* createDrawable(LLPipeline *pipeline);
00066 BOOL updateGeometry(LLDrawable *drawable);
00067 void getGeometry(S32 idx,
00068 LLStrider<LLVector3>& verticesp,
00069 LLStrider<LLVector3>& normalsp,
00070 LLStrider<LLVector2>& texcoordsp,
00071 LLStrider<LLColor4U>& colorsp,
00072 LLStrider<U16>& indicesp);
00073
00074 void updateFaceSize(S32 idx) { }
00075 F32 getPartSize(S32 idx);
00076 void setViewerPartGroup(LLViewerPartGroup *part_groupp) { mViewerPartGroupp = part_groupp; }
00077 LLViewerPartGroup* getViewerPartGroup() { return mViewerPartGroupp; }
00078
00079 protected:
00080 ~LLVOPartGroup();
00081
00082 LLViewerPartGroup *mViewerPartGroupp;
00083 };
00084
00085 #endif // LL_LLVOPARTGROUP_H