SheafSystem  0.0.0.0
geometry::line_surface_intersecter Class Reference

A line-surface intersection query. More...

#include <line_surface_intersecter.h>

Inheritance diagram for geometry::line_surface_intersecter:
sheaf::any

Classes

struct  really_less_than
 Compare functor makes sure surface values are really different. More...
 

Friends

SHEAF_DLL_SPEC std::ostream & operator<< (std::ostream &os, const line_surface_intersecter &xp)
 Insert line_surface_intersecter xp in ostream xos. More...
 

LINE_SURFACE_INTERSECTER FACET

typedef std::map< sec_vd_value_type, pod_index_type, really_less_thanintersection_set_type
 The type of intersetion set, a map from z coordinate to surface id; sorted by z coordinate. More...
 
typedef d_bounding_box< 3, 2 > box_type
 The type of search structure box. More...
 
typedef d_array_point_locator< 3, 2 > search_structure_type
 The type of collision search structure. More...
 
typedef search_structure_type::box_set_type box_set_type
 The type of search structure box set. More...
 
sec_e3_coords
 The coordinate section for lines. More...
 
base_space_poset_host
 The base space. More...
 
index_space_handle_surface_id_space
 The surface id space. More...
 
index_space_handle_eval_id_space
 The id space for surface evaluators. More...
 
linear_2d _evaluator
 The evaluator for surface sections; temporarily assumes triangle. More...
 
search_structure_type_locator
 The intersection search structure. More...
 
 line_surface_intersecter (sec_e3 &xcoords, const block< size_type > &xbin_ubs)
 Creates an intersector with surfaces defined by coordinate section xcoords. Allocates a search structure with bin index upper bounds xbin_ubs. More...
 
 line_surface_intersecter (const line_surface_intersecter &xother)
 Copy constructor. More...
 
virtual ~line_surface_intersecter ()
 Destructor. More...
 
const sec_e3coords () const
 The section space containing the surfaces. More...
 
void intersect (const e3_lite &xp0, const e3_lite &xp1, intersection_set_type &xresult) const
 Computes the intersections of the line passing through points xp0 and xp1 with the surfaces defined by coords(). More...
 
 line_surface_intersecter ()
 Default constructor; disabled. More...
 
bool intersect (const e3_lite &xp0, const e3_lite &xp1, const d_bounding_box< 3, 2 > &xbox, e3_lite &xr) const
 Computes the intersection xr of the line passing through points xp0 and xp1 with the surface evaluator contained in xbox. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 
virtual line_surface_intersecterclone () const
 Virtual constructor, makes a new instance of the same type as this. More...
 
line_surface_intersecteroperator= (const line_surface_intersecter &xother)
 Assignment operator. More...
 
virtual bool invariant () const
 Class invariant. More...
 

Additional Inherited Members

- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

A line-surface intersection query.

Hack:
Currently implemented only for lines aligned with the z axis and for triangle meshes.

Definition at line 79 of file line_surface_intersecter.h.

Member Typedef Documentation

◆ box_set_type

The type of search structure box set.

Definition at line 184 of file line_surface_intersecter.h.

◆ box_type

The type of search structure box.

Definition at line 134 of file line_surface_intersecter.h.

◆ intersection_set_type

The type of intersetion set, a map from z coordinate to surface id; sorted by z coordinate.

Definition at line 129 of file line_surface_intersecter.h.

◆ search_structure_type

The type of collision search structure.

Definition at line 179 of file line_surface_intersecter.h.

Constructor & Destructor Documentation

◆ line_surface_intersecter() [1/3]

geometry::line_surface_intersecter::line_surface_intersecter ( sec_e3 xcoords,
const block< size_type > &  xbin_ubs 
)

Creates an intersector with surfaces defined by coordinate section xcoords. Allocates a search structure with bin index upper bounds xbin_ubs.

Postcondition

Definition at line 45 of file line_surface_intersecter.cc.

References sheaf::poset_component::get_read_access(), and line_surface_intersecter().

◆ line_surface_intersecter() [2/3]

geometry::line_surface_intersecter::line_surface_intersecter ( const line_surface_intersecter xother)

Copy constructor.

Not Implemented.

Postcondition

Definition at line 73 of file line_surface_intersecter.cc.

References ~line_surface_intersecter().

◆ ~line_surface_intersecter()

geometry::line_surface_intersecter::~line_surface_intersecter ( )
virtual

Destructor.

Definition at line 93 of file line_surface_intersecter.cc.

References coords().

Referenced by line_surface_intersecter().

◆ line_surface_intersecter() [3/3]

geometry::line_surface_intersecter::line_surface_intersecter ( )
protected

Default constructor; disabled.

Not Implemented.

Postcondition

Definition at line 236 of file line_surface_intersecter.cc.

References intersect().

Referenced by intersect(), and line_surface_intersecter().

Member Function Documentation

◆ clone()

geometry::line_surface_intersecter * geometry::line_surface_intersecter::clone ( ) const
virtual

Virtual constructor, makes a new instance of the same type as this.

Postcondition
  • result != 0
  • is_same_type(result)

Reimplemented from sheaf::any.

Definition at line 394 of file line_surface_intersecter.cc.

References operator=().

Referenced by is_ancestor_of().

◆ coords()

const fiber_bundle::sec_e3 & geometry::line_surface_intersecter::coords ( ) const

The section space containing the surfaces.

Definition at line 111 of file line_surface_intersecter.cc.

References intersect().

Referenced by ~line_surface_intersecter().

◆ intersect() [1/2]

void geometry::line_surface_intersecter::intersect ( const e3_lite xp0,
const e3_lite xp1,
intersection_set_type xresult 
) const

Computes the intersections of the line passing through points xp0 and xp1 with the surfaces defined by coords().

Hack:
Only z-axis aligned lines.
Precondition
  • -unexecutable( "temporarily only implemented for lines parallel to z axis" )
  • xp0[0] == xp1[0]
  • xp0[1] == xp1[1]
  • xp0[0] <= _locator->ub()[0]
  • xp0[1] <= _locator->ub()[1]
  • xp0[0] >= _locator->lb()[0]
  • xp0[1] >= _locator->lb()[1]
Hack:
Only z-axis aligned lines.
Issue:
: Subsequent intersections at the same z will not be entered.

Definition at line 118 of file line_surface_intersecter.cc.

References line_surface_intersecter(), geometry::d_bounding_box< DC, DB >::put_lb(), and geometry::d_bounding_box< DC, DB >::put_ub().

Referenced by coords(), and line_surface_intersecter().

◆ intersect() [2/2]

bool geometry::line_surface_intersecter::intersect ( const e3_lite xp0,
const e3_lite xp1,
const d_bounding_box< 3, 2 > &  xbox,
e3_lite xr 
) const
protected

Computes the intersection xr of the line passing through points xp0 and xp1 with the surface evaluator contained in xbox.

Definition at line 257 of file line_surface_intersecter.cc.

References fiber_bundle::e3_algebra::cross(), geometry::d_bounding_box< DC, DB >::dofs_index(), fiber_bundle::ed_algebra::dot(), is_ancestor_of(), and fiber_bundle::same_sign().

◆ invariant()

bool geometry::line_surface_intersecter::invariant ( ) const
virtual

Class invariant.

Invariant

Reimplemented from sheaf::any.

Definition at line 437 of file line_surface_intersecter.cc.

References geometry::operator<<().

Referenced by operator=().

◆ is_ancestor_of()

bool geometry::line_surface_intersecter::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::any.

Definition at line 374 of file line_surface_intersecter.cc.

References clone().

Referenced by intersect().

◆ operator=()

geometry::line_surface_intersecter & geometry::line_surface_intersecter::operator= ( const line_surface_intersecter xother)

Assignment operator.

Not Implemented.

Postcondition

Definition at line 416 of file line_surface_intersecter.cc.

References invariant().

Referenced by clone().

Friends And Related Function Documentation

◆ operator<<

SHEAF_DLL_SPEC std::ostream& operator<< ( std::ostream &  os,
const line_surface_intersecter xp 
)
friend

Insert line_surface_intersecter xp in ostream xos.

Member Data Documentation

◆ _coords

sec_e3* geometry::line_surface_intersecter::_coords
protected

The coordinate section for lines.

Definition at line 152 of file line_surface_intersecter.h.

Referenced by geometry::operator<<().

◆ _eval_id_space

index_space_handle* geometry::line_surface_intersecter::_eval_id_space
protected

The id space for surface evaluators.

Definition at line 167 of file line_surface_intersecter.h.

◆ _evaluator

linear_2d geometry::line_surface_intersecter::_evaluator
protected

The evaluator for surface sections; temporarily assumes triangle.

Hack:
Only z-axis aligned lines and triangles

Definition at line 174 of file line_surface_intersecter.h.

◆ _host

base_space_poset* geometry::line_surface_intersecter::_host
protected

The base space.

Definition at line 157 of file line_surface_intersecter.h.

Referenced by geometry::operator<<().

◆ _locator

search_structure_type* geometry::line_surface_intersecter::_locator
protected

The intersection search structure.

Definition at line 189 of file line_surface_intersecter.h.

Referenced by geometry::operator<<().

◆ _surface_id_space

index_space_handle* geometry::line_surface_intersecter::_surface_id_space
protected

The surface id space.

Definition at line 162 of file line_surface_intersecter.h.


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