MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / renderScene

Method renderScene

Engine/source/navigation/guiNavEditorCtrl.cpp:516–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516void GuiNavEditorCtrl::renderScene(const RectI & updateRect)
517{
518 GFX->setStateBlock(mZDisableSB);
519
520 // get the projected size...
521 GameConnection* connection = GameConnection::getConnectionToServer();
522 if(!connection)
523 return;
524
525 // Grab the camera's transform
526 MatrixF mat;
527 connection->getControlCameraTransform(0, &mat);
528
529 // Get the camera position
530 Point3F camPos;
531 mat.getColumn(3,&camPos);
532
533 if(mMode == mLinkMode)
534 {
535 if(mLinkStart != Point3F::Max)
536 {
537 GFXStateBlockDesc desc;
538 desc.setBlend(false);
539 desc.setZReadWrite(true ,true);
540 MatrixF linkMat(true);
541 linkMat.setPosition(mLinkStart);
542 Point3F scale(0.8f, 0.8f, 0.8f);
543 GFX->getDrawUtil()->drawTransform(desc, linkMat, &scale);
544 }
545 }
546
547 if(mMode == mTileMode && !mMesh.isNull())
548 {
549 renderBoxOutline(mMesh->getTileBox(mCurTile), ColorI::BLUE);
550 renderBoxOutline(mMesh->getTileBox(mTile), ColorI::GREEN);
551 if(Con::getBoolVariable("$Nav::Editor::renderVoxels", false)) dd.renderGroup(0);
552 if(Con::getBoolVariable("$Nav::Editor::renderInput", false))
553 {
554 dd.depthMask(false);
555 dd.renderGroup(1);
556 dd.depthMask(true);
557 }
558 }
559
560 if(mMode == mTestMode)
561 {
562 if(!mCurPlayer.isNull())
563 renderBoxOutline(mCurPlayer->getWorldBox(), ColorI::BLUE);
564 if(!mPlayer.isNull())
565 renderBoxOutline(mPlayer->getWorldBox(), ColorI::GREEN);
566 }
567
568 duDebugDrawTorque d;
569 if(!mMesh.isNull())
570 mMesh->renderLinks(d);
571 d.render();
572
573 // Now draw all the 2d stuff!

Callers

nothing calls this directly

Calls 15

renderBoxOutlineFunction · 0.85
getBoolVariableFunction · 0.85
getColumnMethod · 0.80
setBlendMethod · 0.80
setZReadWriteMethod · 0.80
getDrawUtilMethod · 0.80
getTileBoxMethod · 0.80
renderGroupMethod · 0.80
renderLinksMethod · 0.80
setStateBlockMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected