#include <HxVec3Int.h>
Inheritance diagram for HxVec3Int::
Constructors | |
HxVec3Int () | |
Default constructor. More... | |
HxVec3Int (int x, int y, int z) | |
Conversion from native type. More... | |
HxVec3Int (const HxVec3Int &v) | |
Copy constructor. More... | |
Inquiry | |
int | dim () const |
Dimensionality. More... | |
int | x () const |
Value of first element. More... | |
int | y () const |
Value of second element. More... | |
int | z () const |
Value of third element. More... | |
int | getValue (int dimension) const |
Element in given dimension. More... | |
void | setValue (int dimension, int value) |
Conversion | |
operator HxScalarInt () const | |
Cast to HxScalarInt. More... | |
operator HxScalarDouble () const | |
Cast to HxScalarDouble. More... | |
operator HxVec2Int () const | |
Cast to HxVec2Int. More... | |
operator HxVec2Double () const | |
Cast to HxVec2Double. More... | |
operator HxVec3Double () const | |
Cast to HxVec3Double. More... | |
operator HxComplex () const | |
Cast to HxComplex. More... | |
Operators | |
Mathematical definition: Binary operations on pixel values | |
int | operator== (const HxVec3Int &v) const |
Equal. More... | |
int | operator!= (const HxVec3Int &v) const |
Not equal. More... | |
int | operator< (const HxVec3Int &v) const |
Less than. More... | |
int | operator<= (const HxVec3Int &v) const |
Less equal. More... | |
int | operator> (const HxVec3Int &v) const |
Greater than. More... | |
int | operator>= (const HxVec3Int &v) const |
Greater equal. More... | |
const HxVec3Int | SMALL_VAL = HxVec3Int(0, 0, 0) |
A small value w.r.t to the comparison operators "<" and ">". More... | |
const HxVec3Int | LARGE_VAL = HxVec3Int(200000000, 200000000, 200000000) |
A large value w.r.t to the comparison operators "<" and ">". More... | |
Unary operations | |
Mathematical definition: Unary operations on pixel values | |
HxVec3Int | operator- () const |
Negation. More... | |
HxVec3Int | complement () const |
Complement. More... | |
HxVec3Int | abs () const |
Absolute value. More... | |
HxVec3Int | ceil () const |
Ceiling. More... | |
HxVec3Int | floor () const |
Floor. More... | |
HxVec3Int | round () const |
Round. More... | |
HxScalarInt | sum () const |
Sum. More... | |
HxScalarInt | product () const |
Product. More... | |
HxScalarInt | min () const |
Minimum. More... | |
HxScalarInt | max () const |
Maximum. More... | |
HxScalarInt | norm1 () const |
L1 norm. More... | |
HxScalarDouble | norm2 () const |
L2 norm. More... | |
HxScalarInt | normInf () const |
L infinity norm. More... | |
HxVec3Double | sqrt () const |
Square root. More... | |
HxVec3Double | sin () const |
Sine. More... | |
HxVec3Double | cos () const |
Cosine. More... | |
HxVec3Double | tan () const |
Tangent. More... | |
HxVec3Double | asin () const |
Arc sine. More... | |
HxVec3Double | acos () const |
Arc cosine. More... | |
HxVec3Double | atan () const |
Arc tangent. More... | |
HxScalarDouble | atan2 () const |
Arc tangent. More... | |
HxVec3Double | sinh () const |
Hyperbolic sine. More... | |
HxVec3Double | cosh () const |
Hyperbolic cosine. More... | |
HxVec3Double | tanh () const |
Hyperbolic tangent. More... | |
HxVec3Double | exp () const |
Exponent. More... | |
HxVec3Double | log () const |
Natural logarithm. More... | |
HxVec3Double | log10 () const |
Base 10 logarithm. More... | |
Binary operations | |
Mathematical definition: Binary operations on pixel values | |
HxVec3Int & | operator+= (const HxVec3Int &v) |
Addition and assignment. More... | |
HxVec3Int & | operator-= (const HxVec3Int &v) |
Subtraction and assignment. More... | |
HxVec3Int & | operator *= (const HxVec3Int &v) |
Multiplication and assignment. More... | |
HxVec3Int & | operator/= (const HxVec3Int &v) |
Division and assignment. More... | |
HxVec3Int | min (const HxVec3Int &v) const |
Minimum. More... | |
HxVec3Int & | minAssign (const HxVec3Int &v) |
Minimum and assignment. More... | |
HxVec3Int | max (const HxVec3Int &v) const |
Maximum. More... | |
HxVec3Int & | maxAssign (const HxVec3Int &v) |
Maximum and assignment. More... | |
HxVec3Int | inf (const HxVec3Int &v) const |
Infimum. More... | |
HxVec3Int & | infAssign (const HxVec3Int &v) |
Infimum and assignment. More... | |
HxVec3Int | sup (const HxVec3Int &v) const |
Supremum. More... | |
HxVec3Int & | supAssign (const HxVec3Int &v) |
Supremum and assignment. More... | |
HxVec3Int | pow (const HxVec3Int &v) const |
Power. More... | |
HxVec3Int | mod (const HxVec3Int &v) const |
Modulo. More... | |
HxVec3Int | and (const HxVec3Int &v) const |
And. More... | |
HxVec3Int | or (const HxVec3Int &v) const |
Or. More... | |
HxVec3Int | xor (const HxVec3Int &v) const |
Xor. More... | |
HxVec3Int | leftShift (const HxVec3Int &v) const |
Left shift. More... | |
HxVec3Int | rightShift (const HxVec3Int &v) const |
Right shift. More... | |
HxScalarInt | dot (const HxVec3Int &v) const |
Dot product. More... | |
HxVec3Int | cross (const HxVec3Int &v) const |
Cross product. More... | |
HxVec3Int | operator+ (const HxVec3Int &v1, const HxVec3Int &v2) |
Addition. More... | |
HxVec3Int | operator- (const HxVec3Int &v1, const HxVec3Int &v2) |
Subtraction. More... | |
HxVec3Int | operator * (const HxVec3Int &v1, const HxVec3Int &v2) |
Multiplication. More... | |
HxVec3Int | operator/ (const HxVec3Int &v1, const HxVec3Int &v2) |
Division. More... | |
Output | |
STD_OSTREAM & | put (STD_OSTREAM &os) const |
Print value on stream. More... | |
HxString | toString () const |
Value as a string. More... | |
Public Methods | |
void * | operator new (size_t, void *=0) |
|
Default constructor.
00322 { 00323 } |
|
Conversion from native type.
|
|
Copy constructor.
|
|
Dimensionality.
00349 { 00350 return 3; 00351 } |
|
Value of first element.
00355 { 00356 return _values[0]; 00357 } |
|
Value of second element.
00361 { 00362 return _values[1]; 00363 } |
|
Value of third element.
00367 { 00368 return _values[2]; 00369 } |
|
Element in given dimension.
00373 { 00374 return _values[dimension - 1]; 00375 } |
|
Cast to HxScalarInt.
00028 { 00029 return _values[0]; 00030 } |
|
Cast to HxScalarDouble.
00033 { 00034 return (double) _values[0]; 00035 } |
|
Cast to HxVec2Int.
00039 { 00040 return HxVec2Int(_values[0], _values[1]); 00041 } |
|
Cast to HxVec2Double.
00044 { 00045 return HxVec2Double(_values[0], _values[1]); 00046 } |
|
Cast to HxVec3Double.
00049 { 00050 return HxVec3Double(_values[0], _values[1], _values[2]); 00051 } |
|
Cast to HxComplex.
00054 { 00055 return HxComplex(_values[0], _values[1]); 00056 } |
|
Equal.
|
|
Not equal.
|
|
Less than.
|
|
Less equal.
|
|
Greater than.
|
|
Greater equal.
|
|
Negation.
00427 { 00428 return HxVec3Int(-_values[0], -_values[1], -_values[2]); 00429 } |
|
Complement.
00433 { 00434 return HxVec3Int(~_values[0], ~_values[1], ~_values[2]); 00435 } |
|
Absolute value.
|
|
Ceiling.
00445 { 00446 return *this; 00447 } |
|
Floor.
00451 { 00452 return *this; 00453 } |
|
Round.
00457 { 00458 return *this; 00459 } |
|
Sum.
00463 { 00464 return _values[0] + _values[1] + _values[2]; 00465 } |
|
Product.
00469 { 00470 return _values[0] * _values[1] * _values[2]; 00471 } |
|
Minimum.
00060 { 00061 return (_values[0] < _values[1]) ? 00062 ((_values[0] < _values[2]) ? _values[0] : _values[2]) : 00063 ((_values[1] < _values[2]) ? _values[1] : _values[2]); 00064 } |
|
Maximum.
00068 { 00069 return (_values[0] > _values[1]) ? 00070 ((_values[0] > _values[2]) ? _values[0] : _values[2]) : 00071 ((_values[1] > _values[2]) ? _values[1] : _values[2]); 00072 } |
|
L1 norm.
00076 { 00077 return ::abs(_values[0]) + ::abs(_values[1]) + ::abs(_values[2]); 00078 } |
|
L2 norm.
00082 { 00083 return ::sqrt(double(_values[0])*_values[0] + 00084 double(_values[1])*_values[1] + 00085 double(_values[2])*_values[2]); 00086 } |
|
L infinity norm.
00090 { 00091 return (::abs(_values[0]) > ::abs(_values[1])) ? 00092 ((::abs(_values[0]) > ::abs(_values[2])) ? ::abs(_values[0]) : 00093 ::abs(_values[2])) : 00094 ((::abs(_values[1]) > ::abs(_values[2])) ? ::abs(_values[1]) : 00095 ::abs(_values[2])); 00096 } |
|
Square root.
00100 { 00101 return HxVec3Double(::sqrt(double(_values[0])), 00102 ::sqrt(double(_values[1])), 00103 ::sqrt(double(_values[2]))); 00104 } |
|
Sine.
00108 { 00109 return HxVec3Double(::sin(double(_values[0])), 00110 ::sin(double(_values[1])), 00111 ::sin(double(_values[2]))); 00112 } |
|
Cosine.
00116 { 00117 return HxVec3Double(::cos(double(_values[0])), 00118 ::cos(double(_values[1])), 00119 ::cos(double(_values[2]))); 00120 } |
|
Tangent.
00124 { 00125 return HxVec3Double(::tan(double(_values[0])), 00126 ::tan(double(_values[1])), 00127 ::tan(double(_values[2]))); 00128 } |
|
Arc sine.
00132 { 00133 return HxVec3Double(::asin(double(_values[0])), 00134 ::asin(double(_values[1])), 00135 ::asin(double(_values[2]))); 00136 } |
|
Arc cosine.
00140 { 00141 return HxVec3Double(::acos(double(_values[0])), 00142 ::acos(double(_values[1])), 00143 ::acos(double(_values[2]))); 00144 } |
|
Arc tangent.
00154 { 00155 return HxVec3Double(::atan(double(_values[0])), 00156 ::atan(double(_values[1])), 00157 ::atan(double(_values[2]))); 00158 } |
|
Arc tangent.
00148 { 00149 return HxScalarDouble(::atan2(double(_values[0]), double(_values[1]))); 00150 } |
|
Hyperbolic sine.
00162 { 00163 return HxVec3Double(::sinh(double(_values[0])), 00164 ::sinh(double(_values[1])), 00165 ::sinh(double(_values[2]))); 00166 } |
|
Hyperbolic cosine.
00170 { 00171 return HxVec3Double(::cosh(double(_values[0])), 00172 ::cosh(double(_values[1])), 00173 ::cosh(double(_values[2]))); 00174 } |
|
Hyperbolic tangent.
00178 { 00179 return HxVec3Double(::tanh(double(_values[0])), 00180 ::tanh(double(_values[1])), 00181 ::tanh(double(_values[2]))); 00182 } |
|
Exponent.
00186 { 00187 return HxVec3Double(::exp(double(_values[0])), 00188 ::exp(double(_values[1])), 00189 ::exp(double(_values[2]))); 00190 } |
|
Natural logarithm.
00194 { 00195 return HxVec3Double(::log(double(_values[0])), 00196 ::log(double(_values[1])), 00197 ::log(double(_values[2]))); 00198 } |
|
Base 10 logarithm.
00202 { 00203 return HxVec3Double(::log10(double(_values[0])), 00204 ::log10(double(_values[1])), 00205 ::log10(double(_values[2]))); 00206 } |
|
Addition and assignment.
|
|
Subtraction and assignment.
|
|
Multiplication and assignment.
|
|
Division and assignment.
|
|
Minimum.
00543 { 00544 return (operator<(v)) ? (*this) : v; 00545 } |
|
Minimum and assignment.
00549 { 00550 if (operator<(v)) 00551 return *this; 00552 operator=(v); 00553 return *this; 00554 } |
|
Maximum.
00558 { 00559 return (operator>(v)) ? (*this) : v; 00560 } |
|
Maximum and assignment.
00564 { 00565 if (operator>(v)) 00566 return *this; 00567 operator=(v); 00568 return *this; 00569 } |
|
Infimum.
|
|
Infimum and assignment.
|
|
Supremum.
|
|
Supremum and assignment.
|
|
Power.
|
|
Modulo.
|
|
And.
|
|
Or.
|
|
Xor.
|
|
Left shift.
|
|
Right shift.
|
|
Dot product.
|
|
Cross product.
|
|
Print value on stream. For global operator<<
00218 { 00219 return os << "(" << _values[0] << "," << _values[1] << "," << 00220 _values[2] << ")"; 00221 } |
|
Value as a string.
00224 { 00225 return HxString("(") + makeString(_values[0]) + ", " 00226 + makeString(_values[1]) + ", " 00227 + makeString(_values[2]) + ")"; 00228 } |
|
Addition.
|
|
Subtraction.
|
|
Multiplication.
|
|
Division.
|
|
A small value w.r.t to the comparison operators "<" and ">". Not actually the minimum to avoid overflow. |
|
A large value w.r.t to the comparison operators "<" and ">". Not actually the maximum to avoid overflow. |