117 this->
p.
set(_x, _y, _z);
129 return (
lengthsq(d) <= (rsum * rsum));
Type
Definition clipstatus.h:22
@ Outside
Definition clipstatus.h:24
@ Inside
Definition clipstatus.h:23
@ Clipped
Definition clipstatus.h:25
Nebula's bounding box class.
Definition bbox.h:24
point pmax
Definition bbox.h:93
point pmin
Definition bbox.h:92
A line in 3d space.
Definition line.h:22
A 2d rectangle class.
Definition rectangle.h:20
A 3-dimensional sphere.
Definition sphere.h:23
void set(const point &_p, scalar _r)
set position and radius
Definition sphere.h:105
sphere()
default constructor
Definition sphere.h:62
bool intersects(const sphere &s) const
check if 2 spheres overlap
Definition sphere.h:125
ClipStatus::Type clipstatus(const bbox &box) const
get clip status of box against sphere
Definition sphere.h:154
bool inside(const bbox &box) const
return true if box is completely inside sphere
Definition sphere.h:137
static vec3 random_point_on_unit_sphere()
generate a random point on a unit sphere
Definition sphere.cc:84
bool intersect_sweep(const vector &va, const sphere &sb, const vector &vb, scalar &u0, scalar &u1) const
check if 2 moving sphere have contact
Definition sphere.cc:106
point p
Definition sphere.h:54
rectangle< scalar > project_screen_rh(const mat4 &modelView, const mat4 &projection, scalar nearZ) const
project sphere to screen rectangle (right handed coordinate system)
Definition sphere.cc:172
bool intersects_ray(const line &l) const
check if sphere intersects ray
Definition sphere.cc:70
scalar r
Definition sphere.h:55
Different curves.
Definition angularpfeedbackloop.h:17
__forceinline scalar lengthsq(const quat &q)
Definition quat.h:268
__forceinline bool greaterequal_all(const point &v0, const point &v1)
Definition point.h:463
__forceinline bool less_all(const point &v0, const point &v1)
Definition point.h:397
float scalar
Definition scalar.h:45
A 4x4 single point precision float matrix.
Definition mat4.h:49
Represents a 3D point in space.
Definition point.h:22
void set(scalar x, scalar y, scalar z)
set content
Definition point.h:332
A 3D vector.
Definition vec3.h:40
A vector is a 3D direction in space.
Definition vector.h:22