RiSquareWarp

Handles general bijections to and from [0,1]^2

[ Geometry | Source | Search | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION

Class Summary

class RiSquareWarp
{
public:
static RiVector2 ToUnitDisk( const RiVector2& seed );
static RiVector2 FromUnitDisk( const RiVector2& onDisk );
static RiUnitVector3 ToCosineWeightedHemisphere( const RiVector2& seed );
static RiUnitVector3 ToCosinePowerWeightedHemisphere( const RiVector2& seed, RiReal exponent );
static RiUnitVector3 ToUniformHemisphere( const RiVector2& seed );
static RiVector2 FromUnitHemisphere( const RiUnitVector3& v );
static RiUnitVector3 ToUniformSphere( const RiVector2& seed );
static RiVector2 FromUniformSphere( const RiUnitVector3& v );
protected:
}; // RiSquareWarp


DESCRIPTION

Class to hold all support functions for warping to and from the unit square. Typically used for random point selection, but can also be used to manage data structures on non-square domains.


RiVector2 ToUnitDisk( const RiVector2& seed );

Returns a cartesian point on unit disk centered at origin. Takes in a point on [0,1]^2 this mapping takes concentric squares and maps them to concentric circles

    static RiVector2 ToUnitDisk( const RiVector2& seed );

RiVector2 FromUnitDisk( const RiVector2& onDisk );

Inverse mapping of RiSquareWarp::ToUnitDisk so takes (x,y) on disk and returns (x,y) on [0.1]^2

    static RiVector2 FromUnitDisk( const RiVector2& onDisk );

RiUnitVector3 ToCosineWeightedHemisphere( const RiVector2& seed );

Returns unit vector on hemisphere with diffuse density The plus Z axis is cosTheta = 1. The return value will have positive Z

    static RiUnitVector3 ToCosineWeightedHemisphere( const RiVector2& seed );

RiUnitVector3 ToCosinePowerWeightedHemisphere( const RiVector2& seed, RiReal exponent );

Returns unit vector on hemisphere with phong density That is p(theta) is proportional to cos^N(theta). The plus Z axis is cosTheta = 1. The return value will have positive Z

    static RiUnitVector3 ToCosinePowerWeightedHemisphere( const RiVector2& seed, RiReal exponent );

RiUnitVector3 ToUniformHemisphere( const RiVector2& seed );

Returns unit vector on hemisphere with uniform density The plus Z axis is cosTheta = 1. The return value will have positive Z

    static RiUnitVector3 ToUniformHemisphere( const RiVector2& seed );

RiVector2 FromUnitHemisphere( const RiUnitVector3& v );

Inverse of ToUniformHemisphere uses Abs(v.Z())

    static RiVector2 FromUnitHemisphere( const RiUnitVector3& v );

RiUnitVector3 ToUniformSphere( const RiVector2& seed );

Returns unit vector on sphere

    static RiUnitVector3 ToUniformSphere( const RiVector2& seed );

RiVector2 FromUniformSphere( const RiUnitVector3& v );

Inverse of ToUniformSphere

    static RiVector2 FromUniformSphere( const RiUnitVector3& v );

All Members

public:
static RiVector2 ToUnitDisk( const RiVector2& seed );
static RiVector2 FromUnitDisk( const RiVector2& onDisk );
static RiUnitVector3 ToCosineWeightedHemisphere( const RiVector2& seed );
static RiUnitVector3 ToCosinePowerWeightedHemisphere( const RiVector2& seed, RiReal exponent );
static RiUnitVector3 ToUniformHemisphere( const RiVector2& seed );
static RiVector2 FromUnitHemisphere( const RiUnitVector3& v );
static RiUnitVector3 ToUniformSphere( const RiVector2& seed );
static RiVector2 FromUniformSphere( const RiUnitVector3& v );
protected:

Ancestors

Class does not inherit from any other class.


Descendants

Class is not inherited by any others.


Generated from source by the Cocoon utilities on Fri Feb 25 15:15:10 2000 .