MCPcopy Create free account
hub / github.com/carbonengine/trinity / MarkFaces

Method MarkFaces

trinity/Eve/UI/EveSpherePinIndexTree.cpp:542–570  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

540
541// ------------------------------------------------------------------------------------------------------
542int EveSpherePinIndexTree::MarkFaces( EveSpherePinIndexTree::TreeNode* node, float minTheta, float maxTheta, float minPhi, float maxPhi )
543{
544 int faceCount = 0;
545 if( node->left && node->right )
546 {
547 if( OverlapTest( node->left, minTheta, maxTheta, minPhi, maxPhi ) )
548 {
549 faceCount += MarkFaces( node->left, minTheta, maxTheta, minPhi, maxPhi );
550 }
551 if( OverlapTest( node->right, minTheta, maxTheta, minPhi, maxPhi ) )
552 {
553 faceCount += MarkFaces( node->right, minTheta, maxTheta, minPhi, maxPhi );
554 }
555
556 return faceCount;
557 }
558
559 for( std::vector<Face*>::const_iterator it = node->faces.begin(); it != node->faces.end(); ++it )
560 {
561 if( !( ( *it )->flag ) )
562 {
563 ( *it )->flag = 1;
564 faceCount++;
565 m_markedFaces.push_back( *it );
566 }
567 }
568
569 return faceCount;
570}
571
572// ------------------------------------------------------------------------------------------------------
573int EveSpherePinIndexTree::GetIndices( Vector3& point, float radius, int& primitives, std::vector<unsigned short>& indices )

Callers

nothing calls this directly

Calls 3

OverlapTestFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected