Atoms Crowd  7.0.0
Color3< T > Class Template Reference

#include <ImathColor.h>

Inheritance diagram for Color3< T >:
Vec3< T >

Public Member Functions

template<class S >
constexpr Color3 (const Vec3< S > &v) noexcept
 
Constructors and Assignemt
ATOMSMATH_HOSTDEVICE Color3 () noexcept
 No initialization by default.
 
constexpr ATOMSMATH_HOSTDEVICE Color3 (T a) noexcept
 Initialize to (a a a)
 
constexpr ATOMSMATH_HOSTDEVICE Color3 (T a, T b, T c) noexcept
 Initialize to (a b c)
 
constexpr ATOMSMATH_HOSTDEVICE Color3 (const Color3 &c) noexcept
 Construct from Color3.
 
template<class S >
constexpr ATOMSMATH_HOSTDEVICE Color3 (const Vec3< S > &v) noexcept
 Construct from Vec3.
 
 ~Color3 ()=default
 Destructor.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color3operator= (const Color3 &c) noexcept
 Component-wise assignment.
 
Arithmetic
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color3operator+= (const Color3 &c) noexcept
 Component-wise addition.
 
constexpr ATOMSMATH_HOSTDEVICE Color3 operator+ (const Color3 &c) const noexcept
 Component-wise addition.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color3operator-= (const Color3 &c) noexcept
 Component-wise subtraction.
 
constexpr ATOMSMATH_HOSTDEVICE Color3 operator- (const Color3 &c) const noexcept
 Component-wise subtraction.
 
constexpr ATOMSMATH_HOSTDEVICE Color3 operator- () const noexcept
 Component-wise multiplication by -1.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color3negate () noexcept
 Component-wise multiplication by -1.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color3operator*= (const Color3 &c) noexcept
 Component-wise multiplication.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color3operator*= (T a) noexcept
 Component-wise multiplication.
 
constexpr ATOMSMATH_HOSTDEVICE Color3 operator* (const Color3 &c) const noexcept
 Component-wise multiplication.
 
constexpr ATOMSMATH_HOSTDEVICE Color3 operator* (T a) const noexcept
 Component-wise multiplication.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color3operator/= (const Color3 &c) noexcept
 Component-wise division.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color3operator/= (T a) noexcept
 Component-wise division.
 
constexpr ATOMSMATH_HOSTDEVICE Color3 operator/ (const Color3 &c) const noexcept
 Component-wise division.
 
constexpr ATOMSMATH_HOSTDEVICE Color3 operator/ (T a) const noexcept
 Component-wise division.
 
- Public Member Functions inherited from Vec3< T >
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 T & operator[] (int i) noexcept
 Element access by index.

 
constexpr ATOMSMATH_HOSTDEVICE const T & operator[] (int i) const noexcept
 Element access by index.

 
short length () const noexcept=delete
 
const Vec3< short > & normalize () noexcept=delete
 
const Vec3< short > & normalizeExc ()=delete
 
const Vec3< short > & normalizeNonNull () noexcept=delete
 
Vec3< short > normalized () const noexcept=delete
 
Vec3< short > normalizedExc () const=delete
 
Vec3< short > normalizedNonNull () const noexcept=delete
 
int length () const noexcept=delete
 
const Vec3< int > & normalize () noexcept=delete
 
const Vec3< int > & normalizeExc ()=delete
 
const Vec3< int > & normalizeNonNull () noexcept=delete
 
Vec3< int > normalized () const noexcept=delete
 
Vec3< int > normalizedExc () const=delete
 
Vec3< int > normalizedNonNull () const noexcept=delete
 
template<class S >
constexpr Vec3 (const Vec3< S > &v) noexcept
 
template<class S >
constexpr Vec3 (const Vec4< S > &v) noexcept
 
template<class S >
void setValue (S a, S b, S c) noexcept
 
template<class S >
void setValue (const Vec3< S > &v) noexcept
 
template<class S >
void getValue (S &a, S &b, S &c) const noexcept
 
template<class S >
void getValue (Vec3< S > &v) const noexcept
 
template<class S >
constexpr bool operator== (const Vec3< S > &v) const noexcept
 
template<class S >
constexpr bool operator!= (const Vec3< S > &v) const noexcept
 
ATOMSMATH_HOSTDEVICE Vec3 () noexcept
 Uninitialized by default.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 (T a) noexcept
 Initialize to a scalar (a,a,a)
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 (T a, T b, T c) noexcept
 Initialize to given elements (a,b,c)
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 (const Vec3 &v) noexcept
 Copy constructor.
 
template<class S >
constexpr ATOMSMATH_HOSTDEVICE Vec3 (const Vec3< S > &v) noexcept
 Construct from Vec3 of another base type.
 
template<class S >
constexpr ATOMSMATH_HOSTDEVICE Vec3 (const Vec4< S > &v) noexcept
 
template<class S >
ATOMSMATH_CONSTEXPR14 Vec3 (const Vec4< S > &v, InfException)
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3operator= (const Vec3 &v) noexcept
 Assignment.
 
 ~Vec3 () noexcept=default
 Destructor.
 
template<class S >
ATOMSMATH_HOSTDEVICE void setValue (S a, S b, S c) noexcept
 Set the value.
 
template<class S >
ATOMSMATH_HOSTDEVICE void setValue (const Vec3< S > &v) noexcept
 Set the value.
 
template<class S >
ATOMSMATH_HOSTDEVICE void getValue (S &a, S &b, S &c) const noexcept
 Return the value in a, b, and c
 
template<class S >
ATOMSMATH_HOSTDEVICE void getValue (Vec3< S > &v) const noexcept
 Return the value in v
 
ATOMSMATH_HOSTDEVICE T * getValue () noexcept
 Return a raw pointer to the array of values.
 
ATOMSMATH_HOSTDEVICE const T * getValue () const noexcept
 Return a raw pointer to the array of values.
 
template<class S >
constexpr ATOMSMATH_HOSTDEVICE bool operator== (const Vec3< S > &v) const noexcept
 Equality.
 
template<class S >
constexpr ATOMSMATH_HOSTDEVICE bool operator!= (const Vec3< S > &v) const noexcept
 Inequality.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool equalWithAbsError (const Vec3< T > &v, T e) const noexcept
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool equalWithRelError (const Vec3< T > &v, T e) const noexcept
 
constexpr ATOMSMATH_HOSTDEVICE T dot (const Vec3 &v) const noexcept
 Dot product.
 
constexpr ATOMSMATH_HOSTDEVICE T operator^ (const Vec3 &v) const noexcept
 Dot product.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 cross (const Vec3 &v) const noexcept
 Right-handed cross product.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3operator%= (const Vec3 &v) noexcept
 Right-handed cross product.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 operator% (const Vec3 &v) const noexcept
 Right-handed cross product.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3operator+= (const Vec3 &v) noexcept
 Component-wise addition.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 operator+ (const Vec3 &v) const noexcept
 Component-wise addition.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3operator-= (const Vec3 &v) noexcept
 Component-wise subtraction.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 operator- (const Vec3 &v) const noexcept
 Component-wise subtraction.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 operator- () const noexcept
 Component-wise multiplication by -1.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3negate () noexcept
 Component-wise multiplication by -1.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3operator*= (const Vec3 &v) noexcept
 Component-wise multiplication.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3operator*= (T a) noexcept
 Component-wise multiplication.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 operator* (const Vec3 &v) const noexcept
 Component-wise multiplication.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 operator* (T a) const noexcept
 Component-wise multiplication.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3operator/= (const Vec3 &v) noexcept
 Component-wise division.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Vec3operator/= (T a) noexcept
 Component-wise division.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 operator/ (const Vec3 &v) const noexcept
 Component-wise division.
 
constexpr ATOMSMATH_HOSTDEVICE Vec3 operator/ (T a) const noexcept
 Component-wise division.
 
ATOMSMATH_HOSTDEVICE T length () const noexcept
 Return the Euclidean norm.
 
constexpr ATOMSMATH_HOSTDEVICE T length2 () const noexcept
 
ATOMSMATH_HOSTDEVICE const Vec3normalize () noexcept
 Normalize in place. If length()==0, return a null vector.
 
const Vec3normalizeExc ()
 Normalize in place. If length()==0, throw an exception.
 
ATOMSMATH_HOSTDEVICE const Vec3normalizeNonNull () noexcept
 
ATOMSMATH_HOSTDEVICE Vec3< T > normalized () const noexcept
 Return a normalized vector. Does not modify *this.
 
Vec3< T > normalizedExc () const
 
ATOMSMATH_HOSTDEVICE Vec3< T > normalizedNonNull () const noexcept
 

Additional Inherited Members

- Public Types inherited from Vec3< T >
typedef T BaseType
 
- Static Public Member Functions inherited from Vec3< T >
constexpr static ATOMSMATH_HOSTDEVICE unsigned int dimensions () noexcept
 Return the number of dimensions, i.e. 3.
 
constexpr static ATOMSMATH_HOSTDEVICE T baseTypeLowest () noexcept
 Largest possible negative value.
 
constexpr static ATOMSMATH_HOSTDEVICE T baseTypeMax () noexcept
 Largest possible positive value.
 
constexpr static ATOMSMATH_HOSTDEVICE T baseTypeSmallest () noexcept
 Smallest possible positive value.
 
constexpr static ATOMSMATH_HOSTDEVICE T baseTypeEpsilon () noexcept
 Smallest possible e for which 1+e != 1.
 
- Public Attributes inherited from Vec3< T >
x
 
y
 
z
 

Detailed Description

template<class T>
class Color3< T >

3-channel color class that inherits from Vec3.

This class does not impose interpretation on the channels, which can represent either rgb or hsv color values.

Note: because Color3 inherits from Vec3, its member fields are called x, y, and z.


The documentation for this class was generated from the following file: