MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Intersects

Method Intersects

Source/Engine/Level/Actors/BoxBrush.cpp:139–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139bool BoxBrush::Intersects(int32 surfaceIndex, const Ray& ray, Real& distance, Vector3& normal) const
140{
141 distance = MAX_Real;
142 normal = Vector3::Up;
143 auto scene = GetScene();
144 CHECK_RETURN(scene, false);
145
146 // Get surface data handle
147 CSG::SceneCSGData::SurfaceData surfaceData;
148 if (scene->CSGData.TryGetSurfaceData(GetBrushID(), surfaceIndex, surfaceData))
149 {
150 return surfaceData.Intersects(ray, distance, normal);
151 }
152 return false;
153}
154
155void BoxBrush::GetVertices(int32 surfaceIndex, Array<Vector3>& outputData) const
156{

Callers 12

DrawLightsDebugMethod · 0.45
IntersectsItselfMethod · 0.45
IntersectsEntryMethod · 0.45
DrawLightsDebugMethod · 0.45
IntersectsItselfMethod · 0.45
DrawMethod · 0.45
IntersectsItselfMethod · 0.45
OnDebugDrawMethod · 0.45
DrawMethod · 0.45
IntersectsItselfMethod · 0.45
IntersectsEntryMethod · 0.45

Calls 2

GetSceneFunction · 0.85
TryGetSurfaceDataMethod · 0.80

Tested by

no test coverage detected