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

Method insertPoint

Engine/source/collision/optimizedPolyList.cpp:83–108  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

81
82//----------------------------------------------------------------------------
83U32 OptimizedPolyList::insertPoint(const Point3F& point)
84{
85 S32 retIdx = -1;
86
87 // Apply the transform
88 Point3F transPoint = point;
89 transPoint *= mScale;
90 mMatrix.mulP(transPoint);
91
92 for (U32 i = 0; i < mPoints.size(); i++)
93 {
94 if (mPoints[i].equal(transPoint))
95 {
96 retIdx = i;
97 break;
98 }
99 }
100
101 if (retIdx == -1)
102 {
103 retIdx = mPoints.size();
104 mPoints.push_back(transPoint);
105 }
106
107 return (U32)retIdx;
108}
109
110U32 OptimizedPolyList::insertNormal(const Point3F& normal)
111{

Callers 1

buildPolyListMethod · 0.80

Calls 4

mulPMethod · 0.80
sizeMethod · 0.45
equalMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected