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

Function reflect

Engine/source/math/mathUtils.h:171–174  ·  view source on GitHub ↗

Simple reflection equation - pass in a vector and a normal to reflect off of

Source from the content-addressed store, hash-verified

169
170 /// Simple reflection equation - pass in a vector and a normal to reflect off of
171 inline Point3F reflect( Point3F &inVec, Point3F &norm )
172 {
173 return inVec - norm * ( mDot( inVec, norm ) * 2.0f );
174 }
175
176 /// Collide two capsules (sphere swept lines) against each other, reporting only if they intersect or not.
177 /// Based on routine from "Real Time Collision Detection" by Christer Ericson pp 114.

Callers 2

getCameraReflectionMethod · 0.85
mathTypes.cppFile · 0.85

Calls 1

mDotFunction · 0.70

Tested by

no test coverage detected