PageRenderTime 121ms CodeModel.GetById 81ms app.highlight 7ms RepoModel.GetById 28ms app.codeStats 1ms

/indra/newview/llvopartgroup.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 97 lines | 55 code | 17 blank | 25 comment | 0 complexity | 762326b6360056e6d8ba2f64ea76bb87 MD5 | raw file
 1/** 
 2 * @file llvopartgroup.h
 3 * @brief Group of particle systems
 4 *
 5 * $LicenseInfo:firstyear=2001&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LL_LLVOPARTGROUP_H
28#define LL_LLVOPARTGROUP_H
29
30#include "llviewerobject.h"
31#include "v3math.h"
32#include "v3color.h"
33#include "llframetimer.h"
34
35class LLViewerPartGroup;
36
37class LLVOPartGroup : public LLAlphaObject
38{
39public:
40	enum
41	{
42		VERTEX_DATA_MASK =	(1 << LLVertexBuffer::TYPE_VERTEX) |
43							(1 << LLVertexBuffer::TYPE_NORMAL) |
44							(1 << LLVertexBuffer::TYPE_TEXCOORD0) |
45							(1 << LLVertexBuffer::TYPE_COLOR)
46	};
47
48	LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
49
50	/*virtual*/ BOOL    isActive() const; // Whether this object needs to do an idleUpdate.
51	BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
52
53	virtual F32 getBinRadius();
54	virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
55	virtual U32 getPartitionType() const;
56	
57	/*virtual*/ void setPixelAreaAndAngle(LLAgent &agent);
58	/*virtual*/ void updateTextures();
59
60	/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
61	/*virtual*/ BOOL        updateGeometry(LLDrawable *drawable);
62				void		getGeometry(S32 idx,
63								LLStrider<LLVector4a>& verticesp,
64								LLStrider<LLVector3>& normalsp, 
65								LLStrider<LLVector2>& texcoordsp,
66								LLStrider<LLColor4U>& colorsp, 
67								LLStrider<U16>& indicesp);
68
69	void updateFaceSize(S32 idx) { }
70	F32 getPartSize(S32 idx);
71	void setViewerPartGroup(LLViewerPartGroup *part_groupp)		{ mViewerPartGroupp = part_groupp; }
72	LLViewerPartGroup* getViewerPartGroup()	{ return mViewerPartGroupp; }
73
74protected:
75	~LLVOPartGroup();
76
77	LLViewerPartGroup *mViewerPartGroupp;
78
79	virtual LLVector3 getCameraPosition() const;
80
81};
82
83
84class LLVOHUDPartGroup : public LLVOPartGroup
85{
86public:
87	LLVOHUDPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) : 
88	  LLVOPartGroup(id, pcode, regionp)   
89	{
90	}
91protected:
92	LLDrawable* createDrawable(LLPipeline *pipeline);
93	U32 getPartitionType() const;
94	virtual LLVector3 getCameraPosition() const;
95};
96
97#endif // LL_LLVOPARTGROUP_H