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

Method castRayRendered

Engine/source/T3D/tsStatic.cpp:1209–1228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1207}
1208
1209bool TSStatic::castRayRendered(const Point3F& start, const Point3F& end, RayInfo* info)
1210{
1211 if (!mShapeInstance)
1212 return false;
1213
1214 // Cast the ray against the currently visible detail
1215 RayInfo localInfo;
1216 if (info && info->generateTexCoord)
1217 localInfo.generateTexCoord = true;
1218 bool res = mShapeInstance->castRayOpcode(mShapeInstance->getCurrentDetail(), start, end, &localInfo);
1219
1220 if (res)
1221 {
1222 *info = localInfo;
1223 info->object = this;
1224 return true;
1225 }
1226
1227 return false;
1228}
1229
1230bool TSStatic::buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F& box, const SphereF&)
1231{

Callers 1

raycastMethod · 0.45

Calls 2

castRayOpcodeMethod · 0.80
getCurrentDetailMethod · 0.80

Tested by

no test coverage detected