aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvotree.h
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llvotree.h
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/newview/llvotree.h')
-rw-r--r--linden/indra/newview/llvotree.h40
1 files changed, 37 insertions, 3 deletions
diff --git a/linden/indra/newview/llvotree.h b/linden/indra/newview/llvotree.h
index f34371e..473f1c3 100644
--- a/linden/indra/newview/llvotree.h
+++ b/linden/indra/newview/llvotree.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -50,7 +51,7 @@ public:
50 { 51 {
51 VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) | 52 VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) |
52 (1 << LLVertexBuffer::TYPE_NORMAL) | 53 (1 << LLVertexBuffer::TYPE_NORMAL) |
53 (1 << LLVertexBuffer::TYPE_TEXCOORD) 54 (1 << LLVertexBuffer::TYPE_TEXCOORD0)
54 }; 55 };
55 56
56 LLVOTree(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); 57 LLVOTree(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
@@ -78,6 +79,38 @@ public:
78 79
79 void updateRadius(); 80 void updateRadius();
80 81
82 void calcNumVerts(U32& vert_count, U32& index_count, S32 trunk_LOD, S32 stop_level, U16 depth, U16 trunk_depth, F32 branches);
83
84 void updateMesh();
85
86 void appendMesh(LLStrider<LLVector3>& vertices,
87 LLStrider<LLVector3>& normals,
88 LLStrider<LLVector2>& tex_coords,
89 LLStrider<U16>& indices,
90 U16& idx_offset,
91 LLMatrix4& matrix,
92 LLMatrix4& norm_mat,
93 S32 vertex_offset,
94 S32 vertex_count,
95 S32 index_count,
96 S32 index_offset);
97
98 void genBranchPipeline(LLStrider<LLVector3>& vertices,
99 LLStrider<LLVector3>& normals,
100 LLStrider<LLVector2>& tex_coords,
101 LLStrider<U16>& indices,
102 U16& index_offset,
103 LLMatrix4& matrix,
104 S32 trunk_LOD,
105 S32 stop_level,
106 U16 depth,
107 U16 trunk_depth,
108 F32 scale,
109 F32 twist,
110 F32 droop,
111 F32 branches,
112 F32 alpha);
113
81 U32 drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD, S32 stop_level, U16 depth, U16 trunk_depth, F32 scale, F32 twist, F32 droop, F32 branches, F32 alpha); 114 U32 drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD, S32 stop_level, U16 depth, U16 trunk_depth, F32 scale, F32 twist, F32 droop, F32 branches, F32 alpha);
82 115
83 116
@@ -126,6 +159,7 @@ protected:
126 LLVector3 mTrunkVel; // 159 LLVector3 mTrunkVel; //
127 LLVector3 mWind; 160 LLVector3 mWind;
128 161
162 LLPointer<LLVertexBuffer> mReferenceBuffer; //reference geometry for generating tree mesh
129 LLPointer<LLViewerImage> mTreeImagep; // Pointer to proper tree image 163 LLPointer<LLViewerImage> mTreeImagep; // Pointer to proper tree image
130 164
131 U8 mSpecies; // Species of tree 165 U8 mSpecies; // Species of tree
@@ -137,7 +171,7 @@ protected:
137 U8 mDepth; // Number of recursions to tips of branches 171 U8 mDepth; // Number of recursions to tips of branches
138 F32 mScaleStep; // Multiplier for scale at each recursion level 172 F32 mScaleStep; // Multiplier for scale at each recursion level
139 U8 mTrunkDepth; 173 U8 mTrunkDepth;
140 174 U32 mTrunkLOD;
141 F32 mLeafScale; // Scales leaf texture when rendering 175 F32 mLeafScale; // Scales leaf texture when rendering
142 176
143 F32 mBillboardScale; // How big to draw the billboard? 177 F32 mBillboardScale; // How big to draw the billboard?