diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llvosurfacepatch.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvosurfacepatch.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/linden/indra/newview/llvosurfacepatch.h b/linden/indra/newview/llvosurfacepatch.h new file mode 100644 index 0000000..3549571 --- /dev/null +++ b/linden/indra/newview/llvosurfacepatch.h | |||
@@ -0,0 +1,112 @@ | |||
1 | /** | ||
2 | * @file llvosurfacepatch.h | ||
3 | * @brief Description of LLVOSurfacePatch class | ||
4 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_VOSURFACEPATCH_H | ||
29 | #define LL_VOSURFACEPATCH_H | ||
30 | |||
31 | #include "llviewerobject.h" | ||
32 | #include "llstrider.h" | ||
33 | |||
34 | class LLSurfacePatch; | ||
35 | class LLDrawPool; | ||
36 | class LLVector2; | ||
37 | |||
38 | class LLVOSurfacePatch : public LLViewerObject | ||
39 | { | ||
40 | public: | ||
41 | LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); | ||
42 | virtual ~LLVOSurfacePatch(); | ||
43 | |||
44 | /*virtual*/ void markDead(); | ||
45 | |||
46 | // Initialize data that's only inited once per class. | ||
47 | static void initClass(); | ||
48 | |||
49 | /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); | ||
50 | /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); | ||
51 | |||
52 | /*virtual*/ void updateTextures(LLAgent &agent); | ||
53 | /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area | ||
54 | |||
55 | /*virtual*/ void updateSpatialExtents(LLVector3& newMin, LLVector3& newMax); | ||
56 | /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. | ||
57 | |||
58 | void setPatch(LLSurfacePatch *patchp); | ||
59 | LLSurfacePatch *getPatch() const { return mPatchp; } | ||
60 | |||
61 | void dirtyPatch(); | ||
62 | void dirtyGeom(); | ||
63 | |||
64 | BOOL mDirtiedPatch; | ||
65 | protected: | ||
66 | LLDrawPool *mPool; | ||
67 | LLDrawPool *getPool(); | ||
68 | S32 mBaseComp; | ||
69 | LLSurfacePatch *mPatchp; | ||
70 | BOOL mDirtyTexture; | ||
71 | BOOL mDirtyTerrain; | ||
72 | |||
73 | S32 mLastNorthStride; | ||
74 | S32 mLastEastStride; | ||
75 | S32 mLastStride; | ||
76 | S32 mLastLength; | ||
77 | |||
78 | void calcColor(const LLVector3* vertex, const LLVector3* normal, LLColor4U* colorp); | ||
79 | BOOL updateShadows(BOOL use_shadow_factor = FALSE); | ||
80 | void getGeomSizesMain(const S32 stride, S32 &num_vertices, S32 &num_indices); | ||
81 | void getGeomSizesNorth(const S32 stride, const S32 north_stride, | ||
82 | S32 &num_vertices, S32 &num_indices); | ||
83 | void getGeomSizesEast(const S32 stride, const S32 east_stride, | ||
84 | S32 &num_vertices, S32 &num_indices); | ||
85 | |||
86 | void updateMainGeometry(LLFace *facep, | ||
87 | LLStrider<LLVector3> &verticesp, | ||
88 | LLStrider<LLVector3> &normalsp, | ||
89 | LLStrider<LLColor4U> &colorsp, | ||
90 | LLStrider<LLVector2> &texCoords0p, | ||
91 | LLStrider<LLVector2> &texCoords1p, | ||
92 | U32* &indicesp, | ||
93 | S32 &index_offset); | ||
94 | void updateNorthGeometry(LLFace *facep, | ||
95 | LLStrider<LLVector3> &verticesp, | ||
96 | LLStrider<LLVector3> &normalsp, | ||
97 | LLStrider<LLColor4U> &colorsp, | ||
98 | LLStrider<LLVector2> &texCoords0p, | ||
99 | LLStrider<LLVector2> &texCoords1p, | ||
100 | U32* &indicesp, | ||
101 | S32 &index_offset); | ||
102 | void updateEastGeometry(LLFace *facep, | ||
103 | LLStrider<LLVector3> &verticesp, | ||
104 | LLStrider<LLVector3> &normalsp, | ||
105 | LLStrider<LLColor4U> &colorsp, | ||
106 | LLStrider<LLVector2> &texCoords0p, | ||
107 | LLStrider<LLVector2> &texCoords1p, | ||
108 | U32* &indicesp, | ||
109 | S32 &index_offset); | ||
110 | }; | ||
111 | |||
112 | #endif // LL_VOSURFACEPATCH_H | ||