MCPcopy Create free account
hub / github.com/OGRECave/ogre / drawLine

Method drawLine

Components/Bullet/src/OgreBullet.cpp:865–889  ·  view source on GitHub ↗

* ============================================================================================= * BtDebugDrawer * ============================================================================================= */ ------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

863 */
864//------------------------------------------------------------------------------------------------
865void DebugDrawer::drawLine(const btVector3& from, const btVector3& to, const btVector3& color)
866{
867 if (mLines.getSections().empty())
868 {
869 const char* matName = "Ogre/Debug/LinesMat";
870 auto mat = MaterialManager::getSingleton().getByName(matName, RGN_INTERNAL);
871 if (!mat)
872 {
873 mat = MaterialManager::getSingleton().create(matName, RGN_INTERNAL);
874 auto p = mat->getTechnique(0)->getPass(0);
875 p->setLightingEnabled(false);
876 p->setVertexColourTracking(TVC_AMBIENT);
877 }
878 mLines.setBufferUsage(HBU_CPU_TO_GPU);
879 mLines.begin(mat, RenderOperation::OT_LINE_LIST);
880 }
881 else if (mLines.getCurrentVertexCount() == 0)
882 mLines.beginUpdate(0);
883
884 ColourValue col(color.x(), color.y(), color.z());
885 mLines.position(convert(from));
886 mLines.colour(col);
887 mLines.position(convert(to));
888 mLines.colour(col);
889}
890
891struct DeepPenetrationContactResultCallback : public btManifoldResult
892{

Callers

nothing calls this directly

Calls 10

getPassMethod · 0.80
getCurrentVertexCountMethod · 0.80
beginUpdateMethod · 0.80
convertFunction · 0.50
emptyMethod · 0.45
getByNameMethod · 0.45
createMethod · 0.45
getTechniqueMethod · 0.45
setLightingEnabledMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected