Go to the source code of this file.
Functions | |
| int | IntSquareRoot (int n) |
| bool | IsSquare (int n) |
| void | VectorToSphericalCoords (const sheep::Vector3 &v, sheep::Real *phi, sheep::Real *theta) |
| sheep::Vector3 | SphericalCoordsToVector (sheep::Real phi, sheep::Real theta) |
| void | PackSphericalCoords (sheep::Real phi, sheep::Real theta, sheep::uint8 *qphi, sheep::uint8 *qtheta) |
| void | UnpackSphericalCoords (sheep::uint8 qphi, sheep::uint8 qtheta, sheep::Real *phi, sheep::Real *theta) |
| void | PackSphericalCoords (sheep::Real phi, sheep::Real theta, sheep::uint8 *q) |
| void | UnpackSphericalCoords (sheep::uint8 q, sheep::Real *phi, sheep::Real *theta) |
| void | PackDirection (const sheep::Vector3 &v, sheep::uint8 *qphi, sheep::uint8 *qtheta) |
| Helper function. | |
| void | PackDirection (const sheep::Vector3 &v, sheep::uint8 *q) |
| Helper function. | |
| sheep::Vector3 | UnpackDirection (sheep::uint8 qphi, sheep::uint8 qtheta) |
| sheep::Vector3 | UnpackDirection (sheep::uint8 q) |
|
|
Definition at line 24 of file utilities.inl. Referenced by IsSquare(). |
|
|
Definition at line 29 of file utilities.inl. References IntSquareRoot(), and sheep::sq(). |
|
||||||||||||
|
Helper function.
Definition at line 160 of file utilities.inl. References PackSphericalCoords(), sheep::Real, and VectorToSphericalCoords(). |
|
||||||||||||||||
|
Helper function.
Definition at line 150 of file utilities.inl. References PackSphericalCoords(), sheep::Real, and VectorToSphericalCoords(). |
|
||||||||||||||||
|
Packs a direction expressed in spherical coordinates to a compact 8-bit representation. Definition at line 108 of file utilities.inl. References sheep::NormalizeAngle(), and sheep::Real. Referenced by PackDirection(). |
|
||||||||||||||||||||
|
Packs a direction expressed in spherical coordinates to a compact 16-bit representation. Definition at line 68 of file utilities.inl. References sheep::NormalizeAngle(), and sheep::Real. |
|
||||||||||||
|
Converts from spherical coordinates to cartesian coordinates. Returned vector is unit-length. Definition at line 54 of file utilities.inl. References sheep::Vector3::IsUnitLength(), and sheep::Real. Referenced by toxic::Sphere::ComputeIrradiance(), and toxic::ConversionTables::ConversionTables(). |
|
|
Not a helper function. Same as UnpackSphericalCoords() followed by SphericalCoordsToVector(), but much faster. Definition at line 181 of file utilities.inl. |
|
||||||||||||
|
Not a helper function. Same as UnpackSphericalCoords() followed by SphericalCoordsToVector(), but much faster. Definition at line 167 of file utilities.inl. References sheep::Vector3::IsUnitLength(), and sheep::Real. |
|
||||||||||||||||
|
Unpacks spherical coordinates from the 16-bit representation. phi is in [0, 2*Pi], theta is in [0, Pi].
Definition at line 135 of file utilities.inl. References sheep::Real. |
|
||||||||||||||||||||
|
Unpacks spherical coordinates from the 16-bit representation. phi is in [0, 2*Pi], theta is in [0, Pi].
Definition at line 96 of file utilities.inl. References sheep::Real. |
|
||||||||||||||||
|
Converts from cartesian coordinates to spherical coordinates. v must be a unit-length vector. phi is in [0, 2*Pi], theta is in [0, Pi].
Definition at line 34 of file utilities.inl. References sheep::Vector3::IsUnitLength(), sheep::Vector3::m_x, sheep::Vector3::m_y, sheep::Vector3::m_z, and sheep::Real. Referenced by toxic::PhotonMap::BuildPhotonDirectionHistogram(), and PackDirection(). |
1.3.6