#include <MVec.hpp>
Definition at line 8 of file MVec.hpp.
MVec |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
double distance_between |
( |
MVec & |
end | ) |
const |
|
inline |
double length_squared |
( |
| ) |
const |
|
inline |
void move_to_line |
( |
const MVec & |
from, |
|
|
const MVec & |
to |
|
) |
| |
Definition at line 90 of file MVec.cpp.
References length_squared(), and sqrt().
92 MVec base = to - from;
93 MVec vec = *
this - from;
95 double dot = base%vec;
100 double percent2 = ((dot*dot)/b2)/b2;
101 if (percent2 >= 1.0){
105 double delta =
sqrt (percent2);
106 *
this = from * ( 1.0 - delta ) + to * delta;
double length_squared() const
double operator% |
( |
const MVec & |
ovec | ) |
const |
|
inline |
MVec operator* |
( |
double |
val | ) |
const |
Definition at line 57 of file MVec.cpp.
References d_x, d_y, d_z, and v.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
MVec operator* |
( |
const MVec & |
ovec | ) |
const |
Definition at line 67 of file MVec.cpp.
References d_x, d_y, d_z, and v.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
MVec operator+ |
( |
const MVec & |
ovec | ) |
const |
Definition at line 39 of file MVec.cpp.
References d_x, d_y, d_z, and v.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
MVec operator- |
( |
const MVec & |
ovec | ) |
const |
Definition at line 30 of file MVec.cpp.
References d_x, d_y, d_z, and v.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
MVec operator/ |
( |
double |
val | ) |
const |
Definition at line 48 of file MVec.cpp.
References d_x, d_y, d_z, and v.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
const MVec & operator= |
( |
const MVec |
ovec | ) |
|
|
inline |
double operator[] |
( |
int |
i | ) |
const |
|
inline |
ostream& operator<< |
( |
ostream & |
stream, |
|
|
const MVec & |
v |
|
) |
| |
|
friend |
Definition at line 25 of file MVec.cpp.
26 stream <<
' ' << v.
d_x <<
' ' << v.
d_y <<
' ' << v.
d_z;
istream& operator>> |
( |
istream & |
stream, |
|
|
MVec & |
v |
|
) |
| |
|
friend |
Definition at line 57 of file MVec.hpp.
Referenced by distance_between(), length(), length_squared(), normalize(), operator%(), operator*(), operator+(), operator-(), operator/(), operator<<(), operator=(), operator==(), operator>>(), operator[](), and x().
Definition at line 58 of file MVec.hpp.
Referenced by distance_between(), length(), length_squared(), normalize(), operator%(), operator*(), operator+(), operator-(), operator/(), operator<<(), operator=(), operator==(), operator>>(), operator[](), and y().
Definition at line 59 of file MVec.hpp.
Referenced by distance_between(), length(), length_squared(), normalize(), operator%(), operator*(), operator+(), operator-(), operator/(), operator<<(), operator=(), operator==(), operator>>(), operator[](), and z().
The documentation for this class was generated from the following files: