QGIS API Documentation 3.41.0-Master (3c143d501a8)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Vector3D Class Reference

Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values. More...

#include <Vector3D.h>

Public Member Functions

 Vector3D ()=default
 
 Vector3D (double x, double y, double z)
 Constructor taking the three components as arguments.
 
double getLength () const
 Returns the length of the vector.
 
double getX () const
 Returns the x-component of the vector.
 
double getY () const
 Returns the y-component of the vector.
 
double getZ () const
 Returns the z-component of the vector.
 
bool operator!= (const Vector3D &v) const
 
bool operator== (const Vector3D &v) const
 
void setX (double x)
 Sets the x-component of the vector.
 
void setY (double y)
 Sets the y-component of the vector.
 
void setZ (double z)
 Sets the z-component of the vector.
 
void standardise ()
 Standardises the vector.
 

Protected Attributes

double mX = 0
 X-component of the vector.
 
double mY = 0
 Y-component of the vector.
 
double mZ = 0
 Z-component of the vector.
 

Detailed Description

Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values.

In fact, the class is the same as QgsPoint. The name 'vector' makes it easier to understand the programs.

Note
Not available in Python bindings

Definition at line 35 of file Vector3D.h.

Constructor & Destructor Documentation

◆ Vector3D() [1/2]

Vector3D::Vector3D ( double  x,
double  y,
double  z 
)
inline

Constructor taking the three components as arguments.

Definition at line 81 of file Vector3D.h.

◆ Vector3D() [2/2]

Vector3D::Vector3D ( )
default

Member Function Documentation

◆ getLength()

double Vector3D::getLength ( ) const

Returns the length of the vector.

Definition at line 19 of file Vector3D.cpp.

◆ getX()

double Vector3D::getX ( ) const
inline

Returns the x-component of the vector.

Definition at line 91 of file Vector3D.h.

◆ getY()

double Vector3D::getY ( ) const
inline

Returns the y-component of the vector.

Definition at line 96 of file Vector3D.h.

◆ getZ()

double Vector3D::getZ ( ) const
inline

Returns the z-component of the vector.

Definition at line 101 of file Vector3D.h.

◆ operator!=()

bool Vector3D::operator!= ( const Vector3D v) const

Definition at line 37 of file Vector3D.cpp.

◆ operator==()

bool Vector3D::operator== ( const Vector3D v) const

Definition at line 32 of file Vector3D.cpp.

◆ setX()

void Vector3D::setX ( double  x)
inline

Sets the x-component of the vector.

Definition at line 106 of file Vector3D.h.

◆ setY()

void Vector3D::setY ( double  y)
inline

Sets the y-component of the vector.

Definition at line 111 of file Vector3D.h.

◆ setZ()

void Vector3D::setZ ( double  z)
inline

Sets the z-component of the vector.

Definition at line 116 of file Vector3D.h.

◆ standardise()

void Vector3D::standardise ( )

Standardises the vector.

Definition at line 24 of file Vector3D.cpp.

Member Data Documentation

◆ mX

double Vector3D::mX = 0
protected

X-component of the vector.

Definition at line 39 of file Vector3D.h.

◆ mY

double Vector3D::mY = 0
protected

Y-component of the vector.

Definition at line 41 of file Vector3D.h.

◆ mZ

double Vector3D::mZ = 0
protected

Z-component of the vector.

Definition at line 43 of file Vector3D.h.


The documentation for this class was generated from the following files: