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

Method insertPlane

Engine/source/collision/optimizedPolyList.cpp:180–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180U32 OptimizedPolyList::insertPlane(const PlaneF& plane)
181{
182 S32 retIdx = -1;
183
184 // Apply the transform
185 PlaneF transPlane;
186 mPlaneTransformer.transform(plane, transPlane);
187
188 for (U32 i = 0; i < mPlaneList.size(); i++)
189 {
190 if (mPlaneList[i].equal(transPlane) &&
191 mFabs( mPlaneList[i].d - transPlane.d ) < POINT_EPSILON)
192 {
193 retIdx = i;
194 break;
195 }
196 }
197
198 if (retIdx == -1)
199 {
200 retIdx = mPlaneList.size();
201 mPlaneList.push_back(transPlane);
202 }
203
204 return (U32)retIdx;
205}
206
207U32 OptimizedPolyList::insertMaterial(BaseMatInstance* baseMat)
208{

Callers

nothing calls this directly

Calls 5

mFabsFunction · 0.85
transformMethod · 0.45
sizeMethod · 0.45
equalMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected