MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Cartesian Vector. More...
#include <CartVect.hpp>
Public Member Functions | |
CartVect () | |
CartVect (double v) | |
CartVect (double i, double j, double k) | |
CartVect (const double a[3]) | |
CartVect & | operator= (const double v[3]) |
double & | operator[] (unsigned i) |
double | operator[] (unsigned i) const |
CartVect & | operator+= (const CartVect &v) |
CartVect & | operator-= (const CartVect &v) |
CartVect & | operator*= (const CartVect &v) |
CartVect & | operator+= (double s) |
CartVect & | operator-= (double s) |
CartVect & | operator*= (double s) |
CartVect & | operator/= (double s) |
bool | operator== (const CartVect &v) const |
bool | operator== (double val) const |
double | length () const |
vector length | |
double | length_squared () const |
void | normalize () |
make unit length, or 0 if length < DBL_MIN | |
void | flip () |
flip direction | |
void | scale (const CartVect &v) |
double * | array () |
const double * | array () const |
void | get (double v[3]) const |
void | get (float v[3]) const |
Private Attributes | |
double | d [3] |
Cartesian Vector.
Definition at line 14 of file CartVect.hpp.
moab::CartVect::CartVect | ( | ) | [inline] |
Definition at line 20 of file CartVect.hpp.
{}
moab::CartVect::CartVect | ( | double | v | ) | [inline, explicit] |
moab::CartVect::CartVect | ( | double | i, |
double | j, | ||
double | k | ||
) | [inline] |
moab::CartVect::CartVect | ( | const double | a[3] | ) | [inline, explicit] |
double* moab::CartVect::array | ( | ) | [inline] |
Definition at line 127 of file CartVect.hpp.
References d.
Referenced by moab::AffineXform::accumulate(), assert_vectors_equal(), moab::BoundBox::BoundBox(), moab::box_from_axes(), moab::AdaptiveKDTreeIter::box_max(), moab::AdaptiveKDTreeIter::box_min(), moab::BoxPlaneIter::BoxPlaneIter(), moab::BVHTree::bruteforce_find(), moab::AdaptiveKDTree::build_tree(), moab::BVHTree::build_tree(), build_tree(), moab::BSPTreeIter::calculate_polyhedron(), check_ray_intersect_sets(), check_ray_intersect_tris(), moab::GeomQueryTool::closest_to_location(), moab::AdaptiveKDTree::closest_triangle(), moab::OrientedBox::compute_from_vertices(), moab::BVHTree::distance_search(), moab::AdaptiveKDTree::distance_search(), do_closest_point_test(), moab::IntxUtils::EdgeIntxRllCs(), moab::LinearTet::evaluate_reverse(), moab::LinearTri::evaluate_reverse(), moab::EvalSet::evaluate_reverse(), FBiGeom_getEntBoundBox(), moab::MergeMesh::find_merged_to(), moab::BVHTree::find_point(), moab::GeomQueryTool::find_volume(), moab::Intx2MeshInPlane::findNodes(), moab::IntxRllCssphere::findNodes(), moab::Intx2MeshOnSphere::findNodes(), moab::OrientedBoxTreeTool::get_close_tris(), moab::ElemEvaluator::get_normal(), moab::ElemEvaluator::get_vert_pos(), moab::FBEngine::getEntBoundBox(), moab::IntxUtils::global_gnomonic_projection(), moab::SmoothFace::init_gradient(), moab::Element::Map::inside_box(), moab::ElemEvaluator::integrate(), moab::LinearQuad::integrateFcn(), moab::LinearHex::integrateFcn(), moab::ElemEvaluator::jacobian(), main(), moab::OrientedBox::make_hex(), moab::AdaptiveKDTree::point_search(), moab::BVHTree::point_search(), moab::GeomQueryTool::poly_solid_angle(), moab::ray_intersect_halfspaces(), moab::ElemEvaluator::reverse_eval(), set_departure_points_position(), moab::ElemEvaluator::set_ent_handle(), tag_vertices(), test_accumulate(), test_bound_box(), test_closest_to_location(), test_closest_triangle(), test_eval(), test_inversion(), test_none(), test_point_search(), test_ray_fire(), test_ray_intersect_triangles(), test_reflection(), test_rotation(), test_rotation_from_vec(), test_scale(), test_translation(), moab::GeomQueryTool::test_volume_boundary(), moab::BoundBox::update(), moab::ReadNCDF::update(), and moab::BoundBox::update_box_spherical_elem().
{ return d; }
const double* moab::CartVect::array | ( | ) | const [inline] |
void moab::CartVect::flip | ( | ) | [inline] |
void moab::CartVect::get | ( | double | v[3] | ) | const [inline] |
initialize double array from this
Definition at line 137 of file CartVect.hpp.
References d.
Referenced by moab::OrientedBoxTreeTool::box(), moab::OrientedBoxTreeTool::closest_to_location(), moab::AdaptiveKDTree::closest_triangle(), moab::AdaptiveKDTree::find_close_triangle(), moab::BoundBox::get(), moab::AdaptiveKDTree::get_info(), moab::GeomQueryTool::get_normal(), moab::WriteSTL::get_triangle_data(), moab::ElemUtil::hex_eval(), moab::ElemUtil::hex_findpt(), moab::Element::SpectralHex::ievaluate(), moab::Element::SpectralQuad::ievaluate(), moab::SmoothFace::init_gradient(), moab::Coupler::initialize_tree(), moab::Element::SpectralHex::jacobian(), main(), moab::ElemUtil::nat_coords_trilinear_hex2(), and moab::plane_cut_edge().
void moab::CartVect::get | ( | float | v[3] | ) | const [inline] |
double moab::CartVect::length | ( | ) | const [inline] |
vector length
Definition at line 180 of file CartVect.hpp.
Referenced by moab::SmoothFace::area(), moab::area_coordinates(), axis_dims(), moab::box_from_axes(), moab::IntxUtils::cart_to_spherical(), check_equal_eigvect(), moab::SmoothCurve::compute_control_points_on_boundary_edges(), compute_dual_mesh(), moab::FBEngine::compute_intersection_points(), compute_lagrange_mesh_on_sphere(), moab::OrientedBox::contained(), moab::OrientedBox::dimensions(), do_closest_point_test(), edge_length(), find_angle(), moab::SmoothFace::init_edge_control_points(), moab::SmoothFace::init_facet_control_points(), moab::Coupler::initialize_tree(), moab::OrientedBox::inner_radius(), main(), manufacture_lagrange_mesh_on_sphere(), moab::FBEngine::measure(), moab::GeomQueryTool::measure_area(), normalize(), moab::OrientedBox::order_axes_by_length(), moab::OrientedBox::OrientedBox(), moab::OrientedBox::outer_radius(), moab::GeomQueryTool::poly_solid_angle(), moab::SmoothFace::project_to_patch(), moab::SmoothFace::ray_intersection_correct(), moab::AffineXform::rotation(), moab::IntxUtils::ScaleToRadius(), moab::element_utility::Linear_hex_map< moab::Matrix3 >::solve_inverse(), moab::Element::SphericalQuad::SphericalQuad(), moab::Element::SphericalTri::SphericalTri(), test_basic(), test_EigenDecomp(), test_reflection(), test_rotation(), test_rotation_from_vec(), moab::unit(), moab::ReadNCDF::update(), and TreeValidator::visit().
{ return std::sqrt( *this % *this ); }
double moab::CartVect::length_squared | ( | ) | const [inline] |
Definition at line 185 of file CartVect.hpp.
References d.
Referenced by DeformMeshRemap::deform_master(), moab::IntxUtils::intersect_great_circle_arc_with_clat_arc(), moab::IntxUtils::intersect_great_circle_arcs(), make_tris_from_quad(), perform_laplacian_smoothing(), moab::ParallelMergeMesh::PopulateMyMatches(), moab::element_utility::Linear_hex_map< moab::Matrix3 >::solve_inverse(), moab::IntxAreaUtils::spherical_angle(), moab::SmoothCurve::u_from_position(), and moab::FBEngine::weave_lateral_face_from_edges().
void moab::CartVect::normalize | ( | ) | [inline] |
make unit length, or 0 if length < DBL_MIN
Definition at line 190 of file CartVect.hpp.
Referenced by build_tree(), moab::FBEngine::chain_able_edge(), moab::FBEngine::compute_intersection_points(), moab::SmoothFace::compute_tangents_for_each_edge(), moab::SmoothCurve::compute_tangents_for_each_edge(), moab::SmoothFace::eval_bezier_patch_normal(), moab::GeomQueryTool::find_volume(), generate_ray(), moab::GeomQueryTool::get_normal(), moab::WriteSTL::get_triangle_data(), moab::FBEngine::getEntNrmlXYZ(), getLat(), getLon(), moab::SmoothFace::init_gradient(), moab::IntxUtils::intersect_great_circle_arcs(), parse_ray(), refl(), moab::AffineXform::rotation(), moab::FBEngine::split_surface_with_direction(), test_box_plane_edge(), test_EigenDecomp(), test_ray_intersect(), and moab::FBEngine::weave_lateral_face_from_edges().
Assign cross product to this
Definition at line 175 of file CartVect.hpp.
{ return *this = *this * v; }
CartVect& moab::CartVect::operator*= | ( | double | s | ) | [inline] |
CartVect& moab::CartVect::operator+= | ( | double | s | ) | [inline] |
CartVect& moab::CartVect::operator-= | ( | double | s | ) | [inline] |
CartVect& moab::CartVect::operator/= | ( | double | s | ) | [inline] |
CartVect& moab::CartVect::operator= | ( | const double | v[3] | ) | [inline] |
bool moab::CartVect::operator== | ( | const CartVect & | v | ) | const [inline] |
Definition at line 101 of file CartVect.hpp.
References d.
bool moab::CartVect::operator== | ( | double | val | ) | const [inline] |
Definition at line 105 of file CartVect.hpp.
References d.
double& moab::CartVect::operator[] | ( | unsigned | i | ) | [inline] |
double moab::CartVect::operator[] | ( | unsigned | i | ) | const [inline] |
void moab::CartVect::scale | ( | const CartVect & | v | ) | [inline] |
per-element scalar multiply (this[0] *= v[0], this[1] *= v[1], ...)
Definition at line 119 of file CartVect.hpp.
References d.
Referenced by perform_laplacian_smoothing().
double moab::CartVect::d[3] [private] |
Definition at line 17 of file CartVect.hpp.
Referenced by array(), CartVect(), flip(), get(), length_squared(), normalize(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator==(), operator[](), and scale().