Stores a three-dimensional orthonormal coordinate frame. More...
#include <mitsuba/core/frame.h>
Public Member Functions | |
Frame () | |
Default constructor – performs no initialization! More... | |
Frame (const Vector &s, const Vector &t, const Normal &n) | |
Given a normal and tangent vectors, construct a new coordinate frame. More... | |
Frame (const Vector &x, const Vector &y, const Vector &z) | |
Construct a frame from the given orthonormal vectors. More... | |
Frame (const Vector &n) | |
Construct a new coordinate frame from a single vector. More... | |
Frame (Stream *stream) | |
Unserialize from a binary data stream. More... | |
void | serialize (Stream *stream) const |
Serialize to a binary data stream. More... | |
Vector | toLocal (const Vector &v) const |
Convert from world coordinates to local coordinates. More... | |
Vector | toWorld (const Vector &v) const |
Convert from local coordinates to world coordinates. More... | |
bool | operator== (const Frame &frame) const |
Equality test. More... | |
bool | operator!= (const Frame &frame) const |
Inequality test. More... | |
std::string | toString () const |
Return a string representation of this frame. More... | |
Static Public Member Functions | |
static Float | cosTheta2 (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the squared cosine of the angle between the normal and v. More... | |
static Float | cosTheta (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the cosine of the angle between the normal and v. More... | |
static Vector2 | uv (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the u and v coordinates of the vector 'v'. More... | |
static Float | sinTheta2 (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the squared sine of the angle between the normal and v. More... | |
static Float | sinTheta (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the sine of the angle between the normal and v. More... | |
static Float | tanTheta (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the tangent of the angle between the normal and v. More... | |
static Float | tanTheta2 (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the squared tangent of the angle between the normal and v. More... | |
static Float | sinPhi (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the sine of the phi parameter in spherical coordinates. More... | |
static Float | cosPhi (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the cosine of the phi parameter in spherical coordinates. More... | |
static Float | sinPhi2 (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the squared sine of the phi parameter in spherical coordinates. More... | |
static Float | cosPhi2 (const Vector &v) |
Assuming that the given direction is in the local coordinate system, return the squared cosine of the phi parameter in spherical coordinates. More... | |
Public Attributes | |
Vector | s |
Vector | t |
Normal | n |
Stores a three-dimensional orthonormal coordinate frame.
This class is mostly used to quickly convert between different cartesian coordinate systems and to efficiently compute certain quantities (e.g. cosTheta(), tanTheta, ..).
|
inline |
Default constructor – performs no initialization!
Given a normal and tangent vectors, construct a new coordinate frame.
Construct a frame from the given orthonormal vectors.
|
inline |
Construct a new coordinate frame from a single vector.
|
inline |
Unserialize from a binary data stream.
Assuming that the given direction is in the local coordinate system, return the cosine of the phi parameter in spherical coordinates.
Assuming that the given direction is in the local coordinate system, return the squared cosine of the phi parameter in spherical coordinates.
Assuming that the given direction is in the local coordinate system, return the cosine of the angle between the normal and v.
Assuming that the given direction is in the local coordinate system, return the squared cosine of the angle between the normal and v.
|
inline |
Serialize to a binary data stream.
Assuming that the given direction is in the local coordinate system, return the sine of the phi parameter in spherical coordinates.
Assuming that the given direction is in the local coordinate system, return the squared sine of the phi parameter in spherical coordinates.
Assuming that the given direction is in the local coordinate system, return the sine of the angle between the normal and v.
Assuming that the given direction is in the local coordinate system, return the squared sine of the angle between the normal and v.
Assuming that the given direction is in the local coordinate system, return the tangent of the angle between the normal and v.
Assuming that the given direction is in the local coordinate system, return the squared tangent of the angle between the normal and v.
Convert from world coordinates to local coordinates.
|
inline |
Return a string representation of this frame.
Convert from local coordinates to world coordinates.
Assuming that the given direction is in the local coordinate system, return the u and v coordinates of the vector 'v'.
Normal mitsuba::Frame::n |
Vector mitsuba::Frame::s |
Vector mitsuba::Frame::t |