Nori

Frame Struct Reference

Stores a three-dimensional orthonormal coordinate frame. More...

#include <frame.h>

List of all members.

Public Member Functions

 Frame ()
 Default constructor -- performs no initialization!
 Frame (const Vector3f &s, const Vector3f &t, const Normal3f &n)
 Given a normal and tangent vectors, construct a new coordinate frame.
 Frame (const Vector3f &x, const Vector3f &y, const Vector3f &z)
 Construct a frame from the given orthonormal vectors.
 Frame (const Vector3f &n)
 Construct a new coordinate frame from a single vector.
Vector3f toLocal (const Vector3f &v) const
 Convert from world coordinates to local coordinates.
Vector3f toWorld (const Vector3f &v) const
 Convert from local coordinates to world coordinates.
bool operator== (const Frame &frame) const
 Equality test.
bool operator!= (const Frame &frame) const
 Inequality test.
QString toString () const
 Return a human-readable string summary of this frame.

Static Public Member Functions

static float cosTheta (const Vector3f &v)
 Assuming that the given direction is in the local coordinate system, return the cosine of the angle between the normal and v.
static float sinTheta (const Vector3f &v)
 Assuming that the given direction is in the local coordinate system, return the sine of the angle between the normal and v.
static float tanTheta (const Vector3f &v)
 Assuming that the given direction is in the local coordinate system, return the tangent of the angle between the normal and v.
static float sinTheta2 (const Vector3f &v)
 Assuming that the given direction is in the local coordinate system, return the squared sine of the angle between the normal and v.
static float sinPhi (const Vector3f &v)
 Assuming that the given direction is in the local coordinate system, return the sine of the phi parameter in spherical coordinates.
static float cosPhi (const Vector3f &v)
 Assuming that the given direction is in the local coordinate system, return the cosine of the phi parameter in spherical coordinates.
static float sinPhi2 (const Vector3f &v)
 Assuming that the given direction is in the local coordinate system, return the squared sine of the phi parameter in spherical coordinates.
static float cosPhi2 (const Vector3f &v)
 Assuming that the given direction is in the local coordinate system, return the squared cosine of the phi parameter in spherical coordinates.

Public Attributes

Vector3f s
Vector3f t
Normal3f n

Detailed Description

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, ..).

Definition at line 33 of file frame.h.


Constructor & Destructor Documentation

Frame::Frame ( ) [inline]

Default constructor -- performs no initialization!

Definition at line 38 of file frame.h.

Frame::Frame ( const Vector3f s,
const Vector3f t,
const Normal3f n 
) [inline]

Given a normal and tangent vectors, construct a new coordinate frame.

Definition at line 41 of file frame.h.

Frame::Frame ( const Vector3f x,
const Vector3f y,
const Vector3f z 
) [inline]

Construct a frame from the given orthonormal vectors.

Definition at line 45 of file frame.h.

Frame::Frame ( const Vector3f n) [inline]

Construct a new coordinate frame from a single vector.

Definition at line 49 of file frame.h.


Member Function Documentation

static float Frame::cosPhi ( const Vector3f v) [inline, static]

Assuming that the given direction is in the local coordinate system, return the cosine of the phi parameter in spherical coordinates.

Definition at line 106 of file frame.h.

static float Frame::cosPhi2 ( const Vector3f v) [inline, static]

Assuming that the given direction is in the local coordinate system, return the squared cosine of the phi parameter in spherical coordinates.

Definition at line 123 of file frame.h.

static float Frame::cosTheta ( const Vector3f v) [inline, static]

Assuming that the given direction is in the local coordinate system, return the cosine of the angle between the normal and v.

Definition at line 67 of file frame.h.

bool Frame::operator!= ( const Frame frame) const [inline]

Inequality test.

Definition at line 133 of file frame.h.

bool Frame::operator== ( const Frame frame) const [inline]

Equality test.

Definition at line 128 of file frame.h.

static float Frame::sinPhi ( const Vector3f v) [inline, static]

Assuming that the given direction is in the local coordinate system, return the sine of the phi parameter in spherical coordinates.

Definition at line 97 of file frame.h.

static float Frame::sinPhi2 ( const Vector3f v) [inline, static]

Assuming that the given direction is in the local coordinate system, return the squared sine of the phi parameter in spherical coordinates.

Definition at line 116 of file frame.h.

static float Frame::sinTheta ( const Vector3f v) [inline, static]

Assuming that the given direction is in the local coordinate system, return the sine of the angle between the normal and v.

Definition at line 73 of file frame.h.

static float Frame::sinTheta2 ( const Vector3f v) [inline, static]

Assuming that the given direction is in the local coordinate system, return the squared sine of the angle between the normal and v.

Definition at line 91 of file frame.h.

static float Frame::tanTheta ( const Vector3f v) [inline, static]

Assuming that the given direction is in the local coordinate system, return the tangent of the angle between the normal and v.

Definition at line 82 of file frame.h.

Vector3f Frame::toLocal ( const Vector3f v) const [inline]

Convert from world coordinates to local coordinates.

Definition at line 54 of file frame.h.

QString Frame::toString ( ) const [inline]

Return a human-readable string summary of this frame.

Definition at line 138 of file frame.h.

Vector3f Frame::toWorld ( const Vector3f v) const [inline]

Convert from local coordinates to world coordinates.

Definition at line 61 of file frame.h.


Member Data Documentation

Definition at line 35 of file frame.h.

Definition at line 34 of file frame.h.

Definition at line 34 of file frame.h.


The documentation for this struct was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines