#include <HxVec3Double.h>
Constructors | |
HxVec3Double () | |
Default constructor. More... | |
HxVec3Double (double x, double y, double z) | |
Conversion from native type. More... | |
HxVec3Double (const HxVec3Double &v) | |
Copy constructor. More... | |
Inquiry | |
int | dim () const |
Dimensionality. More... | |
double | x () const |
Value of first element. More... | |
double | y () const |
Value of second element. More... | |
double | z () const |
Value of third element. More... | |
double | getValue (int dimension) const |
Element in given dimension. More... | |
void | setValue (int dimension, double 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 HxVec3Int () const | |
Cast to HxVec3Int. More... | |
operator HxComplex () const | |
Cast to HxComplex. More... | |
Operators | |
Mathematical definition: Binary operations on pixel values | |
int | operator== (const HxVec3Double &v) const |
Equal. More... | |
int | operator!= (const HxVec3Double &v) const |
Not equal. More... | |
int | operator< (const HxVec3Double &v) const |
Less than. More... | |
int | operator<= (const HxVec3Double &v) const |
Less equal. More... | |
int | operator> (const HxVec3Double &v) const |
Greater than. More... | |
int | operator>= (const HxVec3Double &v) const |
Greater equal. More... | |
const HxVec3Double | SMALL_VAL = HxVec3Double(0, 0, 0) |
A small value w.r.t to the comparison operators "<" and ">". More... | |
const HxVec3Double | LARGE_VAL = HxVec3Double(1e300, 1e300, 1e300) |
A large value w.r.t to the comparison operators "<" and ">". More... | |
Unary operations | |
Mathematical definition: Unary operations on pixel values | |
HxVec3Double | operator- () const |
Negation. More... | |
HxVec3Double | complement () const |
Complement. More... | |
HxVec3Double | abs () const |
Absolute value. More... | |
HxVec3Double | ceil () const |
Ceiling. More... | |
HxVec3Double | floor () const |
Floor. More... | |
HxVec3Double | round () const |
Round. More... | |
HxScalarDouble | sum () const |
Sum. More... | |
HxScalarDouble | product () const |
Product. More... | |
HxScalarDouble | min () const |
Minimum. More... | |
HxScalarDouble | max () const |
Maximum. More... | |
HxScalarDouble | norm1 () const |
L1 norm. More... | |
HxScalarDouble | norm2 () const |
L2 norm. More... | |
HxScalarDouble | 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 | |
HxVec3Double & | operator+= (const HxVec3Double &v) |
Addition and assignment. More... | |
HxVec3Double & | operator-= (const HxVec3Double &v) |
Subtraction and assignment. More... | |
HxVec3Double & | operator *= (const HxVec3Double &v) |
Multiplication and assignment. More... | |
HxVec3Double & | operator/= (const HxVec3Double &v) |
Division and assignment. More... | |
HxVec3Double | min (const HxVec3Double &v) const |
Minimum. More... | |
HxVec3Double & | minAssign (const HxVec3Double &v) |
Minimum and assignment. More... | |
HxVec3Double | max (const HxVec3Double &v) const |
Maximum. More... | |
HxVec3Double & | maxAssign (const HxVec3Double &v) |
Maximum and assignment. More... | |
HxVec3Double | inf (const HxVec3Double &v) const |
Infimum. More... | |
HxVec3Double & | infAssign (const HxVec3Double &v) |
Infimum and assignment. More... | |
HxVec3Double | sup (const HxVec3Double &v) const |
Supremum. More... | |
HxVec3Double & | supAssign (const HxVec3Double &v) |
Supremum and assignment. More... | |
HxVec3Double | pow (const HxVec3Double &v) const |
Power. More... | |
HxVec3Double | mod (const HxVec3Double &v) const |
Modulo. More... | |
HxVec3Double | and (const HxVec3Double &v) const |
And. More... | |
HxVec3Double | or (const HxVec3Double &v) const |
Or. More... | |
HxVec3Double | xor (const HxVec3Double &v) const |
Xor. More... | |
HxVec3Double | leftShift (const HxVec3Double &v) const |
Left shift. More... | |
HxVec3Double | rightShift (const HxVec3Double &v) const |
Right shift. More... | |
HxScalarDouble | dot (const HxVec3Double &v) const |
Dot product. More... | |
HxVec3Double | cross (const HxVec3Double &v) const |
Cross product. More... | |
HxVec3Double | operator+ (const HxVec3Double &v1, const HxVec3Double &v2) |
Addition. More... | |
HxVec3Double | operator- (const HxVec3Double &v1, const HxVec3Double &v2) |
Subtraction. More... | |
HxVec3Double | operator * (const HxVec3Double &v1, const HxVec3Double &v2) |
Multiplication. More... | |
HxVec3Double | operator/ (const HxVec3Double &v1, const HxVec3Double &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.
00323 { 00324 } |
|
Conversion from native type.
|
|
Copy constructor.
|
|
Dimensionality.
00350 { 00351 return 3; 00352 } |
|
Value of first element.
00356 { 00357 return _values[0]; 00358 } |
|
Value of second element.
00362 { 00363 return _values[1]; 00364 } |
|
Value of third element.
00368 { 00369 return _values[2]; 00370 } |
|
Element in given dimension.
00374 { 00375 return _values[dimension - 1]; 00376 } |
|
Cast to HxScalarInt.
00028 { 00029 return (int) _values[0]; 00030 } |
|
Cast to HxScalarDouble.
00033 { 00034 return _values[0]; 00035 } |
|
Cast to HxVec2Int.
00038 { 00039 return HxVec2Int(int(_values[0]), int(_values[1])); 00040 } |
|
Cast to HxVec2Double.
00043 { 00044 return HxVec2Double(_values[0], _values[1]); 00045 } |
|
Cast to HxVec3Int.
00048 { 00049 return HxVec3Int(int(_values[0]), int(_values[1]), int(_values[2])); 00050 } |
|
Cast to HxComplex.
00053 { 00054 return HxComplex(_values[0], _values[1]); 00055 } |
|
Equal.
|
|
Not equal.
|
|
Less than.
|
|
Less equal.
|
|
Greater than.
|
|
Greater equal.
|
|
Negation.
00428 { 00429 return HxVec3Double(-_values[0], -_values[1], -_values[2]); 00430 } |
|
Complement.
00434 { 00435 return HxVec3Double(-_values[0], -_values[1], -_values[2]); 00436 } |
|
Absolute value.
00440 { 00441 return HxVec3Double(fabs(_values[0]), fabs(_values[1]), fabs(_values[2])); 00442 } |
|
Ceiling.
00446 { 00447 return HxVec3Double(::ceil(_values[0]), 00448 ::ceil(_values[1]), 00449 ::ceil(_values[2])); 00450 } |
|
Floor.
00454 { 00455 return HxVec3Double(::floor(_values[0]), 00456 ::floor(_values[1]), 00457 ::floor(_values[2])); 00458 } |
|
Round.
00462 { 00463 return HxVec3Double((int) (_values[0] + ((_values[0] >= 0) ? 0.5 : -0.5)), 00464 (int) (_values[1] + ((_values[1] >= 0) ? 0.5 : -0.5)), 00465 (int) (_values[2] + ((_values[2] >= 0) ? 0.5 : -0.5))); 00466 } |
|
Sum.
00470 { 00471 return _values[0] + _values[1] + _values[2]; 00472 } |
|
Product.
00476 { 00477 return _values[0] * _values[1] * _values[2]; 00478 } |
|
Minimum.
00059 { 00060 return (_values[0] < _values[1]) ? 00061 ((_values[0] < _values[2]) ? _values[0] : _values[2]) : 00062 ((_values[1] < _values[2]) ? _values[1] : _values[2]); 00063 } |
|
Maximum.
00067 { 00068 return (_values[0] > _values[1]) ? 00069 ((_values[0] > _values[2]) ? _values[0] : _values[2]) : 00070 ((_values[1] > _values[2]) ? _values[1] : _values[2]); 00071 } |
|
L1 norm.
00075 { 00076 return fabs(_values[0]) + fabs(_values[1]) + fabs(_values[2]); 00077 } |
|
L2 norm.
00081 { 00082 return ::sqrt(_values[0]*_values[0] + 00083 _values[1]*_values[1] + 00084 _values[2]*_values[2]); 00085 } |
|
L infinity norm.
00089 { 00090 return (fabs(_values[0]) > fabs(_values[1])) ? 00091 ((fabs(_values[0]) > fabs(_values[2])) ? fabs(_values[0]) : 00092 fabs(_values[2])) : 00093 ((fabs(_values[1]) > fabs(_values[2])) ? fabs(_values[1]) : 00094 fabs(_values[2])); 00095 } |
|
Square root.
00482 { 00483 return HxVec3Double(::sqrt(_values[0]), 00484 ::sqrt(_values[1]), 00485 ::sqrt(_values[2])); 00486 } |
|
Sine.
00490 { 00491 return HxVec3Double(::sin(_values[0]), 00492 ::sin(_values[1]), 00493 ::sin(_values[2])); 00494 } |
|
Cosine.
00498 { 00499 return HxVec3Double(::cos(_values[0]), 00500 ::cos(_values[1]), 00501 ::cos(_values[2])); 00502 } |
|
Tangent.
00506 { 00507 return HxVec3Double(::tan(_values[0]), 00508 ::tan(_values[1]), 00509 ::tan(_values[2])); 00510 } |
|
Arc sine.
00514 { 00515 return HxVec3Double(::asin(_values[0]), 00516 ::asin(_values[1]), 00517 ::asin(_values[2])); 00518 } |
|
Arc cosine.
00522 { 00523 return HxVec3Double(::acos(_values[0]), 00524 ::acos(_values[1]), 00525 ::acos(_values[2])); 00526 } |
|
Arc tangent.
00530 { 00531 return HxVec3Double(::atan(_values[0]), 00532 ::atan(_values[1]), 00533 ::atan(_values[2])); 00534 } |
|
Arc tangent.
00099 { 00100 return HxScalarDouble(::atan2(_values[0], _values[1])); 00101 } |
|
Hyperbolic sine.
00538 { 00539 return HxVec3Double(::sinh(_values[0]), 00540 ::sinh(_values[1]), 00541 ::sinh(_values[2])); 00542 } |
|
Hyperbolic cosine.
00546 { 00547 return HxVec3Double(::cosh(_values[0]), 00548 ::cosh(_values[1]), 00549 ::cosh(_values[2])); 00550 } |
|
Hyperbolic tangent.
00554 { 00555 return HxVec3Double(::tanh(_values[0]), 00556 ::tanh(_values[1]), 00557 ::tanh(_values[2])); 00558 } |
|
Exponent.
00562 { 00563 return HxVec3Double(::exp(_values[0]), 00564 ::exp(_values[1]), 00565 ::exp(_values[2])); 00566 } |
|
Natural logarithm.
00570 { 00571 return HxVec3Double(::log(_values[0]), 00572 ::log(_values[1]), 00573 ::log(_values[2])); 00574 } |
|
Base 10 logarithm.
00578 { 00579 return HxVec3Double(::log10(_values[0]), 00580 ::log10(_values[1]), 00581 ::log10(_values[2])); 00582 } |
|
Addition and assignment.
|
|
Subtraction and assignment.
|
|
Multiplication and assignment.
|
|
Division and assignment.
|
|
Minimum.
00654 { 00655 return (operator<(v)) ? (*this) : v; 00656 } |
|
Minimum and assignment.
00660 { 00661 if (operator<(v)) 00662 return *this; 00663 operator=(v); 00664 return *this; 00665 } |
|
Maximum.
00669 { 00670 return (operator>(v)) ? (*this) : v; 00671 } |
|
Maximum and assignment.
00675 { 00676 if (operator>(v)) 00677 return *this; 00678 operator=(v); 00679 return *this; 00680 } |
|
Infimum.
|
|
Infimum and assignment.
|
|
Supremum.
|
|
Supremum and assignment.
|
|
Power.
|
|
Modulo.
00726 { 00727 return (*this); 00728 } |
|
And.
00732 { 00733 return (*this); 00734 } |
|
Or.
00738 { 00739 return (*this); 00740 } |
|
Xor.
00744 { 00745 return (*this); 00746 } |
|
Left shift.
00750 { 00751 return (*this); 00752 } |
|
Right shift.
00756 { 00757 return (*this); 00758 } |
|
Dot product.
|
|
Cross product.
|
|
Print value on stream. For global operator<<
00113 { 00114 return os << "(" << _values[0] << "," << _values[1] << "," << 00115 _values[2] << ")"; 00116 } |
|
Value as a string.
00119 { 00120 return HxString("(") + makeString(_values[0]) + ", " 00121 + makeString(_values[1]) + ", " 00122 + makeString(_values[2]) + ")"; 00123 } |
|
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. |