SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
SCIRun::Core::Geometry Namespace Reference

Classes

class  BBox
 
class  Plane
 
class  Point
 
class  Tensor
 
class  Transform
 
class  Vector
 

Functions

SCISHARE void Pio (Piostream &, BBox &)
 
double distance_to_line2 (const Point &p, const Point &a, const Point &b, const double epsilon)
 
void distance_to_line2_aux (Point &result, const Point &p, const Point &a, const Point &b, const double epsilon)
 
void distance_to_line2_aux (Point &result, int &node, const Point &p, const Point &a, const Point &b, const double epsilon)
 
void closest_point_on_tri (Point &result, const Point &orig, const Point &p0, const Point &p1, const Point &p2, const double epsilon)
 
void closest_point_on_tri (Point &result, int &edge, int &node, const Point &orig, const Point &p0, const Point &p1, const Point &p2, const double epsilon)
 
void est_closest_point_on_quad (Point &result, const Point &orig, const Point &p0, const Point &p1, const Point &p2, const Point &p3, const double epsilon)
 
double RayPlaneIntersection (const Point &p, const Vector &dir, const Point &p0, const Vector &pn, const double epsilon)
 
bool RayTriangleIntersection (double &t, double &u, double &v, bool backface_cull, const Point &orig, const Vector &dir, const Point &p0, const Point &p1, const Point &p2, const double epsilon)
 
bool closest_line_to_line (double &s, double &t, const Point &a0, const Point &a1, const Point &b0, const Point &b1, const double epsilon)
 
void uniform_sample_triangle (Point &p, const Point &p0, const Point &p1, const Point &p2, MusilRNG &rng)
 
void uniform_sample_tetrahedra (Point &p, const Point &p0, const Point &p1, const Point &p2, const Point &p3, MusilRNG &rng)
 
double tetrahedra_volume (const Point &p0, const Point &p1, const Point &p2, const Point &p3)
 
void TriTriIntersection (const Point &A0, const Point &A1, const Point &A2, const Point &B0, const Point &B1, const Point &B2, std::vector< Point > &results)
 
SCISHARE bool operator== (const Point &p1, const Point &p2)
 
SCISHARE bool operator!= (const Point &p1, const Point &p2)
 
SCISHARE Point AffineCombination (const Point &, double, const Point &, double, const Point &, double, const Point &, double)
 
SCISHARE Point AffineCombination (const Point &, double, const Point &, double, const Point &, double)
 
SCISHARE Point AffineCombination (const Point &, double, const Point &, double)
 
SCISHARE void Pio (Piostream &, Point &)
 
Point operator* (double d, const Point &p)
 
Point operator+ (const Vector &v, const Point &p)
 
SCISHARE std::ostream & operator<< (std::ostream &os, const Point &p)
 
SCISHARE std::istream & operator>> (std::istream &os, Point &p)
 
SCISHARE Point centroid (const std::vector< Point > &points)
 
Point Min (const Point &p1, const Point &p2)
 
Point Max (const Point &p1, const Point &p2)
 
double Dot (const Vector &v1, const Vector &v2)
 
double Dot (const Vector &v, const Point &p)
 
Point Interpolate (const Point &v1, const Point &v2, double weight)
 
double Dot (const Point &p, const Vector &v)
 
double Dot (const Point &p1, const Point &p2)
 
SCISHARE void Pio (Piostream &, Tensor &)
 
bool operator< (Tensor t1, Tensor t2)
 
bool operator<= (Tensor t1, Tensor t2)
 
bool operator> (Tensor t1, Tensor t2)
 
bool operator>= (Tensor t1, Tensor t2)
 
Tensor operator* (double d, const Tensor &t)
 
SCISHARE std::ostream & operator<< (std::ostream &os, const Tensor &t)
 
SCISHARE std::istream & operator>> (std::istream &os, Tensor &t)
 
SCISHARE const TypeDescriptionget_type_description (Tensor *)
 
SCISHARE Point operator* (Transform &t, const Point &d)
 
SCISHARE Vector operator* (Transform &t, const Vector &d)
 
SCISHARE Tensor operator* (const Transform &t, const Tensor &d)
 
SCISHARE Tensor operator* (const Tensor &d, const Transform &t)
 
SCISHARE void Pio (Piostream &, Transform *&)
 
SCISHARE void Pio_old (Piostream &, Transform &)
 
SCISHARE const TypeDescriptionget_type_description (Transform *)
 
template<typename T >
const T & Min (const T &t1, const T &t2, const T &t3)
 
template<typename T >
const T & Max (const T &t1, const T &t2, const T &t3)
 
SCISHARE bool operator== (const Vector &v1, const Vector &v2)
 
SCISHARE bool operator!= (const Vector &v1, const Vector &v2)
 
SCISHARE std::ostream & operator<< (std::ostream &os, const Vector &p)
 
SCISHARE std::istream & operator>> (std::istream &os, Vector &p)
 
Vector operator* (const double s, const Vector &v)
 
Vector Min (const Vector &v1, const Vector &v2)
 
Vector Max (const Vector &v1, const Vector &v2)
 
SCISHARE void Pio (Piostream &, Vector &)
 
bool operator< (Vector v1, Vector v2)
 
bool operator<= (Vector v1, Vector v2)
 
bool operator> (Vector v1, Vector v2)
 
bool operator>= (Vector v1, Vector v2)
 
Vector Abs (const Vector &v)
 
Vector Cross (const Vector &v1, const Vector &v2)
 
Vector Interpolate (const Vector &v1, const Vector &v2, double weight)
 
SCISHARE const TypeDescriptionget_type_description (Vector *)
 

Function Documentation

Vector SCIRun::Core::Geometry::Abs ( const Vector &  v)
inline
SCISHARE Point SCIRun::Core::Geometry::AffineCombination ( const Point &  ,
double  ,
const Point &  ,
double  ,
const Point &  ,
double  ,
const Point &  ,
double   
)
SCISHARE Point SCIRun::Core::Geometry::AffineCombination ( const Point &  ,
double  ,
const Point &  ,
double  ,
const Point &  ,
double   
)
SCISHARE Point SCIRun::Core::Geometry::AffineCombination ( const Point &  ,
double  ,
const Point &  ,
double   
)
SCISHARE Point SCIRun::Core::Geometry::centroid ( const std::vector< Point > &  points)
SCISHARE bool closest_line_to_line ( double &  s,
double &  t,
const Point &  A0,
const Point &  A1,
const Point &  B0,
const Point &  B1,
const double  epsilon = 1e-12 
)

Compute s and t such that the distance between A0 + s * (A1 - AO) and B0 + t * (B1 - B0) is minimal. Return false if the lines are parallel, true otherwise.

SCISHARE void closest_point_on_tri ( Point &  result,
const Point &  P,
const Point &  A,
const Point &  B,
const Point &  C,
const double  epsilon = 1e-12 
)

Compute the point on the triangle closest to the given point. The distance to the triangle will be (P - result).length())

SCISHARE void closest_point_on_tri ( Point &  result,
int &  edge,
int &  node,
const Point &  orig,
const Point &  p0,
const Point &  p1,
const Point &  p2,
const double  epsilon 
)
Vector SCIRun::Core::Geometry::Cross ( const Vector &  v1,
const Vector &  v2 
)
inline
SCISHARE double distance_to_line2 ( const Point &  p,
const Point &  a,
const Point &  b,
const double  epsilon = 1e-12 
)

Compute the distance squared from the point to the given line, where the line is specified by two end points. This function actually computes the distance to the line segment between the given points and not to the line itself.

SCISHARE void distance_to_line2_aux ( Point &  result,
const Point &  p,
const Point &  a,
const Point &  b,
const double  epsilon 
)
SCISHARE void distance_to_line2_aux ( Point &  result,
int &  node,
const Point &  p,
const Point &  a,
const Point &  b,
const double  epsilon 
)
double SCIRun::Core::Geometry::Dot ( const Vector &  v1,
const Vector &  v2 
)
inline
double SCIRun::Core::Geometry::Dot ( const Vector &  v,
const Point &  p 
)
inline
double SCIRun::Core::Geometry::Dot ( const Point &  p,
const Vector &  v 
)
inline
double SCIRun::Core::Geometry::Dot ( const Point &  p1,
const Point &  p2 
)
inline
SCISHARE void est_closest_point_on_quad ( Point &  result,
const Point &  P,
const Point &  A,
const Point &  B,
const Point &  C,
const Point &  D,
const double  epsilon = 1e-12 
)

This is only an estimate for an element that is not flat, it is exact for a flat element.

SCISHARE const TypeDescription* SCIRun::Core::Geometry::get_type_description ( Transform )
const TypeDescription * get_type_description ( Tensor )
const TypeDescription * get_type_description ( Vector )
Point SCIRun::Core::Geometry::Interpolate ( const Point &  v1,
const Point &  v2,
double  weight 
)
inline
Vector SCIRun::Core::Geometry::Interpolate ( const Vector &  v1,
const Vector &  v2,
double  weight 
)
inline
const T& SCIRun::Core::Geometry::Max ( const T &  t1,
const T &  t2,
const T &  t3 
)
inline
Point SCIRun::Core::Geometry::Max ( const Point &  p1,
const Point &  p2 
)
inline
Vector SCIRun::Core::Geometry::Max ( const Vector &  v1,
const Vector &  v2 
)
inline
const T& SCIRun::Core::Geometry::Min ( const T &  t1,
const T &  t2,
const T &  t3 
)
inline
Todo:
move to math header
Point SCIRun::Core::Geometry::Min ( const Point &  p1,
const Point &  p2 
)
inline
Vector SCIRun::Core::Geometry::Min ( const Vector &  v1,
const Vector &  v2 
)
inline
bool operator!= ( const Point p1,
const Point p2 
)
bool operator!= ( const Vector v1,
const Vector v2 
)
Point operator* ( Transform t,
const Point d 
)
Vector operator* ( Transform t,
const Vector d 
)
Tensor SCIRun::Core::Geometry::operator* ( double  d,
const Tensor &  t 
)
inline
Tensor operator* ( const Transform t,
const Tensor d 
)
Tensor operator* ( const Tensor d,
const Transform t 
)
Point SCIRun::Core::Geometry::operator* ( double  d,
const Point &  p 
)
inline
Vector SCIRun::Core::Geometry::operator* ( const double  s,
const Vector &  v 
)
inline
Point SCIRun::Core::Geometry::operator+ ( const Vector &  v,
const Point &  p 
)
inline
bool SCIRun::Core::Geometry::operator< ( Tensor  t1,
Tensor  t2 
)
inline
bool SCIRun::Core::Geometry::operator< ( Vector  v1,
Vector  v2 
)
inline
std::ostream & operator<< ( std::ostream &  os,
const Vector p 
)
SCISHARE std::ostream& SCIRun::Core::Geometry::operator<< ( std::ostream &  os,
const Tensor t 
)
std::ostream & operator<< ( std::ostream &  os,
const Point p 
)
bool SCIRun::Core::Geometry::operator<= ( Tensor  t1,
Tensor  t2 
)
inline
bool SCIRun::Core::Geometry::operator<= ( Vector  v1,
Vector  v2 
)
inline
bool operator== ( const Point p1,
const Point p2 
)
bool operator== ( const Vector v1,
const Vector v2 
)
bool SCIRun::Core::Geometry::operator> ( Tensor  t1,
Tensor  t2 
)
inline
bool SCIRun::Core::Geometry::operator> ( Vector  v1,
Vector  v2 
)
inline
bool SCIRun::Core::Geometry::operator>= ( Tensor  t1,
Tensor  t2 
)
inline
bool SCIRun::Core::Geometry::operator>= ( Vector  v1,
Vector  v2 
)
inline
SCISHARE std::istream& SCIRun::Core::Geometry::operator>> ( std::istream &  os,
Vector &  p 
)
SCISHARE std::istream& SCIRun::Core::Geometry::operator>> ( std::istream &  os,
Tensor t 
)
std::istream & operator>> ( std::istream &  os,
Point p 
)
void Pio ( Piostream stream,
Tensor t 
)
void Pio ( Piostream stream,
Transform *&  obj 
)
void Pio ( Piostream stream,
Point p 
)
void Pio ( Piostream stream,
Vector p 
)
SCISHARE void SCIRun::Core::Geometry::Pio ( Piostream ,
BBox  
)
void Pio_old ( Piostream stream,
Transform obj 
)
SCISHARE double RayPlaneIntersection ( const Point &  p,
const Vector &  dir,
const Point &  p0,
const Vector &  pn,
const double  epsilon 
)
SCISHARE bool RayTriangleIntersection ( double &  t,
double &  u,
double &  v,
bool  backface_cull,
const Point &  orig,
const Vector &  dir,
const Point &  p0,
const Point &  p1,
const Point &  p2,
const double  epsilon 
)
SCISHARE double tetrahedra_volume ( const Point &  p0,
const Point &  p1,
const Point &  p2,
const Point &  p3 
)
SCISHARE void TriTriIntersection ( const Point &  A0,
const Point &  A1,
const Point &  A2,
const Point &  B0,
const Point &  B1,
const Point &  B2,
std::vector< Point > &  results 
)
SCISHARE void uniform_sample_tetrahedra ( Point &  p,
const Point &  p0,
const Point &  p1,
const Point &  p2,
const Point &  p3,
MusilRNG rng 
)
SCISHARE void uniform_sample_triangle ( Point &  p,
const Point &  p0,
const Point &  p1,
const Point &  p2,
MusilRNG rng 
)