Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The Vector4 class is a template class that implements a generic 4 components vector, see also vl::fvec4, vl::dvec4, vl::uvec4, vl::ivec4, vl::svec4, vl::usvec4, vl::bvec4, vl::ubvec4. More...
#include <Vector4.hpp>
Public Types | |
typedef T_Scalar | scalar_type |
typedef T_Scalar * | scalar_ptr_type |
Public Member Functions | |
Vector4 (const Vector4 &other) | |
Vector4 () | |
template<class T > | |
Vector4 (const T &other) | |
Vector4 (const scalar_ptr_type &pval) | |
Vector4 (T_Scalar val) | |
Vector4 (T_Scalar x, T_Scalar y, T_Scalar z, T_Scalar w) | |
Vector4 (const Vector3< T_Scalar > &v, T_Scalar w) | |
Vector4 (const Vector2< T_Scalar > &u, const Vector2< T_Scalar > &v) | |
T_Scalar * | ptr () |
const T_Scalar * | ptr () const |
const T_Scalar & | x () const |
const T_Scalar & | y () const |
const T_Scalar & | z () const |
const T_Scalar & | w () const |
T_Scalar & | x () |
T_Scalar & | y () |
T_Scalar & | z () |
T_Scalar & | w () |
const T_Scalar & | r () const |
const T_Scalar & | g () const |
const T_Scalar & | b () const |
const T_Scalar & | a () const |
T_Scalar & | r () |
T_Scalar & | g () |
T_Scalar & | b () |
T_Scalar & | a () |
const T_Scalar & | s () const |
const T_Scalar & | t () const |
const T_Scalar & | p () const |
const T_Scalar & | q () const |
T_Scalar & | s () |
T_Scalar & | t () |
T_Scalar & | p () |
T_Scalar & | q () |
Vector3< T_Scalar > | xyz () const |
Vector3< T_Scalar > | rgb () const |
Vector3< T_Scalar > | stp () const |
Vector2< T_Scalar > | xy () const |
Vector2< T_Scalar > | rg () const |
Vector2< T_Scalar > | st () const |
Vector4 | operator+ (const Vector4 &other) const |
Vector4 | operator- (const Vector4 &other) const |
Vector4 | operator* (const Vector4 &other) const |
Vector4 | operator/ (const Vector4 &other) const |
Vector4 | operator+ (T_Scalar val) const |
Vector4 | operator- (T_Scalar val) const |
Vector4 | operator* (T_Scalar val) const |
Vector4 | operator/ (T_Scalar val) const |
Vector4 | operator- () const |
Vector4 & | operator+= (const Vector4 &other) |
Vector4 & | operator-= (const Vector4 &other) |
Vector4 & | operator*= (const Vector4 &other) |
Vector4 & | operator/= (const Vector4 &other) |
Vector4 & | operator+= (T_Scalar val) |
Vector4 & | operator-= (T_Scalar val) |
Vector4 & | operator*= (T_Scalar val) |
Vector4 & | operator/= (T_Scalar val) |
Vector4 & | operator= (const Vector4 &other) |
Vector4 & | operator= (T_Scalar val) |
bool | operator== (const Vector4 &other) const |
bool | operator!= (const Vector4 &other) const |
bool | operator< (const Vector4 &other) const |
T_Scalar & | operator[] (unsigned i) |
const T_Scalar & | operator[] (unsigned i) const |
T_Scalar | length () const |
T_Scalar | lengthSquared () const |
bool | isNull () const |
const Vector4 & | normalize (T_Scalar *len=NULL) |
template<> | |
half | length () const |
template<> | |
half | lengthSquared () const |
Static Public Attributes | |
static const int | scalar_count = 4 |
Protected Attributes | |
T_Scalar | mScalar [scalar_count] |
The Vector4 class is a template class that implements a generic 4 components vector, see also vl::fvec4, vl::dvec4, vl::uvec4, vl::ivec4, vl::svec4, vl::usvec4, vl::bvec4, vl::ubvec4.
Definition at line 44 of file Vector4.hpp.
typedef T_Scalar* vl::Vector4< T_Scalar >::scalar_ptr_type |
Definition at line 48 of file Vector4.hpp.
typedef T_Scalar vl::Vector4< T_Scalar >::scalar_type |
Definition at line 47 of file Vector4.hpp.
|
inline |
Definition at line 50 of file Vector4.hpp.
|
inline |
Definition at line 51 of file Vector4.hpp.
Referenced by vl::Vector4< unsigned int >::operator*(), vl::Vector4< unsigned int >::operator+(), vl::Vector4< unsigned int >::operator-(), and vl::Vector4< unsigned int >::operator/().
|
inlineexplicit |
Definition at line 54 of file Vector4.hpp.
|
inlineexplicit |
Definition at line 62 of file Vector4.hpp.
|
inlineexplicit |
Definition at line 70 of file Vector4.hpp.
|
inlineexplicit |
Definition at line 75 of file Vector4.hpp.
|
inlineexplicit |
Definition at line 83 of file Vector4.hpp.
|
inlineexplicit |
Definition at line 91 of file Vector4.hpp.
|
inline |
Definition at line 115 of file Vector4.hpp.
Referenced by vl::Viewport::activate(), vl::OpenGLContextFormat::bitsPerPixel(), vlWin32::choosePixelFormat(), vl::Geometry::colorizePrimitives(), vl::AtomInfo::cpkColor(), vl::genRGBAVolume(), vl::PlyLoader::PlyElement::getColor(), vlEGL::EGLWindow::initEGLWindow(), vlGLFW::GLFWWindow::initGLFWWindow(), vlGLUT::GLUTWindow::initGLUTWindow(), vlQt4::Qt4Widget::initQt4Widget(), vlQt5::Qt5Widget::initQt5Widget(), vlQt6::Qt6Widget::initQt6Widget(), vlSDL::SDLWindow::initSDLWindow(), vl::isValidColor(), vl::makeColor(), vl::AtomInfo::rasmolColor(), vl::Clear::render_Implementation(), vl::Text::renderBackground(), vl::Text::renderBorder(), vl::Text::renderText(), vl::Material::setBackFlatColor(), vl::Material::setFrontFlatColor(), and vl::DaeLoader::setup_vl_Effect().
|
inline |
Definition at line 120 of file Vector4.hpp.
|
inline |
Definition at line 114 of file Vector4.hpp.
Referenced by vl::Viewport::activate(), vl::OpenGLContextFormat::bitsPerPixel(), vlWin32::choosePixelFormat(), vl::Geometry::colorizePrimitives(), vl::AtomInfo::cpkColor(), vl::genRGBAVolume(), vl::PlyLoader::PlyElement::getColor(), vlEGL::EGLWindow::initEGLWindow(), vlGLFW::GLFWWindow::initGLFWWindow(), vlGLUT::GLUTWindow::initGLUTWindow(), vlQt4::Qt4Widget::initQt4Widget(), vlQt5::Qt5Widget::initQt5Widget(), vlQt6::Qt6Widget::initQt6Widget(), vlSDL::SDLWindow::initSDLWindow(), vl::makeColor(), vl::max(), vl::min(), vl::AtomInfo::rasmolColor(), vl::Clear::render_Implementation(), vl::Text::renderBackground(), vl::Text::renderBorder(), vl::Text::renderText(), and vl::Image::sample().
|
inline |
Definition at line 119 of file Vector4.hpp.
|
inline |
Definition at line 113 of file Vector4.hpp.
Referenced by vl::Viewport::activate(), vl::OpenGLContextFormat::bitsPerPixel(), vlWin32::choosePixelFormat(), vl::Geometry::colorizePrimitives(), vl::AtomInfo::cpkColor(), vl::genRGBAVolume(), vl::PlyLoader::PlyElement::getColor(), vlEGL::EGLWindow::initEGLWindow(), vlGLFW::GLFWWindow::initGLFWWindow(), vlGLUT::GLUTWindow::initGLUTWindow(), vlQt4::Qt4Widget::initQt4Widget(), vlQt5::Qt5Widget::initQt5Widget(), vlQt6::Qt6Widget::initQt6Widget(), vlSDL::SDLWindow::initSDLWindow(), vl::makeColor(), vl::AtomInfo::rasmolColor(), vl::Clear::render_Implementation(), vl::Text::renderBackground(), vl::Text::renderBorder(), and vl::Text::renderText().
|
inline |
Definition at line 118 of file Vector4.hpp.
|
inline |
Definition at line 254 of file Vector4.hpp.
|
inline |
Definition at line 252 of file Vector4.hpp.
Referenced by vl::length(), and vl::Vector4< unsigned int >::normalize().
|
inline |
|
inline |
Definition at line 253 of file Vector4.hpp.
|
inline |
|
inline |
Definition at line 255 of file Vector4.hpp.
Referenced by vl::Array< bvec2, GLbyte, 2, GL_BYTE >::normalize(), and vl::normalize().
|
inline |
Definition at line 233 of file Vector4.hpp.
|
inline |
Definition at line 148 of file Vector4.hpp.
|
inline |
Definition at line 164 of file Vector4.hpp.
|
inline |
Definition at line 186 of file Vector4.hpp.
|
inline |
Definition at line 206 of file Vector4.hpp.
|
inline |
Definition at line 140 of file Vector4.hpp.
|
inline |
Definition at line 156 of file Vector4.hpp.
|
inline |
Definition at line 176 of file Vector4.hpp.
|
inline |
Definition at line 196 of file Vector4.hpp.
|
inline |
Definition at line 144 of file Vector4.hpp.
|
inline |
Definition at line 160 of file Vector4.hpp.
|
inline |
Definition at line 172 of file Vector4.hpp.
|
inline |
Definition at line 181 of file Vector4.hpp.
|
inline |
Definition at line 201 of file Vector4.hpp.
|
inline |
Definition at line 152 of file Vector4.hpp.
|
inline |
Definition at line 168 of file Vector4.hpp.
|
inline |
Definition at line 191 of file Vector4.hpp.
|
inline |
Definition at line 211 of file Vector4.hpp.
|
inline |
Definition at line 237 of file Vector4.hpp.
|
inline |
Definition at line 216 of file Vector4.hpp.
|
inline |
Definition at line 224 of file Vector4.hpp.
|
inline |
Definition at line 229 of file Vector4.hpp.
Referenced by vl::Vector4< unsigned int >::operator!=().
|
inline |
Definition at line 250 of file Vector4.hpp.
|
inline |
Definition at line 251 of file Vector4.hpp.
|
inline |
Definition at line 124 of file Vector4.hpp.
|
inline |
Definition at line 129 of file Vector4.hpp.
|
inline |
Definition at line 99 of file Vector4.hpp.
Referenced by vl::PatchParameter::apply(), vl::Light::apply(), vl::DaeLoader::generateGeometry(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::getAsVec4(), vl::Uniform::getUniform(), vl::GLSLProgram::getUniform(), vl::Uniform::getUniform4D(), vl::Uniform::getUniform4F(), vl::Uniform::getUniform4I(), vl::Uniform::getUniform4U(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::normalize(), vl::Text::render_Implementation(), vl::CoreText::renderBackground(), vl::CoreText::renderBorder(), vl::Text::renderText(), vl::CoreText::renderText(), vl::Uniform::setUniform(), and vl::Array< bvec2, GLbyte, 2, GL_BYTE >::transform().
|
inline |
Definition at line 100 of file Vector4.hpp.
|
inline |
Definition at line 125 of file Vector4.hpp.
|
inline |
Definition at line 130 of file Vector4.hpp.
|
inline |
Definition at line 112 of file Vector4.hpp.
Referenced by vl::Viewport::activate(), vl::OpenGLContextFormat::bitsPerPixel(), vlWin32::choosePixelFormat(), vl::Geometry::colorizePrimitives(), vl::AtomInfo::cpkColor(), vl::genGradientNormals(), vl::genRGBAVolume(), vl::PlyLoader::PlyElement::getColor(), vl::Terrain::init(), vlEGL::EGLWindow::initEGLWindow(), vlGLFW::GLFWWindow::initGLFWWindow(), vlGLUT::GLUTWindow::initGLUTWindow(), vlQt4::Qt4Widget::initQt4Widget(), vlQt5::Qt5Widget::initQt5Widget(), vlQt6::Qt6Widget::initQt6Widget(), vlSDL::SDLWindow::initSDLWindow(), vl::makeColor(), vl::AtomInfo::rasmolColor(), vl::Clear::render_Implementation(), vl::Text::renderBackground(), vl::Text::renderBorder(), vl::Text::renderText(), and vl::Image::sample().
|
inline |
Definition at line 117 of file Vector4.hpp.
|
inline |
Definition at line 137 of file Vector4.hpp.
|
inline |
Definition at line 133 of file Vector4.hpp.
Referenced by vl::DaeLoader::setup_vl_Effect().
|
inline |
Definition at line 122 of file Vector4.hpp.
Referenced by vl::VectorGraphics::popScissor().
|
inline |
Definition at line 127 of file Vector4.hpp.
|
inline |
Definition at line 138 of file Vector4.hpp.
|
inline |
Definition at line 134 of file Vector4.hpp.
|
inline |
Definition at line 123 of file Vector4.hpp.
Referenced by vl::VectorGraphics::popScissor().
|
inline |
Definition at line 128 of file Vector4.hpp.
|
inline |
Definition at line 105 of file Vector4.hpp.
Referenced by vl::abs(), vl::acos(), vl::acosh(), vl::all(), vl::any(), vl::Light::apply(), vl::asin(), vl::asinh(), vl::atan(), vl::atanh(), vl::ceil(), vl::cos(), vl::cosh(), vl::degrees(), vl::dot(), vl::equal(), vl::PixelLODEvaluator::evaluate(), vl::exp(), vl::exp2(), vl::floor(), vl::greaterThan(), vl::greaterThanEqual(), vl::inversesqrt(), vl::isinf(), vl::isnan(), vl::Vector4< unsigned int >::isNull(), vl::Vector4< unsigned int >::length(), vl::Vector4< unsigned int >::lengthSquared(), vl::lessThan(), vl::lessThanEqual(), vl::log(), vl::log10(), vl::log2(), vl::max(), vl::min(), vl::mix(), vl::modf(), vl::notEqual(), vl::Vector4< unsigned int >::operator*(), vl::operator*(), vl::Vector4< unsigned int >::operator+(), vl::Vector4< unsigned int >::operator-(), vl::Vector4< unsigned int >::operator/(), vl::Vector4< unsigned int >::operator<(), vl::Quaternion< T_Scalar >::operator=(), vl::Vector4< unsigned int >::operator=(), vl::Vector4< unsigned int >::operator==(), vl::pow(), vl::Camera::project(), vl::Quaternion< T_Scalar >::Quaternion(), vl::radians(), vl::round(), vl::roundEven(), vl::DaeLoader::setupLights(), vl::sign(), vl::sin(), vl::sinh(), vl::smoothstep(), vl::sqrt(), vl::step(), vl::tan(), vl::tanh(), vl::trunc(), vl::Camera::unproject(), vl::Vector4< unsigned int >::Vector4(), and vlX::vlx_toValue().
|
inline |
Definition at line 110 of file Vector4.hpp.
|
inline |
Definition at line 102 of file Vector4.hpp.
Referenced by vl::abs(), vl::acos(), vl::acosh(), vl::all(), vl::any(), vl::asin(), vl::asinh(), vl::atan(), vl::atanh(), vl::Text::boundingRectTransformed(), vl::ceil(), vl::cos(), vl::cosh(), vl::degrees(), vl::dot(), vl::equal(), vl::PixelLODEvaluator::evaluate(), vl::exp(), vl::exp2(), vl::floor(), vl::greaterThan(), vl::greaterThanEqual(), vl::inversesqrt(), vl::isinf(), vl::isnan(), vl::Vector4< unsigned int >::isNull(), vl::Vector4< unsigned int >::length(), vl::Vector4< unsigned int >::lengthSquared(), vl::lessThan(), vl::lessThanEqual(), vl::log(), vl::log10(), vl::log2(), vl::max(), vl::min(), vl::mix(), vl::modf(), vl::notEqual(), vl::Vector4< unsigned int >::operator*(), vl::operator*(), vl::Vector4< unsigned int >::operator+(), vl::Vector4< unsigned int >::operator-(), vl::Vector4< unsigned int >::operator/(), vl::Vector4< unsigned int >::operator<(), vl::Quaternion< T_Scalar >::operator=(), vl::Vector4< unsigned int >::operator=(), vl::Vector4< unsigned int >::operator==(), vl::pow(), vl::Camera::project(), vl::Quaternion< T_Scalar >::Quaternion(), vl::radians(), vl::DrawPixels::render_Implementation(), vl::Text::renderText(), vl::Vector4< unsigned int >::rg(), vl::Vector4< unsigned int >::rgb(), vl::round(), vl::roundEven(), vl::sign(), vl::sin(), vl::sinh(), vl::smoothstep(), vl::sqrt(), vl::Vector4< unsigned int >::st(), vl::step(), vl::Vector4< unsigned int >::stp(), vl::tan(), vl::tanh(), vl::trunc(), vl::Camera::unproject(), vl::Vector4< unsigned int >::Vector4(), vlX::vlx_toValue(), vl::Vector4< unsigned int >::xy(), and vl::Vector4< unsigned int >::xyz().
|
inline |
Definition at line 107 of file Vector4.hpp.
|
inline |
Definition at line 136 of file Vector4.hpp.
|
inline |
Definition at line 132 of file Vector4.hpp.
Referenced by vl::Text::boundingRectTransformed(), vl::Camera::computeRay(), vl::Camera::computeRayFrustum(), vl::PixelLODEvaluator::evaluate(), vl::operator*(), and vl::SlicedVolume::updateUniforms().
|
inline |
Definition at line 103 of file Vector4.hpp.
Referenced by vl::abs(), vl::acos(), vl::acosh(), vl::all(), vl::any(), vl::asin(), vl::asinh(), vl::atan(), vl::atanh(), vl::Text::boundingRectTransformed(), vl::ceil(), vl::cos(), vl::cosh(), vl::degrees(), vl::dot(), vl::equal(), vl::PixelLODEvaluator::evaluate(), vl::exp(), vl::exp2(), vl::floor(), vl::greaterThan(), vl::greaterThanEqual(), vl::inversesqrt(), vl::isinf(), vl::isnan(), vl::Vector4< unsigned int >::isNull(), vl::Vector4< unsigned int >::length(), vl::Vector4< unsigned int >::lengthSquared(), vl::lessThan(), vl::lessThanEqual(), vl::log(), vl::log10(), vl::log2(), vl::max(), vl::min(), vl::mix(), vl::modf(), vl::notEqual(), vl::Vector4< unsigned int >::operator*(), vl::operator*(), vl::Vector4< unsigned int >::operator+(), vl::Vector4< unsigned int >::operator-(), vl::Vector4< unsigned int >::operator/(), vl::Vector4< unsigned int >::operator<(), vl::Quaternion< T_Scalar >::operator=(), vl::Vector4< unsigned int >::operator=(), vl::Vector4< unsigned int >::operator==(), vl::pow(), vl::Camera::project(), vl::Quaternion< T_Scalar >::Quaternion(), vl::radians(), vl::DrawPixels::render_Implementation(), vl::Text::renderText(), vl::Vector4< unsigned int >::rg(), vl::Vector4< unsigned int >::rgb(), vl::round(), vl::roundEven(), vl::sign(), vl::sin(), vl::sinh(), vl::smoothstep(), vl::sqrt(), vl::Vector4< unsigned int >::st(), vl::step(), vl::Vector4< unsigned int >::stp(), vl::tan(), vl::tanh(), vl::trunc(), vl::Camera::unproject(), vl::Vector4< unsigned int >::Vector4(), vlX::vlx_toValue(), vl::Vector4< unsigned int >::xy(), and vl::Vector4< unsigned int >::xyz().
|
inline |
Definition at line 108 of file Vector4.hpp.
|
inline |
Definition at line 104 of file Vector4.hpp.
Referenced by vl::abs(), vl::acos(), vl::acosh(), vl::all(), vl::any(), vl::asin(), vl::asinh(), vl::atan(), vl::atanh(), vl::Text::boundingRectTransformed(), vl::ceil(), vl::cos(), vl::cosh(), vl::degrees(), vl::dot(), vl::equal(), vl::PixelLODEvaluator::evaluate(), vl::exp(), vl::exp2(), vl::floor(), vl::greaterThan(), vl::greaterThanEqual(), vl::inversesqrt(), vl::isinf(), vl::isnan(), vl::Vector4< unsigned int >::isNull(), vl::Vector4< unsigned int >::length(), vl::Vector4< unsigned int >::lengthSquared(), vl::lessThan(), vl::lessThanEqual(), vl::log(), vl::log10(), vl::log2(), vl::max(), vl::min(), vl::mix(), vl::modf(), vl::notEqual(), vl::Vector4< unsigned int >::operator*(), vl::operator*(), vl::Vector4< unsigned int >::operator+(), vl::Vector4< unsigned int >::operator-(), vl::Vector4< unsigned int >::operator/(), vl::Vector4< unsigned int >::operator<(), vl::Quaternion< T_Scalar >::operator=(), vl::Vector4< unsigned int >::operator=(), vl::Vector4< unsigned int >::operator==(), vl::pow(), vl::Camera::project(), vl::Quaternion< T_Scalar >::Quaternion(), vl::radians(), vl::Text::renderText(), vl::Vector4< unsigned int >::rgb(), vl::round(), vl::roundEven(), vl::sign(), vl::sin(), vl::sinh(), vl::smoothstep(), vl::sqrt(), vl::step(), vl::Vector4< unsigned int >::stp(), vl::tan(), vl::tanh(), vl::trunc(), vl::Camera::unproject(), vl::Vector4< unsigned int >::Vector4(), vlX::vlx_toValue(), and vl::Vector4< unsigned int >::xyz().
|
inline |
Definition at line 109 of file Vector4.hpp.
|
protected |
Definition at line 266 of file Vector4.hpp.
Referenced by vl::Vector4< unsigned int >::a(), vl::Vector4< unsigned int >::b(), vl::Vector4< unsigned int >::g(), vl::Vector4< unsigned int >::operator[](), vl::Vector4< unsigned int >::p(), vl::Vector4< unsigned int >::ptr(), vl::Vector4< unsigned int >::q(), vl::Vector4< unsigned int >::r(), vl::Vector4< unsigned int >::s(), vl::Vector4< unsigned int >::t(), vl::Vector4< unsigned int >::Vector4(), vl::Vector4< unsigned int >::w(), vl::Vector4< unsigned int >::x(), vl::Vector4< unsigned int >::y(), and vl::Vector4< unsigned int >::z().
|
static |
Definition at line 49 of file Vector4.hpp.
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:55.
© Copyright Michele Bosi. All rights reserved.