Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
Homogeneous coordinate vector. More...
#include <HomXform.hpp>
Public Member Functions | |
HomCoord () | |
constructors | |
HomCoord (const int coords[], const int num_coords=4) | |
HomCoord (const int coord0, const int coord1, const int coord2, const int coord3) | |
HomCoord (const int coord0, const int coord1, const int coord2) | |
HomCoord (const HomCoord &coord) | |
void | set (const int coords[]) |
set function | |
void | set (const int i, const int j, const int k, const int h=1) |
const int * | hom_coord () const |
get function | |
int | i () const |
parameter-based access functions | |
int | j () const |
int | k () const |
int | h () const |
int | length_squared () const |
squared length | |
int | length () const |
length | |
void | normalize () |
normalize | |
HomCoord & | operator*= (const HomXform &rhs2) |
operators | |
HomCoord | operator* (const HomXform &rhs2) const |
HomCoord & | operator*= (const int mult) |
HomCoord | operator* (const int mult) const |
HomCoord & | operator/= (const HomXform &rhs2) |
HomCoord | operator/ (const HomXform &rhs2) const |
HomCoord & | operator/= (const int mult) |
HomCoord | operator/ (const int mult) const |
HomCoord & | operator+= (const HomCoord &rhs1) |
HomCoord | operator+ (const HomCoord &rhs1) const |
HomCoord & | operator-= (const HomCoord &rhs1) |
HomCoord | operator- (const HomCoord &rhs1) const |
HomCoord & | operator= (const HomCoord &rhs) |
int | operator% (const HomCoord &rhs) const |
HomCoord | operator* (const HomCoord &rhs) const |
HomCoord & | operator*= (const HomCoord &rhs) |
bool | operator== (const HomCoord &rhs1) const |
bool | operator!= (const HomCoord &rhs1) const |
bool | operator>= (const HomCoord &rhs1) const |
bool | operator<= (const HomCoord &rhs1) const |
bool | operator> (const HomCoord &rhs1) const |
bool | operator< (const HomCoord &rhs1) const |
int | operator[] (const int ¶m) const |
int & | operator[] (const int ¶m) |
Static Public Member Functions | |
static HomCoord & | getUnitv (int c) |
Static Public Attributes | |
static MOAB_EXPORT HomCoord | unitv [3] = { HomCoord( 1, 0, 0 ), HomCoord( 0, 1, 0 ), HomCoord( 0, 0, 1 ) } |
static MOAB_EXPORT HomCoord | IDENTITY |
Private Attributes | |
int | homCoord [4] |
coordinate data | |
Friends | |
class | HomXform |
Homogeneous coordinate vector.
Definition at line 48 of file HomXform.hpp.
moab::HomCoord::HomCoord | ( | ) | [inline] |
constructors
Definition at line 215 of file HomXform.hpp.
References homCoord.
Referenced by operator*(), operator*=(), operator+(), operator-(), and operator/().
moab::HomCoord::HomCoord | ( | const int | coords[], |
const int | num_coords = 4 |
||
) | [inline] |
Definition at line 223 of file HomXform.hpp.
References homCoord.
moab::HomCoord::HomCoord | ( | const int | coord0, |
const int | coord1, | ||
const int | coord2, | ||
const int | coord3 | ||
) | [inline] |
moab::HomCoord::HomCoord | ( | const int | coord0, |
const int | coord1, | ||
const int | coord2 | ||
) | [inline] |
moab::HomCoord::HomCoord | ( | const HomCoord & | coord | ) | [inline] |
Definition at line 246 of file HomXform.hpp.
References homCoord.
{ #if defined( __INTEL_COMPILER ) && ( __INTEL_COMPILER < 1310 ) // Hack Intel compiler 12 issues with -O2 optimization int coord0 = coords[0]; int coord1 = coords[1]; int coord2 = coords[2]; int coord3 = coords[3]; homCoord[0] = coord0; homCoord[1] = coord1; homCoord[2] = coord2; homCoord[3] = coord3; #else homCoord[0] = coords[0]; homCoord[1] = coords[1]; homCoord[2] = coords[2]; homCoord[3] = coords[3]; #endif }
HomCoord & moab::HomCoord::getUnitv | ( | int | c | ) | [static] |
int moab::HomCoord::h | ( | ) | const [inline] |
const int* moab::HomCoord::hom_coord | ( | ) | const [inline] |
get function
Definition at line 77 of file HomXform.hpp.
References homCoord.
Referenced by moab::ScdVertexData::get_vertex(), moab::SweptVertexData::get_vertex(), moab::SweptVertexData::i_max(), moab::ScdVertexData::i_max(), moab::SweptVertexData::i_min(), moab::ScdVertexData::i_min(), moab::ScdVertexData::j_max(), moab::SweptVertexData::j_max(), moab::SweptVertexData::j_min(), moab::ScdVertexData::j_min(), moab::ScdVertexData::k_max(), moab::SweptVertexData::k_max(), moab::ScdVertexData::k_min(), and moab::SweptVertexData::k_min().
{ return homCoord; }
int moab::HomCoord::i | ( | ) | const [inline] |
parameter-based access functions
Definition at line 86 of file HomXform.hpp.
References homCoord.
Referenced by moab::ScdElementData::contains(), moab::ScdElementData::contains_vertex(), moab::SequenceManager::create_scd_sequence(), moab::SequenceManager::create_sweep_sequence(), moab::SweptElementSeq::get_element(), moab::StructuredElementSeq::get_element(), moab::SweptVertexData::get_params(), moab::ScdVertexData::get_params(), moab::SweptElementData::get_params(), moab::ScdElementData::get_params(), moab::SweptElementSeq::i_max(), moab::StructuredElementSeq::i_max(), moab::SweptElementSeq::i_min(), moab::StructuredElementSeq::i_min(), moab::SweptElementSeq::max_params(), moab::StructuredElementSeq::max_params(), moab::SweptElementSeq::min_params(), moab::StructuredElementSeq::min_params(), moab::operator<<(), moab::Skinner::skin_box(), and moab::HomXform::three_pt_xform().
{ return homCoord[0]; }
int moab::HomCoord::j | ( | ) | const [inline] |
Definition at line 90 of file HomXform.hpp.
References homCoord.
Referenced by moab::ScdElementData::contains(), moab::ScdElementData::contains_vertex(), moab::SequenceManager::create_scd_sequence(), moab::SequenceManager::create_sweep_sequence(), moab::SweptElementSeq::get_element(), moab::StructuredElementSeq::get_element(), moab::SweptVertexData::get_params(), moab::ScdVertexData::get_params(), moab::SweptElementData::get_params(), moab::ScdElementData::get_params(), moab::SweptElementSeq::j_max(), moab::StructuredElementSeq::j_max(), moab::SweptElementSeq::j_min(), moab::StructuredElementSeq::j_min(), moab::SweptElementSeq::max_params(), moab::StructuredElementSeq::max_params(), moab::SweptElementSeq::min_params(), moab::StructuredElementSeq::min_params(), moab::operator<<(), moab::Skinner::skin_box(), and moab::HomXform::three_pt_xform().
{ return homCoord[1]; }
int moab::HomCoord::k | ( | ) | const [inline] |
Definition at line 94 of file HomXform.hpp.
References homCoord.
Referenced by moab::ScdElementData::contains(), moab::ScdElementData::contains_vertex(), moab::SequenceManager::create_scd_sequence(), moab::SequenceManager::create_sweep_sequence(), moab::SweptElementSeq::get_element(), moab::StructuredElementSeq::get_element(), moab::SweptVertexData::get_params(), moab::ScdVertexData::get_params(), moab::SweptElementData::get_params(), moab::ScdElementData::get_params(), moab::SweptElementSeq::k_max(), moab::StructuredElementSeq::k_max(), moab::SweptElementSeq::k_min(), moab::StructuredElementSeq::k_min(), moab::SweptElementSeq::max_params(), moab::StructuredElementSeq::max_params(), moab::SweptElementSeq::min_params(), moab::StructuredElementSeq::min_params(), moab::operator<<(), moab::Skinner::skin_box(), and moab::HomXform::three_pt_xform().
{ return homCoord[2]; }
int moab::HomCoord::length | ( | ) | const [inline] |
length
Definition at line 298 of file HomXform.hpp.
References length_squared().
Referenced by normalize().
{ return (int)std::sqrt( (float)length_squared() ); }
int moab::HomCoord::length_squared | ( | ) | const [inline] |
void moab::HomCoord::normalize | ( | ) | [inline] |
normalize
Definition at line 304 of file HomXform.hpp.
References length().
Referenced by moab::HomXform::three_pt_xform().
{ *this /= length(); }
bool moab::HomCoord::operator!= | ( | const HomCoord & | rhs1 | ) | const [inline] |
int moab::HomCoord::operator% | ( | const HomCoord & | rhs | ) | const [inline] |
Definition at line 368 of file HomXform.hpp.
References homCoord, HomCoord(), and moab::HomXform::xForm.
{ return HomCoord( // homCoord[0]*rhs2[4*0+0] + homCoord[1]*rhs2[4*1+0] + // homCoord[2]*rhs2[4*2+0] + homCoord[3]*rhs2[4*3+0], homCoord[0] * rhs2.xForm[0] + homCoord[1] * rhs2.xForm[4] + homCoord[2] * rhs2.xForm[8] + homCoord[3] * rhs2.xForm[12], // homCoord[0]*rhs2.xForm[4*0+1] + homCoord[1]*rhs2.xForm[4*1+1] + // homCoord[2]*rhs2.xForm[4*2+1] + homCoord[3]*rhs2.xForm[4*3+1], homCoord[0] * rhs2.xForm[1] + homCoord[1] * rhs2.xForm[5] + homCoord[2] * rhs2.xForm[9] + homCoord[3] * rhs2.xForm[13], // homCoord[0]*rhs2.xForm[4*0+2] + homCoord[1]*rhs2.xForm[4*1+2] + // homCoord[2]*rhs2.xForm[4*2+2] + homCoord[3]*rhs2.xForm[4*3+2], homCoord[0] * rhs2.xForm[2] + homCoord[1] * rhs2.xForm[6] + homCoord[2] * rhs2.xForm[10] + homCoord[3] * rhs2.xForm[14], // homCoord[0]*rhs2.xForm[4*0+3] + homCoord[1]*rhs2.xForm[4*1+3] + // homCoord[2]*rhs2.xForm[4*2+3] + homCoord[3]*rhs2.xForm[4*3+3] homCoord[0] * rhs2.xForm[3] + homCoord[1] * rhs2.xForm[7] + homCoord[2] * rhs2.xForm[11] + homCoord[3] * rhs2.xForm[15] ); }
HomCoord moab::HomCoord::operator* | ( | const int | mult | ) | const [inline] |
Definition at line 417 of file HomXform.hpp.
References homCoord, and HomCoord().
operators
Definition at line 392 of file HomXform.hpp.
References homCoord, HomCoord(), and moab::HomXform::xForm.
{ *this = HomCoord( // homCoord[0]*rhs2.xForm[4*0+0] + homCoord[1]*rhs2.xForm[4*1+0] + // homCoord[2]*rhs2.xForm[4*2+0] + homCoord[3]*rhs2.xForm[4*3+0], homCoord[0] * rhs2.xForm[0] + homCoord[1] * rhs2.xForm[4] + homCoord[2] * rhs2.xForm[8] + homCoord[3] * rhs2.xForm[12], // homCoord[0]*rhs2.xForm[4*0+1] + homCoord[1]*rhs2.xForm[4*1+1] + // homCoord[2]*rhs2.xForm[4*2+1] + homCoord[3]*rhs2.xForm[4*3+1], homCoord[0] * rhs2.xForm[1] + homCoord[1] * rhs2.xForm[5] + homCoord[2] * rhs2.xForm[9] + homCoord[3] * rhs2.xForm[13], // homCoord[0]*rhs2.xForm[4*0+2] + homCoord[1]*rhs2.xForm[4*1+2] + // homCoord[2]*rhs2.xForm[4*2+2] + homCoord[3]*rhs2.xForm[4*3+2], homCoord[0] * rhs2.xForm[2] + homCoord[1] * rhs2.xForm[6] + homCoord[2] * rhs2.xForm[10] + homCoord[3] * rhs2.xForm[14], // homCoord[0]*rhs2.xForm[4*0+3] + homCoord[1]*rhs2.xForm[4*1+3] + // homCoord[2]*rhs2.xForm[4*2+3] + homCoord[3]*rhs2.xForm[4*3+3] homCoord[0] * rhs2.xForm[3] + homCoord[1] * rhs2.xForm[7] + homCoord[2] * rhs2.xForm[11] + homCoord[3] * rhs2.xForm[15] ); return *this; }
HomCoord & moab::HomCoord::operator*= | ( | const int | mult | ) | [inline] |
Definition at line 323 of file HomXform.hpp.
References homCoord, and HomCoord().
Definition at line 456 of file HomXform.hpp.
References HomCoord().
{ return HomCoord( *this ) += rhs2; }
Definition at line 443 of file HomXform.hpp.
References HomCoord().
{ return HomCoord( *this ) -= rhs2; }
Definition at line 469 of file HomXform.hpp.
References HomCoord().
{ return HomCoord( *this ) /= rhs2; }
HomCoord moab::HomCoord::operator/ | ( | const int | mult | ) | const [inline] |
Definition at line 430 of file HomXform.hpp.
References homCoord, and HomCoord().
Definition at line 474 of file HomXform.hpp.
References moab::HomXform::inverse().
{ HomXform inv = rhs2.inverse(); *this *= inv; return *this; }
HomCoord & moab::HomCoord::operator/= | ( | const int | mult | ) | [inline] |
bool moab::HomCoord::operator< | ( | const HomCoord & | rhs1 | ) | const [inline] |
bool moab::HomCoord::operator<= | ( | const HomCoord & | rhs1 | ) | const [inline] |
bool moab::HomCoord::operator== | ( | const HomCoord & | rhs1 | ) | const [inline] |
bool moab::HomCoord::operator> | ( | const HomCoord & | rhs1 | ) | const [inline] |
bool moab::HomCoord::operator>= | ( | const HomCoord & | rhs1 | ) | const [inline] |
int moab::HomCoord::operator[] | ( | const int & | param | ) | const [inline] |
int & moab::HomCoord::operator[] | ( | const int & | param | ) | [inline] |
void moab::HomCoord::set | ( | const int | coords[] | ) | [inline] |
set function
Definition at line 266 of file HomXform.hpp.
References homCoord.
Referenced by moab::ScdInterface::construct_box(), and moab::HomXform::three_pt_xform().
void moab::HomCoord::set | ( | const int | i, |
const int | j, | ||
const int | k, | ||
const int | h = 1 |
||
) | [inline] |
friend class HomXform [friend] |
Definition at line 60 of file HomXform.hpp.
int moab::HomCoord::homCoord[4] [private] |
coordinate data
Definition at line 56 of file HomXform.hpp.
Referenced by h(), hom_coord(), HomCoord(), i(), j(), k(), length_squared(), operator!=(), operator%(), operator*(), operator*=(), operator+=(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), operator[](), set(), and moab::HomXform::three_pt_xform().
HomCoord moab::HomCoord::IDENTITY [static] |
Definition at line 63 of file HomXform.hpp.
HomCoord moab::HomCoord::unitv = { HomCoord( 1, 0, 0 ), HomCoord( 0, 1, 0 ), HomCoord( 0, 0, 1 ) } [static] |
Definition at line 62 of file HomXform.hpp.
Referenced by moab::SequenceManager::add_vsequence(), moab::SweptElementData::boundary_complete(), moab::ScdElementData::boundary_complete(), and getUnitv().