Generic 3-components vector. To be used as RGB color pixel or XYZ 3D-point. The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.).
More...
|
| constexpr | NCollection_Vec3 () noexcept |
| | Empty constructor. Construct the zero vector.
|
| |
| constexpr | NCollection_Vec3 (Element_t theValue) noexcept |
| | Initialize ALL components of vector within specified value.
|
| |
| constexpr | NCollection_Vec3 (const Element_t theX, const Element_t theY, const Element_t theZ) noexcept |
| | Per-component constructor.
|
| |
| constexpr | NCollection_Vec3 (const NCollection_Vec2< Element_t > &theVec2, Element_t theZ=Element_t(0)) noexcept |
| | Constructor from 2-components vector + optional 3rd value.
|
| |
| template<typename OtherElement_t > |
| constexpr | NCollection_Vec3 (const NCollection_Vec3< OtherElement_t > &theOtherVec3) noexcept |
| | Conversion constructor (explicitly converts some 3-component vector with other element type to a new 3-component vector with the element type Element_t, whose elements are static_cast'ed corresponding elements of theOtherVec3 vector)
|
| |
| constexpr void | SetValues (const Element_t theX, const Element_t theY, const Element_t theZ) noexcept |
| | Assign new values to the vector.
|
| |
| constexpr void | SetValues (const NCollection_Vec2< Element_t > &theVec2, Element_t theZ) noexcept |
| | Assign new values to the vector.
|
| |
| constexpr Element_t | x () const noexcept |
| | Alias to 1st component as X coordinate in XYZ.
|
| |
| constexpr Element_t | r () const noexcept |
| | Alias to 1st component as RED channel in RGB.
|
| |
| constexpr Element_t | y () const noexcept |
| | Alias to 2nd component as Y coordinate in XYZ.
|
| |
| constexpr Element_t | g () const noexcept |
| | Alias to 2nd component as GREEN channel in RGB.
|
| |
| constexpr Element_t | z () const noexcept |
| | Alias to 3rd component as Z coordinate in XYZ.
|
| |
| constexpr Element_t | b () const noexcept |
| | Alias to 3rd component as BLUE channel in RGB.
|
| |
| constexpr Element_t & | x () noexcept |
| | Alias to 1st component as X coordinate in XYZ.
|
| |
| constexpr Element_t & | r () noexcept |
| | Alias to 1st component as RED channel in RGB.
|
| |
| constexpr Element_t & | y () noexcept |
| | Alias to 2nd component as Y coordinate in XYZ.
|
| |
| constexpr Element_t & | g () noexcept |
| | Alias to 2nd component as GREEN channel in RGB.
|
| |
| constexpr Element_t & | z () noexcept |
| | Alias to 3rd component as Z coordinate in XYZ.
|
| |
| constexpr Element_t & | b () noexcept |
| | Alias to 3rd component as BLUE channel in RGB.
|
| |
| constexpr bool | IsEqual (const NCollection_Vec3 &theOther) const noexcept |
| | Check this vector with another vector for equality (without tolerance!).
|
| |
| constexpr bool | operator== (const NCollection_Vec3 &theOther) const noexcept |
| | Check this vector with another vector for equality (without tolerance!).
|
| |
| constexpr bool | operator!= (const NCollection_Vec3 &theOther) const noexcept |
| | Check this vector with another vector for non-equality (without tolerance!).
|
| |
| constexpr const Element_t * | GetData () const noexcept |
| | Raw access to the data (for OpenGL exchange).
|
| |
| constexpr Element_t * | ChangeData () noexcept |
| |
| constexpr | operator const Element_t * () const noexcept |
| |
| constexpr | operator Element_t * () noexcept |
| |
| constexpr NCollection_Vec3 & | operator+= (const NCollection_Vec3 &theAdd) noexcept |
| | Compute per-component summary.
|
| |
| constexpr NCollection_Vec3 | operator- () const noexcept |
| | Unary -.
|
| |
| constexpr NCollection_Vec3 & | operator-= (const NCollection_Vec3 &theDec) noexcept |
| | Compute per-component subtraction.
|
| |
| constexpr void | Multiply (const Element_t theFactor) noexcept |
| | Compute per-component multiplication by scale factor.
|
| |
| constexpr NCollection_Vec3 & | operator*= (const NCollection_Vec3 &theRight) noexcept |
| | Compute per-component multiplication.
|
| |
| constexpr NCollection_Vec3 & | operator*= (const Element_t theFactor) noexcept |
| | Compute per-component multiplication by scale factor.
|
| |
| constexpr NCollection_Vec3 | operator* (const Element_t theFactor) const noexcept |
| | Compute per-component multiplication by scale factor.
|
| |
| constexpr NCollection_Vec3 | Multiplied (const Element_t theFactor) const noexcept |
| | Compute per-component multiplication by scale factor.
|
| |
| constexpr NCollection_Vec3 | cwiseMin (const NCollection_Vec3 &theVec) const noexcept |
| | Compute component-wise minimum of two vectors.
|
| |
| constexpr NCollection_Vec3 | cwiseMax (const NCollection_Vec3 &theVec) const noexcept |
| | Compute component-wise maximum of two vectors.
|
| |
| NCollection_Vec3 | cwiseAbs () const noexcept |
| | Compute component-wise modulus of the vector.
|
| |
| constexpr Element_t | maxComp () const noexcept |
| | Compute maximum component of the vector.
|
| |
| constexpr Element_t | minComp () const noexcept |
| | Compute minimum component of the vector.
|
| |
| constexpr NCollection_Vec3 & | operator/= (const Element_t theInvFactor) |
| | Compute per-component division by scale factor.
|
| |
| constexpr NCollection_Vec3 & | operator/= (const NCollection_Vec3 &theRight) |
| | Compute per-component division.
|
| |
| constexpr NCollection_Vec3 | operator/ (const Element_t theInvFactor) const |
| | Compute per-component division by scale factor.
|
| |
| constexpr Element_t | Dot (const NCollection_Vec3 &theOther) const noexcept |
| | Computes the dot product.
|
| |
| Element_t | Modulus () const noexcept |
| | Computes the vector modulus (magnitude, length).
|
| |
| constexpr Element_t | SquareModulus () const noexcept |
| | Computes the square of vector modulus (magnitude, length). This method may be used for performance tricks.
|
| |
| void | Normalize () |
| | Normalize the vector.
|
| |
| NCollection_Vec3 | Normalized () const |
| | Normalize the vector.
|
| |
| void | DumpJson (Standard_OStream &theOStream, int theDepth=-1) const |
| | Dumps the content of me into the stream.
|
| |
Generic 3-components vector. To be used as RGB color pixel or XYZ 3D-point. The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.).