An infinite cone.
More...
◆ Cone() [1/2]
G3D::Cone::Cone |
( |
const Vector3 & |
tip, |
|
|
const Vector3 & |
direction, |
|
|
float |
angle |
|
) |
| |
- Parameters
-
angle | Angle from the center line to the edge, in radians |
◆ Cone() [2/2]
G3D::Cone::Cone |
( |
const Vector3 & |
tip, |
|
|
const class Box & |
box |
|
) |
| |
Forms the smallest cone that contains the box.
Undefined if the tip is inside or on the box.
◆ ~Cone()
virtual G3D::Cone::~Cone |
( |
| ) |
|
|
inlinevirtual |
◆ contains()
bool G3D::Cone::contains |
( |
const class Vector3 & |
v | ) |
const |
True if v is a point inside the cone.
◆ halfAngleFromSolidAngle() [1/2]
static float G3D::Cone::halfAngleFromSolidAngle |
( |
float |
solidAngle | ) |
|
|
static |
Returns the half-angle (in radians) of a cone that subtends solidAngle (in steradians)
◆ halfAngleFromSolidAngle() [2/2]
static double G3D::Cone::halfAngleFromSolidAngle |
( |
double |
solidAngle | ) |
|
|
static |
◆ intersects()
bool G3D::Cone::intersects |
( |
const class Sphere & |
s | ) |
const |
Returns true if the cone touches, intersects, or contains b.
If c.intersects(s) and c.intersects(Sphere(s.center, s.radius * 2) then the sphere s is entirely within cone c.
◆ randomDirectionInCone()
◆ solidAngleFromHalfAngle() [1/2]
static float G3D::Cone::solidAngleFromHalfAngle |
( |
float |
halfAngle | ) |
|
|
static |
Returns the solid angle (in steradians) subtended by a cone with half-angle halfAngle.
◆ solidAngleFromHalfAngle() [2/2]
static double G3D::Cone::solidAngleFromHalfAngle |
( |
double |
halfAngle | ) |
|
|
static |