Spherical
Represents a point in spherical coordinates.
Spherical stores a 3D position using (radius, phi, theta) where radius is the distance from the origin, phi is the azimuth angle around the Y-axis, and theta is the polar angle measured from the equatorial plane. This representation is commonly used for orbital camera rigs, direction sampling, and converting between angular and Cartesian representations.
Construction
Constructors
Spherical() constexpr
Constructs a spherical coordinate from radius, phi, and theta.
cpp
Spherical::Spherical(float radius, float phi, float theta);| Parameter | Description |
|---|---|
| radius | Radial distance from the origin. |
| phi | Azimuth angle in radians. |
| theta | Polar angle in radians. |
Properties
phi float
Azimuth angle around the Y-axis in radians.
cpp
float phi {0.0f};radius float
Radial distance from the origin.
cpp
float radius {1.0f};theta float
Polar angle from the equator in radians.
cpp
float theta {0.0f};