KiCad PCB EDA Suite
|
Define a general 3D-vector. More...
#include <vector3.h>
Public Types | |
typedef VECTOR3_TRAITS< T >::extended_type | extended_type |
typedef T | coord_type |
Public Member Functions | |
VECTOR3 ()=default | |
Construct a 3D-vector with x, y, z = 0. | |
VECTOR3 (T x, T y, T z) | |
Construct a vector with given components x, y, z. | |
template<typename CastingType> | |
VECTOR3 (const VECTOR3< CastingType > &aVec) | |
Initializes a vector from another specialization. | |
VECTOR3< T > | Cross (const VECTOR3< T > &aVector) const |
Compute cross product of self with aVector. | |
VECTOR3< T >::extended_type | Dot (const VECTOR3< T > &aVector) const |
Compute the dot product of self with aVector. | |
T | EuclideanNorm () const |
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2). | |
VECTOR3< T > | Normalize () |
Compute the normalized vector. | |
VECTOR3< T > | SetAll (T val) |
Set all elements to val. | |
bool | operator== (const VECTOR3< T > &aVector) const |
Equality operator. | |
bool | operator!= (const VECTOR3< T > &aVector) const |
Not equality operator. | |
VECTOR3< T > & | operator*= (T val) |
VECTOR3< T > & | operator/= (T val) |
Public Attributes | |
T | x {} |
T | y {} |
T | z {} |
Static Public Attributes | |
static constexpr extended_type | ECOORD_MAX = std::numeric_limits<extended_type>::max() |
static constexpr extended_type | ECOORD_MIN = std::numeric_limits<extended_type>::min() |
Define a general 3D-vector.
This class uses templates to be universal. Several operators are provided to help easy implementing of linear algebra equations.
typedef VECTOR3_TRAITS<T>::extended_type VECTOR3< T >::extended_type |
Construct a 3D-vector with x, y, z = 0.
Referenced by Cross(), Dot(), Normalize(), operator!=(), operator*=(), operator/=(), operator==(), SetAll(), and VECTOR3().
Compute the normalized vector.
Definition at line 160 of file vector3.h.
References EuclideanNorm(), T, VECTOR3(), x, y, and z.
Referenced by DXF_IMPORT_PLUGIN::getArbitraryAxis().
|
staticconstexpr |
|
staticconstexpr |
Definition at line 63 of file vector3.h.
Referenced by DXF_IMPORT_PLUGIN::addArc(), DXF_IMPORT_PLUGIN::addCircle(), DXF_IMPORT_PLUGIN::addEllipse(), DXF_IMPORT_PLUGIN::addInsert(), DXF_IMPORT_PLUGIN::addMText(), DXF_IMPORT_PLUGIN::addPoint(), DXF_IMPORT_PLUGIN::addText(), DXF_IMPORT_PLUGIN::addVertex(), ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), PDF_PLOTTER::CreateC2WMatrixFromAngles(), Cross(), Dot(), EuclideanNorm(), PCB_IO_EASYEDAPRO_PARSER::fillFootprintModelInfo(), nlohmann::adl_serializer< VECTOR3D >::from_json(), DXF_IMPORT_PLUGIN::getArbitraryAxis(), getColorOrIntensity(), STEP_PCB_MODEL::getModelLabel(), STEP_PCB_MODEL::getModelLocation(), getToVector3(), PCBNEW_JOBS_HANDLER::JobExportRender(), PCB_IO_KICAD_LEGACY::load3D(), MATRIX3x3< T >::MATRIX3x3(), Normalize(), operator!=(), operator*(), operator*=(), operator/=(), operator<<(), operator==(), kiapi::common::PackVector3D(), PCB_IO_KICAD_SEXPR_PARSER::parse3DModel(), ALTIUM_PCB::ParseComponentsBodies6Data(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), SetAll(), PANEL_PREVIEW_3D_MODEL::SetSelectedModel(), nlohmann::adl_serializer< VECTOR3D >::to_json(), STEP_PCB_MODEL::transferModel(), PANEL_PREVIEW_3D_MODEL::updateOrientation(), VECTOR3(), and VECTOR3().
Definition at line 64 of file vector3.h.
Referenced by DXF_IMPORT_PLUGIN::addArc(), DXF_IMPORT_PLUGIN::addCircle(), DXF_IMPORT_PLUGIN::addEllipse(), DXF_IMPORT_PLUGIN::addInsert(), DXF_IMPORT_PLUGIN::addMText(), DXF_IMPORT_PLUGIN::addPoint(), DXF_IMPORT_PLUGIN::addText(), DXF_IMPORT_PLUGIN::addVertex(), ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), PDF_PLOTTER::CreateC2WMatrixFromAngles(), Cross(), Dot(), EuclideanNorm(), PCB_IO_EASYEDAPRO_PARSER::fillFootprintModelInfo(), nlohmann::adl_serializer< VECTOR3D >::from_json(), DXF_IMPORT_PLUGIN::getArbitraryAxis(), getColorOrIntensity(), STEP_PCB_MODEL::getModelLabel(), STEP_PCB_MODEL::getModelLocation(), getToVector3(), PCBNEW_JOBS_HANDLER::JobExportRender(), PCB_IO_KICAD_LEGACY::load3D(), MATRIX3x3< T >::MATRIX3x3(), Normalize(), operator!=(), operator*(), operator*=(), operator/=(), operator<<(), operator==(), kiapi::common::PackVector3D(), PCB_IO_KICAD_SEXPR_PARSER::parse3DModel(), ALTIUM_PCB::ParseComponentsBodies6Data(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), SetAll(), PANEL_PREVIEW_3D_MODEL::SetSelectedModel(), nlohmann::adl_serializer< VECTOR3D >::to_json(), STEP_PCB_MODEL::transferModel(), PANEL_PREVIEW_3D_MODEL::updateOrientation(), VECTOR3(), and VECTOR3().
Definition at line 65 of file vector3.h.
Referenced by ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), PDF_PLOTTER::CreateC2WMatrixFromAngles(), Cross(), Dot(), EuclideanNorm(), PCB_IO_EASYEDAPRO_PARSER::fillFootprintModelInfo(), nlohmann::adl_serializer< VECTOR3D >::from_json(), getColorOrIntensity(), STEP_PCB_MODEL::getModelLabel(), STEP_PCB_MODEL::getModelLocation(), getToVector3(), PCBNEW_JOBS_HANDLER::JobExportRender(), PCB_IO_KICAD_LEGACY::load3D(), MATRIX3x3< T >::MATRIX3x3(), Normalize(), operator!=(), operator*(), operator*=(), operator/=(), operator<<(), operator==(), kiapi::common::PackVector3D(), PCB_IO_KICAD_SEXPR_PARSER::parse3DModel(), ALTIUM_PCB::ParseComponentsBodies6Data(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), SetAll(), PANEL_PREVIEW_3D_MODEL::SetSelectedModel(), nlohmann::adl_serializer< VECTOR3D >::to_json(), STEP_PCB_MODEL::transferModel(), PANEL_PREVIEW_3D_MODEL::updateOrientation(), VECTOR3(), and VECTOR3().