#include <vec.h>
Definition at line 397 of file vec.h.
◆ basis() [1/6]
◆ basis() [2/6]
basis::basis |
( |
const String & |
pname | ) |
|
Definition at line 397 of file vec.cpp.
397 :
ex(1, 0, 0),
ey(0, 1, 0),
ez(0, 0, 1) {
399}
◆ basis() [3/6]
basis::basis |
( |
const vec & |
p, |
|
|
const String & |
fname |
|
) |
| |
Definition at line 401 of file vec.cpp.
401 {
404
408 if (length(p) == 0) {
413 }
415 if (ca == 1) {
419 } else if (ca == -1) {
423 } else {
427 }
428}
vfloat cos2vec(const vec &r1, const vec &r2)
#define pvecerror(string)
◆ basis() [4/6]
basis::basis |
( |
const vec & |
p, |
|
|
const vec & |
c, |
|
|
const String & |
pname |
|
) |
| |
Definition at line 430 of file vec.cpp.
430 {
431 pvecerror(
"basis::basis(vec &p, vec &c, char pname[12])");
436
437 if (length(p) == 0 || length(c) == 0) {
442 }
444 if (ca == 1) {
449 } else if (ca == -1) {
454 } else {
456 ey = unit_vec(
ez || c);
458 }
459
460}
◆ basis() [5/6]
basis::basis |
( |
const basis & |
pb, |
|
|
const String & |
pname |
|
) |
| |
◆ basis() [6/6]
basis::basis |
( |
const vec & |
pex, |
|
|
const vec & |
pey, |
|
|
const vec & |
pez, |
|
|
const String & |
pname |
|
) |
| |
Definition at line 468 of file vec.cpp.
469 {
470 pvecerror(
"basis::basis(vec &pex, vec &pey, vec &pez, char pname[12])");
473 mcerr <<
"ERROR in basis::basis(vec &pex, vec &pey, vec &pez) : \n"
474 << "the vectors are not perpendicular\n";
475 mcerr <<
" pex,pey,pez:\n";
476 mcerr << pex << pey << pez;
477 mcerr <<
"name=" << pname <<
'\n';
479 }
480
481
482
486 mcerr <<
"ERROR in basis::basis(vec &pex, vec &pey, vec &pez) : \n"
487 << "the vectors are not of unit length\n";
488 mcerr <<
" pex,pey,pez:\n";
489 mcerr << pex << pey << pez;
490 mcerr <<
"name=" << pname <<
'\n';
492 }
494 mcerr <<
"ERROR in basis::basis(vec &pex, vec &pey, vec &pez) : \n";
495 mcerr <<
"wrong direction of pez\n";
496 mcerr <<
" pex,pey,pez:\n";
497 mcerr << pex << pey << pez;
498 mcerr <<
"name=" << pname <<
'\n';
500 }
505}
int not_apeq(vfloat f1, vfloat f2, vfloat prec=vprecision)
◆ ~basis()
virtual basis::~basis |
( |
void |
| ) |
|
|
inlinevirtual |
◆ AnyType_copy()
◆ get_components()
void basis::get_components |
( |
ActivePtr< absref_transmit > & |
aref_tran | ) |
|
|
protectedvirtual |
Definition at line 379 of file vec.cpp.
379 {
380 aref_tran.pass(
new absref_transmit(3,
aref));
381}
static absref absref::* aref[3]
◆ Gex()
◆ Gey()
◆ Gez()
◆ print()
void basis::print |
( |
std::ostream & |
file, |
|
|
int |
l |
|
) |
| const |
|
virtual |
◆ switch_xyz()
basis basis::switch_xyz |
( |
void |
| ) |
const |
Definition at line 388 of file vec.cpp.
388 {
389 pvecerror(
"basis basis::switch_xyz(void)");
391}
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
file, |
|
|
const basis & |
b |
|
) |
| |
|
friend |
Definition at line 509 of file vec.cpp.
509 {
510 Ifile <<
"basis: name=" << b.
name <<
'\n';
512 int indnsave =
indn.
n;
526
527 return file;
528}
◆ aref
◆ ex
◆ ey
◆ ez
◆ name
The documentation for this class was generated from the following files: