wavelength 1.0.0
Loading...
Searching...
No Matches
sphere.h File Reference
#include "math/plane.h"
#include "math/vector3.h"
#include "os/prnstream.h"
Include dependency graph for sphere.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Sphere
 Bounding sphere. More...

Functions

PrnStream & operator<< (PrnStream &stream, const Sphere &sphere)
 Write a sphere's centre and radius on a tab-indented line.
bool IntersectSegmentSphere (const Segment &segment, const Sphere &sphere, float *pflT)
 Report whether the line through a segment passes within a sphere.

Function Documentation

◆ operator<<()

PrnStream & operator<< ( PrnStream & stream,
const Sphere & sphere )

Write a sphere's centre and radius on a tab-indented line.

Parameters
streamThe stream to write to.
sphereThe sphere.
Returns
The stream.
Ghidra address:
NTSC-U/C: 0x00290670
Ghidra address:
PAL: 0x0029a038

◆ IntersectSegmentSphere()

bool IntersectSegmentSphere ( const Segment & segment,
const Sphere & sphere,
float * pflT )

Report whether the line through a segment passes within a sphere.

The parameter of the point of the line nearest the centre is reported without clamping it to the segment.

Parameters
segmentThe segment.
sphereThe sphere.
pflTReceives the parameter of the nearest point, 0 at the start and 1 at the end.
Returns
Whether the nearest point lies within the radius.
Ghidra address:
NTSC-U/C: 0x00290b38
Ghidra address:
PAL: 0x0029a500