Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Kdtree_d< Traits >::Node::Plane Class Reference

#include <kdtree_d.h>

Public Member Functions

 Plane ()
 
 Plane (int k, Point &p)
 
 Plane (Plane &p)
 
void dump (void)
 
bool is_in (const Point &p) const
 
void set_plane (int k, Point &p)
 
void split (Box &region, bool f_neg)
 
void orient_half_space (bool f_neg_side)
 
int get_coord () const
 

Private Attributes

int coord
 
Pointnormal
 
bool f_plus
 

Detailed Description

template<class Traits>
class Kdtree_d< Traits >::Node::Plane

Definition at line 561 of file kdtree_d.h.

Constructor & Destructor Documentation

Plane ( )
inline

Definition at line 570 of file kdtree_d.h.

570 : coord( 0), normal(NULL), f_plus(false) {}
Plane ( int  k,
Point p 
)
inline

Definition at line 572 of file kdtree_d.h.

572 : coord(k), normal(&p), f_plus(false) {}
j indices k indices k
Definition: Indexing.h:6
Plane ( Plane p)
inline

Definition at line 574 of file kdtree_d.h.

574 : coord( p.coord), normal( p.normal), f_plus(p.f_plus){}

Member Function Documentation

void dump ( void  )
inline

Definition at line 576 of file kdtree_d.h.

References Kdtree_d< Traits >::Node::Plane::coord, and Kdtree_d< Traits >::Node::Plane::normal.

Referenced by Kdtree_d< Traits >::Node::dump().

577  {
578  std::cout << "(" << coord << ": " << *normal << ")";
579  }

Here is the caller graph for this function:

int get_coord ( ) const
inline

Definition at line 617 of file kdtree_d.h.

References Kdtree_d< Traits >::Node::Plane::coord.

Referenced by Kdtree_d< Traits >::Node::search_recursive().

618  {
619  return coord;
620  }

Here is the caller graph for this function:

bool is_in ( const Point p) const
inline

Definition at line 581 of file kdtree_d.h.

References CGAL::compare(), Kdtree_d< Traits >::Node::Plane::coord, Kdtree_d< Traits >::Node::Plane::f_plus, and Kdtree_d< Traits >::Node::Plane::normal.

Referenced by Kdtree_d< Traits >::Node::is_points_in_hs().

582  {
583  int cmp;
584 
585  cmp = Traits::compare( coord, p, *normal );
586 
587  if ( ! f_plus )
588  cmp = -cmp;
589 
590  return cmp >= 0;
591  }
CGAL_KERNEL_INLINE Comparison_result compare(const NT &n1, const NT &n2)
Definition: number_utils.h:143

Here is the call graph for this function:

Here is the caller graph for this function:

void orient_half_space ( bool  f_neg_side)
inline

Definition at line 612 of file kdtree_d.h.

References Kdtree_d< Traits >::Node::Plane::f_plus.

Referenced by Kdtree_d< Traits >::Node::get_hs().

613  {
614  f_plus = ! f_neg_side;
615  }

Here is the caller graph for this function:

void set_plane ( int  k,
Point p 
)
inline

Definition at line 593 of file kdtree_d.h.

References Kdtree_d< Traits >::Node::Plane::coord, k, and Kdtree_d< Traits >::Node::Plane::normal.

594  {
595  coord = k;
596  normal = &p;
597  //normal->copy( coord, p );
598  }
j indices k indices k
Definition: Indexing.h:6
void split ( Box region,
bool  f_neg 
)
inline

Definition at line 600 of file kdtree_d.h.

References Kdtree_d< Traits >::ExtPoint::compare(), Kdtree_d< Traits >::Node::Plane::coord, Kdtree_d< Traits >::Box::get_vertex(), Kdtree_d< Traits >::Node::Plane::normal, and Kdtree_d< Traits >::ExtPoint::set_coord().

Referenced by peri_printuserinput(), and Kdtree_d< Traits >::Node::search_recursive().

601  {
602  ExtPoint * p_p = &(region.get_vertex( ! f_neg ));
603 
604  if ( f_neg ) {
605  if ( p_p->compare( coord, *normal ) > 0 )
606  p_p->set_coord( coord, *normal );
607  } else
608  if ( p_p->compare( coord, *normal ) < 0 )
609  p_p->set_coord( coord, *normal );
610  }

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool f_plus
private

The documentation for this class was generated from the following file: