V3FIT
Main Page
Related Pages
Modules
Modules List
Module Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions/Subroutines
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Data Types List
Data Types List
Data Types
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Functions/Subroutines
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
x
y
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Files
File List
File Members
All
b
c
g
i
l
m
n
p
t
v
w
Functions/Subroutines
b
c
g
i
m
p
t
v
w
Variables
Enumerations
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Macros
Pages
LGRID
Sources
vector3d.hpp
1
//
2
// vector3d.hpp
3
// lgrid
4
//
5
// Created by Cianciosa, Mark R. on 2/7/16.
6
// Copyright © 2016 Cianciosa, Mark R. All rights reserved.
7
//
8
9
#ifndef vector3d_hpp
10
#define vector3d_hpp
11
12
#include <stdio.h>
13
14
//------------------------------------------------------------------------------
18
//------------------------------------------------------------------------------
19
class
vector3d
{
20
public
:
22
const
double
x
;
24
const
double
y
;
26
const
double
z
;
27
28
vector3d
(
const
double
x_,
const
double
y_,
const
double
z_);
29
30
const
double
length
()
const
;
31
const
vector3d
normalize
()
const
;
32
33
static
const
vector3d
cross_product
(
const
vector3d
&v1,
const
vector3d
&v2);
34
static
const
double
dot_product
(
const
vector3d
&v1,
const
vector3d
&v2);
35
};
36
37
const
vector3d
operator+(
const
vector3d
&v1,
const
vector3d
&v2);
38
const
vector3d
operator-(
const
vector3d
&v1,
const
vector3d
&v2);
39
const
vector3d
operator/(
const
vector3d
&v1,
const
double
d);
40
41
#endif
/* vector3d_hpp */
vector3d::cross_product
static const vector3d cross_product(const vector3d &v1, const vector3d &v2)
Takes the cross product of two vectors.
Definition:
vector3d.cpp:56
vector3d::vector3d
vector3d(const double x_, const double y_, const double z_)
vector3d constructor.
Definition:
vector3d.cpp:21
vector3d
A vector.
Definition:
vector3d.hpp:19
vector3d::x
const double x
x component.
Definition:
vector3d.hpp:22
vector3d::dot_product
static const double dot_product(const vector3d &v1, const vector3d &v2)
Takes the doc product of two vectors.
Definition:
vector3d.cpp:71
vector3d::normalize
const vector3d normalize() const
Normalize vector3d instance.
Definition:
vector3d.cpp:43
vector3d::length
const double length() const
Length of a vector3d instance.
Definition:
vector3d.cpp:32
vector3d::y
const double y
y component.
Definition:
vector3d.hpp:24
vector3d::z
const double z
z component.
Definition:
vector3d.hpp:26
Generated on Thu Mar 5 2020 15:49:23 for V3FIT by
1.8.17