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

Method insertNormal

Engine/source/collision/optimizedPolyList.cpp:110–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110U32 OptimizedPolyList::insertNormal(const Point3F& normal)
111{
112 S32 retIdx = -1;
113
114 // Apply the transform
115 Point3F transNormal;
116 mMatrix.mulV( normal, &transNormal );
117
118 for (U32 i = 0; i < mNormals.size(); i++)
119 {
120 if (mNormals[i].equal(transNormal))
121 {
122 retIdx = i;
123 break;
124 }
125 }
126
127 if (retIdx == -1)
128 {
129 retIdx = mNormals.size();
130 mNormals.push_back(transNormal);
131 }
132
133 return (U32)retIdx;
134}
135
136U32 OptimizedPolyList::insertUV0(const Point2F& uv)
137{

Callers 1

buildPolyListMethod · 0.80

Calls 4

mulVMethod · 0.80
sizeMethod · 0.45
equalMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected