49    wxASSERT( 
m_bbox.IsInitialized() );
 
 
   65    return m_bbox.Intersects( aBBox );
 
 
   94        if( !
m_objectA->Intersect( aSegRay, &tmpRayDist, ¤tNormal ) )
 
   97        currentRayPos = aSegRay.
atNormalized( tmpRayDist + 0.003f );
 
  105        for( 
unsigned int l = 0; l < ( 
m_objectB->size() * 2 ); ++l )
 
  107            bool wasCrossedSubVol = 
false;
 
  110            for( 
unsigned int i = 0; i < 
m_objectB->size(); ++i )
 
  120                                 ->
Intersect( currentRay, &hitDist, &tmpNormal ) )
 
  123                    wxASSERT( hitDist <= 1.0f );
 
  125                    if( hitDist > FLT_EPSILON )
 
  127                        wasCrossedSubVol = 
true;
 
  130                                currentRay.
atNormalized( glm::min( hitDist + 0.0001f, 1.0f ) );
 
  134                        currentNormal = tmpNormal * -1.0f;
 
  139            if( !wasCrossedSubVol )
 
  145        *aNormalOut = currentNormal;
 
  149                glm::max( glm::length( currentRayPos - aSegRay.
m_Start ) / aSegRay.
m_Length, 0.0f ),
 
 
  173            for( 
unsigned int i = 0; i < 
m_objectB->size(); i++ )
 
 
Defines math related functions.
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
bool IsPointInside(const SFVEC2F &aPoint) const override
 
bool Intersects(const BBOX_2D &aBBox) const override
a.Intersects(b) ⇔ !a.Disjoint(b) ⇔ !(a ∩ b = ∅)
 
const OBJECT_2D * m_objectA
 
bool Intersect(const RAYSEG2D &aSegRay, float *aOutT, SFVEC2F *aNormalOut) const override
 
LAYER_ITEM_2D(const OBJECT_2D *aObjectA, std::vector< const OBJECT_2D * > *aObjectB, const OBJECT_2D *aObjectC, const BOARD_ITEM &aBoardItem)
 
INTERSECTION_RESULT IsBBoxInside(const BBOX_2D &aBBox) const override
Test this object if it's completely outside, intersects, or is completely inside aBBox.
 
bool Overlaps(const BBOX_2D &aBBox) const override
Test if the box overlaps the object.
 
std::vector< const OBJECT_2D * > * m_objectB
 
const OBJECT_2D * m_objectC
 
const BBOX_2D & GetBBox() const
 
OBJECT_2D(OBJECT_2D_TYPE aObjType, const BOARD_ITEM &aBoardItem)
 
Manage a bounding box defined by two SFVEC2F min max points.
 
SFVEC2F atNormalized(float t) const
Return the position at t.