- Timestamp:
- 06/29/08 02:31:58 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Visualization.cpp
r2796 r2806 64 64 65 65 /******************************************************/ 66 /* Vizualization implementation */66 /* Vizualization implementation */ 67 67 /******************************************************/ 68 68 … … 78 78 mFrameId(0) 79 79 { 80 mSphere = (GLUquadric *)gluNewQuadric();81 80 } 82 81 … … 84 83 Visualization::~Visualization() 85 84 { 86 //DEL_PTR(mSphere);87 85 } 88 86 … … 110 108 stack<BvhNode *> tStack; 111 109 tStack.push(mBvh->GetRoot()); 112 113 glDisable(GL_LIGHTING);114 115 RenderViewPoint();116 RenderFrustum();117 RenderBoxForViz(mBvh->GetBox());118 119 glEnable(GL_LIGHTING);120 110 121 111 glEnableClientState(GL_VERTEX_ARRAY); … … 147 137 } 148 138 } 149 //leaves.push_back(static_cast<BvhLeaf *>(node));150 139 } 151 140 } 152 141 153 mRenderState->Reset();154 155 142 glDisableClientState(GL_VERTEX_ARRAY); 156 143 glDisableClientState(GL_NORMAL_ARRAY); 157 } 158 159 160 void Visualization::RenderViewPoint() 161 { 162 glPushMatrix(); 163 Vector3 pos = mCamera->GetPosition(); 164 pos.z += 100; 165 glTranslatef(pos.x, pos.y, pos.z); 144 145 146 mRenderState->Reset(); 147 148 glPushAttrib(GL_CURRENT_BIT); 149 glDisable(GL_LIGHTING); 150 glDisable(GL_DEPTH_TEST); 151 152 RenderFrustum(); 153 //RenderBoxForViz(mBvh->GetBox()); 166 154 167 glScalef(5.0f, 5.0f, 5.0f);168 glPushAttrib(GL_CURRENT_BIT);169 170 glColor3f(1.0f, 0.0f, 0.0f);171 172 gluSphere((::GLUquadric *)mSphere,173 2e-3f * Magnitude(mBvh->GetBox().Size()), 6, 6);174 175 155 glPopAttrib(); 176 glPopMatrix();177 156 } 178 157
Note: See TracChangeset
for help on using the changeset viewer.