## RiGeometry

Handles general geometric queries on RiVector3 and RiVector2

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

DESCRIPTION

### Class Summary

class RiGeometry
{
 public: static int IndexOfMinAbsComponent( const RiVector3& v ); static int IndexOfMaxAbsComponent( const RiVector3& v ); static RiVector3 PerpendicularVector(const RiVector3 &v); static RiReal AngleBetweenVectors(const RiVector3& v1, const RiVector3& v2); static RiVector3 Reflect( const RiVector3& a, const RiVector3& n ); static RiUnitVector3 UnitReflect( const RiUnitVector3& a, const RiUnitVector3& n ); static RiUnitVector3 DirectionFromSphericalCoordinates( RiReal theta, RiReal phi ); protected:
}; // RiGeometry

#### DESCRIPTION

Class to hold all support functions for geometry (ie RiVector3 and RiVector2). All checks for coplanarity, colinearity, non-exact RiVector3 equality, and other general queries that shouldn't clutter up RiVector3 and RiVector2 belong here.

#### int IndexOfMinAbsComponent( const RiVector3& v );

Return the index [0-2] for the minimum element of the absolute value of the vector

```    static int IndexOfMinAbsComponent( const RiVector3& v );
```

#### int IndexOfMaxAbsComponent( const RiVector3& v );

Return the index [0-2] for the maximum element of the absolute value of the vector

```    static int IndexOfMaxAbsComponent( const RiVector3& v );
```

#### RiVector3 PerpendicularVector(const RiVector3 &v);

Return a vector perpendicular to the given vector.

```    static RiVector3 PerpendicularVector(const RiVector3 &v);
```

#### RiReal AngleBetweenVectors(const RiVector3& v1, const RiVector3& v2);

Return the angle between two RiVectors in radians

```    static RiReal AngleBetweenVectors(const RiVector3& v1, const RiVector3& v2);
```

#### RiVector3 Reflect( const RiVector3& a, const RiVector3& n );

returns reflection of a with respect to n

```    static RiVector3 Reflect( const RiVector3& a, const RiVector3& n );
```

#### RiUnitVector3 UnitReflect( const RiUnitVector3& a, const RiUnitVector3& n );

returns unit reflection of unit a with respect to unit n

```    static RiUnitVector3 UnitReflect( const RiUnitVector3& a, const RiUnitVector3& n );
```

#### RiUnitVector3 DirectionFromSphericalCoordinates( RiReal theta, RiReal phi );

returns unit vector v in direction (theta, phi), where theta is angle in radians between v and z-axis, and phi is the azimuthal angle relative to x-axis

```     static RiUnitVector3 DirectionFromSphericalCoordinates( RiReal theta, RiReal phi );
```

### All Members

public:
static int IndexOfMinAbsComponent( const RiVector3& v );
static int IndexOfMaxAbsComponent( const RiVector3& v );
static RiVector3 PerpendicularVector(const RiVector3 &v);
static RiReal AngleBetweenVectors(const RiVector3& v1, const RiVector3& v2);
static RiVector3 Reflect( const RiVector3& a, const RiVector3& n );
static RiUnitVector3 UnitReflect( const RiUnitVector3& a, const RiUnitVector3& n );
static RiUnitVector3 DirectionFromSphericalCoordinates( RiReal theta, RiReal phi );
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:09 2000 .