RiInterval

Single continuous interval in R1

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

Quick Index

DESCRIPTION

Class Summary

class RiInterval
{
public:
// Constructors
RiInterval();
RiInterval(RiReal val);
RiInterval(RiReal min, RiReal max);
// Accessors
RiReal Min() const;
RiReal Max() const;
bool IsEmpty() const;
RiReal Width() const;
RiReal Center() const;
bool In(RiReal) const;
// Set operators
const RiInterval &operator&=(const RiInterval &);
const RiInterval &operator|==(const RiInterval &);
// Arithmetic operators
const RiInterval &operator+==(const RiInterval &);
const RiInterval &operator-=(const RiInterval &);
const RiInterval &operator*==(const RiInterval &);
const RiInterval &operator/==(RiReal f);
RiInterval operator-() const;
protected:
}; // RiInterval


DESCRIPTION

An interval which can be used to represent a range of values. Intervals can be unioned and intesected. They also have the common math operation defined on them.


RiInterval();

Constructs an empty interval (max < min)

    RiInterval();

RiInterval(RiReal val);

Constructs an interval with zero width

    RiInterval(RiReal val);

RiInterval(RiReal min, RiReal max);

Constructs an interval. If min>max then the interval is empty.

    RiInterval(RiReal min, RiReal max);

RiReal Min() const;

    RiReal Min()      const;

RiReal Max() const;

    RiReal Max()      const;

bool IsEmpty() const;

Returns true if interval is empty (min > max)

    bool   IsEmpty()  const;

RiReal Width() const;

Size of the interval

    RiReal Width()    const;

RiReal Center() const;

Center of the interval

    RiReal Center()   const;

bool In(RiReal) const;

Returns true if value is in the interval

    bool   In(RiReal) const;

const RiInterval &operator&=(const RiInterval &);

    const  RiInterval &operator&=(const RiInterval &);

const RiInterval &operator|=(const RiInterval &);

    const  RiInterval &operator|=(const RiInterval &);

const RiInterval &operator+=(const RiInterval &);

    const RiInterval &operator+=(const RiInterval &);

const RiInterval &operator-=(const RiInterval &);

    const RiInterval &operator-=(const RiInterval &);

const RiInterval &operator*=(const RiInterval &);

    const RiInterval &operator*=(const RiInterval &);

const RiInterval &operator/=(RiReal f);

    const RiInterval &operator/=(RiReal f);

RiInterval operator-() const;

    RiInterval        operator-() const;

All Members

public:
// Accessors
RiReal Min() const;
RiReal Max() const;
bool IsEmpty() const;
RiReal Width() const;
RiReal Center() const;
bool In(RiReal) const;
// Set operators
const RiInterval &operator&=(const RiInterval &);
const RiInterval &operator|==(const RiInterval &);
// Arithmetic operators
const RiInterval &operator+==(const RiInterval &);
const RiInterval &operator-=(const RiInterval &);
const RiInterval &operator*==(const RiInterval &);
const RiInterval &operator/==(RiReal f);
RiInterval operator-() const;
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:33 2000 .