Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The Vector3 class is a template class that implements a generic 3 components vector, see also vl::fvec3, vl::dvec3, vl::uvec3, vl::ivec3, vl::svec3, vl::usvec3, vl::bvec3, vl::ubvec3. More...
#include <Vector3.hpp>
Public Types | |
typedef T_Scalar | scalar_type |
typedef T_Scalar * | scalar_ptr_type |
Public Member Functions | |
Vector3 (const Vector3 &other) | |
Vector3 () | |
template<class T > | |
Vector3 (const T &other) | |
Vector3 (const scalar_ptr_type &pval) | |
Vector3 (T_Scalar val) | |
Vector3 (T_Scalar x, T_Scalar y, T_Scalar z) | |
Vector3 (const Vector2< T_Scalar > &v, T_Scalar z) | |
T_Scalar * | ptr () |
const T_Scalar * | ptr () const |
const T_Scalar & | x () const |
const T_Scalar & | y () const |
const T_Scalar & | z () const |
T_Scalar & | x () |
T_Scalar & | y () |
T_Scalar & | z () |
const T_Scalar & | r () const |
const T_Scalar & | g () const |
const T_Scalar & | b () const |
T_Scalar & | r () |
T_Scalar & | g () |
T_Scalar & | b () |
const T_Scalar & | s () const |
const T_Scalar & | t () const |
const T_Scalar & | p () const |
T_Scalar & | s () |
T_Scalar & | t () |
T_Scalar & | p () |
Vector2< T_Scalar > | xy () const |
Vector2< T_Scalar > | st () const |
Vector3 | operator+ (const Vector3 &other) const |
Vector3 | operator- (const Vector3 &other) const |
Vector3 | operator* (const Vector3 &other) const |
Vector3 | operator/ (const Vector3 &other) const |
Vector3 | operator+ (T_Scalar val) const |
Vector3 | operator- (T_Scalar val) const |
Vector3 | operator* (T_Scalar val) const |
Vector3 | operator/ (T_Scalar val) const |
Vector3 | operator- () const |
Vector3 & | operator+= (const Vector3 &other) |
Vector3 & | operator-= (const Vector3 &other) |
Vector3 & | operator*= (const Vector3 &other) |
Vector3 & | operator/= (const Vector3 &other) |
Vector3 & | operator+= (T_Scalar val) |
Vector3 & | operator-= (T_Scalar val) |
Vector3 & | operator*= (T_Scalar val) |
Vector3 & | operator/= (T_Scalar val) |
Vector3 & | operator= (const Vector3 &other) |
Vector3 & | operator= (T_Scalar val) |
bool | operator== (const Vector3 &other) const |
bool | operator!= (const Vector3 &other) const |
bool | operator< (const Vector3 &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 Vector3 & | normalize (T_Scalar *len=NULL) |
template<> | |
half | length () const |
template<> | |
half | lengthSquared () const |
Static Public Attributes | |
static const int | scalar_count = 3 |
Protected Attributes | |
T_Scalar | mScalar [scalar_count] |
The Vector3 class is a template class that implements a generic 3 components vector, see also vl::fvec3, vl::dvec3, vl::uvec3, vl::ivec3, vl::svec3, vl::usvec3, vl::bvec3, vl::ubvec3.
Definition at line 44 of file Vector3.hpp.
typedef T_Scalar* vl::Vector3< T_Scalar >::scalar_ptr_type |
Definition at line 48 of file Vector3.hpp.
typedef T_Scalar vl::Vector3< T_Scalar >::scalar_type |
Definition at line 47 of file Vector3.hpp.
|
inline |
Definition at line 50 of file Vector3.hpp.
|
inline |
Definition at line 51 of file Vector3.hpp.
Referenced by vl::Vector3< int >::operator*(), vl::Vector3< int >::operator+(), vl::Vector3< int >::operator-(), and vl::Vector3< int >::operator/().
|
inlineexplicit |
Definition at line 54 of file Vector3.hpp.
|
inlineexplicit |
Definition at line 61 of file Vector3.hpp.
|
inlineexplicit |
Definition at line 68 of file Vector3.hpp.
|
inlineexplicit |
Definition at line 73 of file Vector3.hpp.
|
inlineexplicit |
Definition at line 80 of file Vector3.hpp.
|
inline |
Definition at line 100 of file Vector3.hpp.
Referenced by vl::ObjLoader::loadObjMaterials(), vl::max(), vl::min(), vl::A3DSLoader::readColByte3(), vl::A3DSLoader::readColFloat3(), and vl::MarchingCubes::updateColor().
|
inline |
Definition at line 104 of file Vector3.hpp.
|
inline |
Definition at line 99 of file Vector3.hpp.
Referenced by vl::ObjLoader::loadObjMaterials(), vl::A3DSLoader::readColByte3(), vl::A3DSLoader::readColFloat3(), and vl::MarchingCubes::updateColor().
|
inline |
Definition at line 103 of file Vector3.hpp.
|
inline |
Definition at line 227 of file Vector3.hpp.
Referenced by vl::EdgeExtractor::addEdge(), vl::EdgeExtractor::extractEdges(), vl::Sphere::operator+=(), and vl::MarchingCubes::processCube().
|
inline |
Definition at line 225 of file Vector3.hpp.
Referenced by vl::PolygonSimplifier::Triangle::computeArea(), vl::Geometry::computeNormals(), vl::PolygonSimplifier::Triangle::computePotentialArea(), vl::extractPlanes(), vl::DaeLoader::generateGeometry(), vl::length(), vl::DaeLoader::load(), and vl::Vector3< int >::normalize().
|
inline |
|
inline |
Definition at line 226 of file Vector3.hpp.
Referenced by vl::Geometry::computeBounds_Implementation().
|
inline |
|
inline |
Definition at line 228 of file Vector3.hpp.
Referenced by vl::PolygonSimplifier::computeCollapseInfo(), vl::PolygonSimplifier::Vertex::computeEdgePenalty(), vl::Geometry::computeNormals(), vl::PolygonSimplifier::Triangle::computePotentialNormal(), vl::TrackballManipulator::computeVector(), vl::Billboard::computeWorldMatrix(), vl::EdgeExtractor::extractEdges(), vl::extractPlanes(), vl::Extrusion::extrude(), vl::Extrusions::extrude(), vl::DaeLoader::generateGeometry(), vl::genRGBAVolume(), vl::Matrix4< float >::getLookAt(), vl::Matrix4< float >::getLookAtModeling(), vl::Matrix4< float >::getRotation(), vl::Matrix4< float >::getYXRotationAngles(), vl::RayIntersector::intersectTriangle(), vl::RingExtractor::keepPlanarCycles(), vl::makeIcosphere(), vl::makeTorus(), vl::Volume::normalHQ(), vl::normalize(), vl::Volume::normalLQ(), vl::EdgeUpdateCallback::onActorRenderStarted(), vl::Sphere::operator+=(), vl::Billboard::setAxis(), vl::Quaternion< T_Scalar >::setFromAxisAngle(), vl::Quaternion< T_Scalar >::setFromVectors(), vl::Billboard::setNormal(), vl::TrackballManipulator::trackballRotation(), vl::GhostCameraManipulator::updateEvent(), and vl::SceneManagerPortals::visitSector().
|
inline |
Definition at line 209 of file Vector3.hpp.
|
inline |
Definition at line 125 of file Vector3.hpp.
|
inline |
Definition at line 141 of file Vector3.hpp.
|
inline |
Definition at line 163 of file Vector3.hpp.
|
inline |
Definition at line 183 of file Vector3.hpp.
|
inline |
Definition at line 117 of file Vector3.hpp.
|
inline |
Definition at line 133 of file Vector3.hpp.
|
inline |
Definition at line 153 of file Vector3.hpp.
|
inline |
Definition at line 173 of file Vector3.hpp.
|
inline |
Definition at line 121 of file Vector3.hpp.
|
inline |
Definition at line 137 of file Vector3.hpp.
|
inline |
Definition at line 149 of file Vector3.hpp.
|
inline |
Definition at line 158 of file Vector3.hpp.
|
inline |
Definition at line 178 of file Vector3.hpp.
|
inline |
Definition at line 129 of file Vector3.hpp.
|
inline |
Definition at line 145 of file Vector3.hpp.
|
inline |
Definition at line 168 of file Vector3.hpp.
|
inline |
Definition at line 188 of file Vector3.hpp.
|
inline |
Definition at line 213 of file Vector3.hpp.
|
inline |
Definition at line 193 of file Vector3.hpp.
|
inline |
Definition at line 200 of file Vector3.hpp.
|
inline |
Definition at line 205 of file Vector3.hpp.
Referenced by vl::Vector3< int >::operator!=().
|
inline |
Definition at line 223 of file Vector3.hpp.
|
inline |
Definition at line 224 of file Vector3.hpp.
|
inline |
Definition at line 108 of file Vector3.hpp.
|
inline |
Definition at line 112 of file Vector3.hpp.
|
inline |
Definition at line 87 of file Vector3.hpp.
Referenced by vl::Light::apply(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::computeBoundingBox(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::computeBoundingSphere(), vl::DaeLoader::generateGeometry(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::getAsVec3(), vl::Uniform::getUniform(), vl::GLSLProgram::getUniform(), vl::Uniform::getUniform3D(), vl::Uniform::getUniform3F(), vl::Uniform::getUniform3I(), vl::Uniform::getUniform3U(), vl::Text::render_Implementation(), and vl::Uniform::setUniform().
|
inline |
Definition at line 88 of file Vector3.hpp.
|
inline |
Definition at line 98 of file Vector3.hpp.
Referenced by vl::ObjLoader::loadObjMaterials(), vl::A3DSLoader::readColByte3(), vl::A3DSLoader::readColFloat3(), and vl::MarchingCubes::updateColor().
|
inline |
Definition at line 102 of file Vector3.hpp.
|
inline |
Definition at line 106 of file Vector3.hpp.
Referenced by vl::VectorGraphics::drawPoints(), and vl::VectorGraphics::popScissor().
|
inline |
Definition at line 110 of file Vector3.hpp.
|
inline |
Definition at line 115 of file Vector3.hpp.
|
inline |
Definition at line 107 of file Vector3.hpp.
Referenced by vl::cross(), vl::VectorGraphics::drawPoints(), and vl::VectorGraphics::popScissor().
|
inline |
Definition at line 111 of file Vector3.hpp.
|
inline |
Definition at line 90 of file Vector3.hpp.
Referenced by vl::AABB::AABB(), vl::abs(), vl::acos(), vl::acosh(), vl::AABB::addPoint(), vl::all(), vl::any(), vl::ClipPlane::apply(), vl::asin(), vl::asinh(), vl::atan(), vl::atanh(), vl::Text::boundingRect(), vl::CoreText::boundingRect(), vl::Text::boundingRectTransformed(), vl::ceil(), vl::Plane::classify(), vl::AABB::clip(), vl::MarchingCubes::computeEdges(), vl::Geometry::computeTangentSpace(), vl::TrackballManipulator::computeVector(), vl::cos(), vl::cosh(), vl::cross(), vl::Volume::cube(), vl::degrees(), vl::dot(), vl::equal(), vl::PixelLODEvaluator::evaluate(), vl::PolygonSimplifier::QErr::evaluate(), vl::VolumePlot::evaluateFunction(), vl::exp(), vl::exp2(), vl::extractPlanes(), vl::floor(), vl::RaycastVolume::generateTextureCoordinates(), vl::SlicedVolume::generateTextureCoordinates(), vl::genGradientNormals(), vl::Matrix4< float >::getLookAt(), vl::Matrix4< float >::getLookAtModeling(), vl::PlyLoader::PlyElement::getNormal(), vl::Matrix4< float >::getRotation(), vl::Matrix4< float >::getScaling(), vl::Matrix4< float >::getTranslation(), vl::PlyLoader::PlyElement::getVertex(), vl::greaterThan(), vl::greaterThanEqual(), vl::AABB::intersects(), vl::inversesqrt(), vl::isinf(), vl::AABB::isInside(), vl::isnan(), vl::Vector3< int >::isNull(), vl::Plane::isOutside(), vl::Vector3< int >::length(), vl::Vector3< int >::lengthSquared(), vl::lessThan(), vl::lessThanEqual(), vl::load3DS(), vl::STLLoader::loadAscii(), vl::loadMD2(), vl::loadMHD(), vl::log(), vl::log10(), vl::log2(), vl::makeBox(), vl::max(), vl::min(), vl::mix(), vl::modf(), vl::Volume::normalHQ(), vl::Volume::normalLQ(), vl::notEqual(), vl::Vector3< int >::operator*(), vl::operator*(), vl::Vector3< int >::operator+(), vl::Vector3< int >::operator-(), vl::Vector3< int >::operator/(), vl::A3DSVertex::operator<(), vl::Vector3< int >::operator<(), vl::Vector3< int >::operator=(), vl::Vector3< int >::operator==(), vl::VectorGraphics::popScissor(), vl::pow(), vl::MarchingCubes::processCube(), vl::PolygonSimplifier::QErr::QErr(), vl::radians(), vl::Text::rawboundingRect(), vl::CoreText::rawboundingRect(), vl::A3DSLoader::readVec3(), vl::OcclusionCullRenderer::render_pass2(), vl::CoreText::renderBackground(), vl::CoreText::renderBorder(), vl::Text::renderText(), vl::CoreText::renderText(), vl::Matrix4< float >::rotate(), vl::round(), vl::roundEven(), vl::Matrix4< float >::scale(), vl::RaycastVolume::setBox(), vl::Quaternion< T_Scalar >::setFromAxisAngle(), vl::Matrix4< float >::setT(), vl::Volume::setup(), vl::VolumePlot::setupLabels(), vl::Matrix4< float >::setX(), vl::Matrix4< float >::setY(), vl::Matrix4< float >::setZ(), vl::sign(), vl::sin(), vl::sinh(), vl::smoothstep(), vl::sqrt(), vl::Vector3< int >::st(), vl::step(), vl::tan(), vl::tanh(), vl::Tessellator::tessCombineData(), vl::Quaternion< T_Scalar >::toAxisAngle(), vl::trunc(), vl::Camera::unproject(), vl::GhostCameraManipulator::updateEvent(), vl::Vector3< int >::Vector3(), vl::Vector4< unsigned int >::Vector4(), vlX::vlx_mat4(), vlX::vlx_toValue(), vl::AABB::width(), and vl::Vector3< int >::xy().
|
inline |
Definition at line 94 of file Vector3.hpp.
|
inline |
Definition at line 114 of file Vector3.hpp.
|
inline |
Definition at line 91 of file Vector3.hpp.
Referenced by vl::AABB::AABB(), vl::abs(), vl::acos(), vl::acosh(), vl::AABB::addPoint(), vl::all(), vl::any(), vl::ClipPlane::apply(), vl::asin(), vl::asinh(), vl::atan(), vl::atanh(), vl::Text::boundingRect(), vl::CoreText::boundingRect(), vl::Text::boundingRectTransformed(), vl::ceil(), vl::Plane::classify(), vl::AABB::clip(), vl::MarchingCubes::computeEdges(), vl::Geometry::computeTangentSpace(), vl::TrackballManipulator::computeVector(), vl::cos(), vl::cosh(), vl::cross(), vl::Volume::cube(), vl::degrees(), vl::dot(), vl::equal(), vl::PixelLODEvaluator::evaluate(), vl::PolygonSimplifier::QErr::evaluate(), vl::VolumePlot::evaluateFunction(), vl::exp(), vl::exp2(), vl::extractPlanes(), vl::floor(), vl::RaycastVolume::generateTextureCoordinates(), vl::SlicedVolume::generateTextureCoordinates(), vl::genGradientNormals(), vl::Matrix4< float >::getLookAt(), vl::Matrix4< float >::getLookAtModeling(), vl::PlyLoader::PlyElement::getNormal(), vl::Matrix4< float >::getRotation(), vl::Matrix4< float >::getScaling(), vl::Matrix4< float >::getTranslation(), vl::PlyLoader::PlyElement::getVertex(), vl::greaterThan(), vl::greaterThanEqual(), vl::AABB::height(), vl::Terrain::init(), vl::inversesqrt(), vl::isinf(), vl::AABB::isInside(), vl::isnan(), vl::Vector3< int >::isNull(), vl::Plane::isOutside(), vl::Vector3< int >::length(), vl::Vector3< int >::lengthSquared(), vl::lessThan(), vl::lessThanEqual(), vl::load3DS(), vl::STLLoader::loadAscii(), vl::loadMD2(), vl::loadMHD(), vl::log(), vl::log10(), vl::log2(), vl::makeBox(), vl::max(), vl::min(), vl::mix(), vl::modf(), vl::Volume::normalHQ(), vl::Volume::normalLQ(), vl::notEqual(), vl::Vector3< int >::operator*(), vl::operator*(), vl::Vector3< int >::operator+(), vl::Vector3< int >::operator-(), vl::Vector3< int >::operator/(), vl::A3DSVertex::operator<(), vl::Vector3< int >::operator<(), vl::Vector3< int >::operator=(), vl::Vector3< int >::operator==(), vl::VectorGraphics::popScissor(), vl::pow(), vl::MarchingCubes::processCube(), vl::PolygonSimplifier::QErr::QErr(), vl::radians(), vl::Text::rawboundingRect(), vl::CoreText::rawboundingRect(), vl::A3DSLoader::readVec3(), vl::OcclusionCullRenderer::render_pass2(), vl::CoreText::renderBackground(), vl::CoreText::renderBorder(), vl::Text::renderText(), vl::CoreText::renderText(), vl::Matrix4< float >::rotate(), vl::round(), vl::roundEven(), vl::Matrix4< float >::scale(), vl::RaycastVolume::setBox(), vl::Quaternion< T_Scalar >::setFromAxisAngle(), vl::Matrix4< float >::setT(), vl::Volume::setup(), vl::VolumePlot::setupLabels(), vl::Matrix4< float >::setX(), vl::Matrix4< float >::setY(), vl::Matrix4< float >::setZ(), vl::sign(), vl::sin(), vl::sinh(), vl::smoothstep(), vl::sqrt(), vl::Vector3< int >::st(), vl::step(), vl::tan(), vl::tanh(), vl::Tessellator::tessCombineData(), vl::Quaternion< T_Scalar >::toAxisAngle(), vl::trunc(), vl::Camera::unproject(), vl::GhostCameraManipulator::updateEvent(), vl::Vector3< int >::Vector3(), vl::Vector4< unsigned int >::Vector4(), vlX::vlx_mat4(), vlX::vlx_toValue(), and vl::Vector3< int >::xy().
|
inline |
Definition at line 95 of file Vector3.hpp.
|
inline |
Definition at line 92 of file Vector3.hpp.
Referenced by vl::AABB::AABB(), vl::abs(), vl::acos(), vl::acosh(), vl::AABB::addPoint(), vl::all(), vl::any(), vl::ClipPlane::apply(), vl::asin(), vl::asinh(), vl::atan(), vl::atanh(), vl::Text::boundingRectTransformed(), vl::ceil(), vl::Plane::classify(), vl::AABB::clip(), vl::MarchingCubes::computeEdges(), vl::Camera::computeNearFarOptimizedProjMatrix(), vl::Geometry::computeTangentSpace(), vl::TrackballManipulator::computeVector(), vl::cos(), vl::cosh(), vl::cross(), vl::degrees(), vl::AABB::depth(), vl::dot(), vl::equal(), vl::PixelLODEvaluator::evaluate(), vl::PolygonSimplifier::QErr::evaluate(), vl::VolumePlot::evaluateFunction(), vl::exp(), vl::exp2(), vl::extractPlanes(), vl::floor(), vl::RaycastVolume::generateTextureCoordinates(), vl::SlicedVolume::generateTextureCoordinates(), vl::genGradientNormals(), vl::Matrix4< float >::getLookAt(), vl::Matrix4< float >::getLookAtModeling(), vl::PlyLoader::PlyElement::getNormal(), vl::Matrix4< float >::getRotation(), vl::Matrix4< float >::getScaling(), vl::Matrix4< float >::getTranslation(), vl::PlyLoader::PlyElement::getVertex(), vl::greaterThan(), vl::greaterThanEqual(), vl::AABB::intersects(), vl::inversesqrt(), vl::isinf(), vl::AABB::isInside(), vl::isnan(), vl::Vector3< int >::isNull(), vl::Plane::isOutside(), vl::Vector3< int >::length(), vl::Vector3< int >::lengthSquared(), vl::lessThan(), vl::lessThanEqual(), vl::load3DS(), vl::STLLoader::loadAscii(), vl::loadMD2(), vl::loadMHD(), vl::log(), vl::log10(), vl::log2(), vl::makeBox(), vl::max(), vl::min(), vl::mix(), vl::modf(), vl::Volume::normalHQ(), vl::Volume::normalLQ(), vl::notEqual(), vl::SlicedVolume::onActorRenderStarted(), vl::Vector3< int >::operator*(), vl::operator*(), vl::Vector3< int >::operator+(), vl::Vector3< int >::operator-(), vl::Vector3< int >::operator/(), vl::A3DSVertex::operator<(), vl::Vector3< int >::operator<(), vl::Vector3< int >::operator=(), vl::Vector3< int >::operator==(), vl::pow(), vl::PolygonSimplifier::QErr::QErr(), vl::radians(), vl::A3DSLoader::readVec3(), vl::OcclusionCullRenderer::render_pass2(), vl::CoreText::renderBackground(), vl::CoreText::renderBorder(), vl::Text::renderText(), vl::CoreText::renderText(), vl::Matrix4< float >::rotate(), vl::round(), vl::roundEven(), vl::Matrix4< float >::scale(), vl::RaycastVolume::setBox(), vl::Quaternion< T_Scalar >::setFromAxisAngle(), vl::Matrix4< float >::setT(), vl::Volume::setup(), vl::VolumePlot::setupLabels(), vl::Matrix4< float >::setX(), vl::Matrix4< float >::setY(), vl::Matrix4< float >::setZ(), vl::sign(), vl::sin(), vl::sinh(), vl::smoothstep(), vl::sqrt(), vl::step(), vl::tan(), vl::tanh(), vl::Tessellator::tessCombineData(), vl::Quaternion< T_Scalar >::toAxisAngle(), vl::trunc(), vl::Camera::unproject(), vl::GhostCameraManipulator::updateEvent(), vl::Vector3< int >::Vector3(), vl::Vector4< unsigned int >::Vector4(), vlX::vlx_mat4(), and vlX::vlx_toValue().
|
inline |
Definition at line 96 of file Vector3.hpp.
|
protected |
Definition at line 239 of file Vector3.hpp.
Referenced by vl::Vector3< int >::b(), vl::Vector3< int >::g(), vl::Vector3< int >::operator[](), vl::Vector3< int >::p(), vl::Vector3< int >::ptr(), vl::Vector3< int >::r(), vl::Vector3< int >::s(), vl::Vector3< int >::t(), vl::Vector3< int >::Vector3(), vl::Vector3< int >::x(), vl::Vector3< int >::y(), and vl::Vector3< int >::z().
|
static |
Definition at line 49 of file Vector3.hpp.
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:55.
© Copyright Michele Bosi. All rights reserved.