Banuba SDK
Loading...
Searching...
No Matches
bnb::point3d Union Reference

Public Member Functions

void clear ()
 
float sum ()
 
point3d sqr () const noexcept
 
point3d operator/ (const point3d &p) const noexcept
 
point3d operator/ (float f) const noexcept
 
point3d operator* (const point3d &p) const noexcept
 
point3d operator* (float a) const noexcept
 
point3d operator- (const point3d &p) const noexcept
 
point3d operator+ (const point3d &p) const noexcept
 

Public Attributes

struct { 
 
   float   x 
 
   float   y 
 
   float   z 
 
};  
 
float data [3]
 

Detailed Description

Definition at line 96 of file base_types.hpp.

Member Function Documentation

◆ clear()

void bnb::point3d::clear ( )
inline

Definition at line 104 of file base_types.hpp.

105 {
106 x = y = z = 0.0f;
107 }

◆ operator*() [1/2]

point3d bnb::point3d::operator* ( const point3d & p) const
inlinenoexcept

Definition at line 129 of file base_types.hpp.

130 {
131 return point3d{x * p.x, y * p.y, z * p.z};
132 }

◆ operator*() [2/2]

point3d bnb::point3d::operator* ( float a) const
inlinenoexcept

Definition at line 134 of file base_types.hpp.

135 {
136 return point3d{x * a, y * a, z * a};
137 }

◆ operator+()

point3d bnb::point3d::operator+ ( const point3d & p) const
inlinenoexcept

Definition at line 144 of file base_types.hpp.

145 {
146 return point3d{x + p.x, y + p.y, z + p.z};
147 }

◆ operator-()

point3d bnb::point3d::operator- ( const point3d & p) const
inlinenoexcept

Definition at line 139 of file base_types.hpp.

140 {
141 return point3d{x - p.x, y - p.y, z - p.z};
142 }

◆ operator/() [1/2]

point3d bnb::point3d::operator/ ( const point3d & p) const
inlinenoexcept

Definition at line 119 of file base_types.hpp.

120 {
121 return point3d{x / p.x, y / p.y, z / p.z};
122 }

◆ operator/() [2/2]

point3d bnb::point3d::operator/ ( float f) const
inlinenoexcept

Definition at line 124 of file base_types.hpp.

125 {
126 return point3d{x / f, y / f, z / f};
127 }

◆ sqr()

point3d bnb::point3d::sqr ( ) const
inlinenoexcept

Definition at line 114 of file base_types.hpp.

115 {
116 return *this * *this;
117 }

◆ sum()

float bnb::point3d::sum ( )
inline

Definition at line 109 of file base_types.hpp.

110 {
111 return x + y + z;
112 }

Member Data Documentation

◆ data

float bnb::point3d::data[3]

Definition at line 102 of file base_types.hpp.

◆ x

float bnb::point3d::x

Definition at line 100 of file base_types.hpp.

◆ y

float bnb::point3d::y

Definition at line 100 of file base_types.hpp.

◆ z

float bnb::point3d::z

Definition at line 100 of file base_types.hpp.


The documentation for this union was generated from the following file: