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/llcylinder.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/llcylinder.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/linden/indra/newview/llcylinder.h b/linden/indra/newview/llcylinder.h new file mode 100644 index 0000000..b9e0a0e --- /dev/null +++ b/linden/indra/newview/llcylinder.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /** | ||
2 | * @file llcylinder.h | ||
3 | * @brief Draws a cylinder, and a cone, which is a special case cylinder | ||
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_LLCYLINDER_H | ||
29 | #define LL_LLCYLINDER_H | ||
30 | |||
31 | //#include "stdtypes.h" | ||
32 | //#include "llgl.h" | ||
33 | |||
34 | // | ||
35 | // Cylinders | ||
36 | // | ||
37 | const S32 CYLINDER_LEVELS_OF_DETAIL = 4; | ||
38 | const S32 CYLINDER_FACES = 3; | ||
39 | |||
40 | class LLCylinder | ||
41 | { | ||
42 | protected: | ||
43 | U32 mDisplayListSide[CYLINDER_LEVELS_OF_DETAIL]; | ||
44 | U32 mDisplayListTop[CYLINDER_LEVELS_OF_DETAIL]; | ||
45 | U32 mDisplayListBottom[CYLINDER_LEVELS_OF_DETAIL]; | ||
46 | U32 mTriangleCount[CYLINDER_LEVELS_OF_DETAIL]; | ||
47 | |||
48 | public: | ||
49 | void prerender(); | ||
50 | void cleanupGL(); | ||
51 | |||
52 | void render(F32 pixel_area); | ||
53 | void renderface(F32 pixel_area, S32 face); | ||
54 | |||
55 | U32 getTriangleCount(S32 level_of_detail) { return mTriangleCount[level_of_detail]; } | ||
56 | }; | ||
57 | |||
58 | |||
59 | // | ||
60 | // Cones | ||
61 | // | ||
62 | |||
63 | const S32 CONE_LOD_HIGHEST = 0; | ||
64 | const S32 CONE_LEVELS_OF_DETAIL = 4; | ||
65 | const S32 CONE_FACES = 2; | ||
66 | |||
67 | class LLCone | ||
68 | { | ||
69 | protected: | ||
70 | U32 mDisplayListSide[CONE_LEVELS_OF_DETAIL]; | ||
71 | U32 mDisplayListBottom[CONE_LEVELS_OF_DETAIL]; | ||
72 | U32 mTriangleCount[CONE_LEVELS_OF_DETAIL]; | ||
73 | |||
74 | public: | ||
75 | void prerender(); | ||
76 | void cleanupGL(); | ||
77 | |||
78 | void render(S32 level_of_detail); | ||
79 | void renderface(S32 level_of_detail, S32 face); | ||
80 | |||
81 | U32 getTriangleCount(S32 level_of_detail) { return mTriangleCount[level_of_detail]; } | ||
82 | }; | ||
83 | |||
84 | extern LLCylinder gCylinder; | ||
85 | extern LLCone gCone; | ||
86 | #endif | ||