aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerjoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerjoint.cpp71
1 files changed, 63 insertions, 8 deletions
diff --git a/linden/indra/newview/llviewerjoint.cpp b/linden/indra/newview/llviewerjoint.cpp
index 914448e..d0359d6 100644
--- a/linden/indra/newview/llviewerjoint.cpp
+++ b/linden/indra/newview/llviewerjoint.cpp
@@ -149,7 +149,7 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive )
149// //---------------------------------------------------------------- 149// //----------------------------------------------------------------
150// if (mComponents & SC_AXES) 150// if (mComponents & SC_AXES)
151// { 151// {
152// gGL.begin(LLVertexBuffer::LINES); 152// gGL.begin(LLRender::LINES);
153// gGL.color3f( 1.0f, 0.0f, 0.0f ); 153// gGL.color3f( 1.0f, 0.0f, 0.0f );
154// gGL.vertex3f( 0.0f, 0.0f, 0.0f ); 154// gGL.vertex3f( 0.0f, 0.0f, 0.0f );
155// gGL.vertex3f( 0.1f, 0.0f, 0.0f ); 155// gGL.vertex3f( 0.1f, 0.0f, 0.0f );
@@ -171,7 +171,7 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive )
171// { 171// {
172// gGL.color3f( 1.0f, 1.0f, 0.0f ); 172// gGL.color3f( 1.0f, 1.0f, 0.0f );
173 173
174// gGL.begin(LLVertexBuffer::TRIANGLES); 174// gGL.begin(LLRender::TRIANGLES);
175 175
176// // joint top half 176// // joint top half
177// glNormal3f(nc, nc, nc); 177// glNormal3f(nc, nc, nc);
@@ -362,7 +362,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass )
362// // render the bone 362// // render the bone
363// gGL.color3f( 0.5f, 0.5f, 0.0f ); 363// gGL.color3f( 0.5f, 0.5f, 0.0f );
364 364
365// gGL.begin(LLVertexBuffer::TRIANGLES); 365// gGL.begin(LLRender::TRIANGLES);
366 366
367// gGL.vertex3f( length, 0.0f, 0.0f); 367// gGL.vertex3f( length, 0.0f, 0.0f);
368// gGL.vertex3f( 0.0f, boneSize, 0.0f); 368// gGL.vertex3f( 0.0f, boneSize, 0.0f);
@@ -524,14 +524,69 @@ LLViewerJointCollisionVolume::LLViewerJointCollisionVolume(const std::string &na
524void LLViewerJointCollisionVolume::renderCollision() 524void LLViewerJointCollisionVolume::renderCollision()
525{ 525{
526 updateWorldMatrix(); 526 updateWorldMatrix();
527 glMatrixMode(GL_MODELVIEW); 527
528 glPushMatrix(); 528 gGL.pushMatrix();
529 glMultMatrixf( &mXform.getWorldMatrix().mMatrix[0][0] ); 529 glMultMatrixf( &mXform.getWorldMatrix().mMatrix[0][0] );
530 530
531 glColor3f( 0.f, 0.f, 1.f ); 531 gGL.color3f( 0.f, 0.f, 1.f );
532 gSphere.render(); 532
533 gGL.begin(LLRender::LINES);
534
535 LLVector3 v[] =
536 {
537 LLVector3(1,0,0),
538 LLVector3(-1,0,0),
539 LLVector3(0,1,0),
540 LLVector3(0,-1,0),
541
542 LLVector3(0,0,-1),
543 LLVector3(0,0,1),
544 };
545
546 //sides
547 gGL.vertex3fv(v[0].mV);
548 gGL.vertex3fv(v[2].mV);
549
550 gGL.vertex3fv(v[0].mV);
551 gGL.vertex3fv(v[3].mV);
552
553 gGL.vertex3fv(v[1].mV);
554 gGL.vertex3fv(v[2].mV);
555
556 gGL.vertex3fv(v[1].mV);
557 gGL.vertex3fv(v[3].mV);
558
559
560 //top
561 gGL.vertex3fv(v[0].mV);
562 gGL.vertex3fv(v[4].mV);
563
564 gGL.vertex3fv(v[1].mV);
565 gGL.vertex3fv(v[4].mV);
566
567 gGL.vertex3fv(v[2].mV);
568 gGL.vertex3fv(v[4].mV);
569
570 gGL.vertex3fv(v[3].mV);
571 gGL.vertex3fv(v[4].mV);
572
573
574 //bottom
575 gGL.vertex3fv(v[0].mV);
576 gGL.vertex3fv(v[5].mV);
577
578 gGL.vertex3fv(v[1].mV);
579 gGL.vertex3fv(v[5].mV);
580
581 gGL.vertex3fv(v[2].mV);
582 gGL.vertex3fv(v[5].mV);
583
584 gGL.vertex3fv(v[3].mV);
585 gGL.vertex3fv(v[5].mV);
586
587 gGL.end();
533 588
534 glPopMatrix(); 589 gGL.popMatrix();
535} 590}
536 591
537LLVector3 LLViewerJointCollisionVolume::getVolumePos(LLVector3 &offset) 592LLVector3 LLViewerJointCollisionVolume::getVolumePos(LLVector3 &offset)