Rosetta 3.4
Public Types | Public Member Functions
protocols::match::Bool3DGrid Class Reference

#include <BumpGrid.hh>

Inheritance diagram for protocols::match::Bool3DGrid:
Inheritance graph
[legend]
Collaboration diagram for protocols::match::Bool3DGrid:
Collaboration graph
[legend]

List of all members.

Public Types

typedef core::Real Real
typedef core::Vector Vector
typedef
numeric::geometry::BoundingBox
< core::Vector
BoundingBox
typedef
numeric::geometry::hashing::Bin3D 
Bin3D
typedef
utility::fixedsizearray1
< Vector, 8 > 
CornerPoints
typedef std::pair
< Bool3DGrid::Size, unsigned
char > 
index_mask_pair

Public Member Functions

 Bool3DGrid ()
 Creation and initialization.
virtual ~Bool3DGrid ()
void set_bounding_box (BoundingBox const &bb)
void set_bin_width (Real width)
Bool3DGrid create_grid_for_sphere (Vector const &center, Real radius) const
 create a grid for the input sphere that aligns to this grid, such that it is large enough to hold a particular sphere.
Bool3DGrid create_grid_for_bb (BoundingBox const &bb)
 create a grid for the input bounding box that aligns to this grid
Bin3D dimsizes () const
 Accessors.
Real bin_width () const
CornerPoints corners (Bin3D const &bin) const
BoundingBox bin_extrema (Bin3D const &bin) const
 bounding box points for a bin.
Vector bin_center (Bin3D const &bin) const
bool occupied (Vector const &) const
bool occupied (Bin3D const &bin) const
BoundingBox actual_bb () const
void set_value_for_bin (Bin3D const &bin, bool setting)
 set the boolean value for a particular bin. The bin dimensions are indexed from 0 to nbins-1.
void or_by_sphere_conservative (Vector const &center, Real radius)
 Set the value to true for any voxel that is wholy contained by the given sphere. A voxel is wholy contained iff all 8 corners of the voxel are within the sphere.
void or_by_sphere_liberal (Vector const &center, Real radius)
 Set the value to true for any voxel that is partially contained by a given sphere. A voxel is partially contained iff any of the 8 corners of the voxel are within the sphere.
void or_by_spheres_conservative (utility::vector1< std::pair< Vector, Real > > const &spheres)
 Consider a voxel filled if each of its corners are covered, even if they are covered by seperate spheres. Dangerous, in that some voxels will be counted as being fully occupied when they are only partially occupied.
void or_by_box_liberal (BoundingBox const &bb)
 Turn the values of all the bins that overlap with the volume in this bounding box to true.
void or_with (Bool3DGrid const &other)
 Performs a boolean OR on the voxels shared by the two grids, and ignores all voxels that are not shared by the two grids. These grids must be "compatible", in that the lower corner of other must lie on a grid point of this.
void and_with (Bool3DGrid const &other)
 Performs a boolean AND on the voxels shared by the two grids, and ignores all voxels that are not shared by the two grids. These grids must be "compatible", in that the lower corner of other must lie on a grid point of this.
void subtract (Bool3DGrid const &other)
 Sets any voxel on this grid to "false" which is true on the other grid. but does not set any voxel to "true" on this grid -- even if the other voxel is "false".
void clear ()
 Set all values in all bins to false.

Member Typedef Documentation

typedef numeric::geometry::hashing::Bin3D protocols::match::Bool3DGrid::Bin3D
typedef numeric::geometry::BoundingBox< core::Vector > protocols::match::Bool3DGrid::BoundingBox
typedef utility::fixedsizearray1< Vector, 8 > protocols::match::Bool3DGrid::CornerPoints

Constructor & Destructor Documentation

protocols::match::Bool3DGrid::Bool3DGrid ( )

Creation and initialization.

protocols::match::Bool3DGrid::~Bool3DGrid ( ) [virtual]

Member Function Documentation

BoundingBox protocols::match::Bool3DGrid::actual_bb ( ) const [inline]
void protocols::match::Bool3DGrid::and_with ( Bool3DGrid const &  other)

Performs a boolean AND on the voxels shared by the two grids, and ignores all voxels that are not shared by the two grids. These grids must be "compatible", in that the lower corner of other must lie on a grid point of this.

Bool3DGrid::Vector protocols::match::Bool3DGrid::bin_center ( Bin3D const &  bin) const
Bool3DGrid::BoundingBox protocols::match::Bool3DGrid::bin_extrema ( Bin3D const &  bin) const

bounding box points for a bin.

Real protocols::match::Bool3DGrid::bin_width ( ) const [inline]
void protocols::match::Bool3DGrid::clear ( )

Set all values in all bins to false.

Bool3DGrid::CornerPoints protocols::match::Bool3DGrid::corners ( Bin3D const &  bin) const
Bool3DGrid protocols::match::Bool3DGrid::create_grid_for_bb ( BoundingBox const &  bb)

create a grid for the input bounding box that aligns to this grid

References set_bin_width(), and set_bounding_box().

Bool3DGrid protocols::match::Bool3DGrid::create_grid_for_sphere ( Vector const &  center,
Real  radius 
) const

create a grid for the input sphere that aligns to this grid, such that it is large enough to hold a particular sphere.

References set_bin_width(), and set_bounding_box().

Bool3DGrid::Bin3D protocols::match::Bool3DGrid::dimsizes ( ) const
bool protocols::match::Bool3DGrid::occupied ( Vector const &  point) const
bool protocols::match::Bool3DGrid::occupied ( Bin3D const &  bin) const
void protocols::match::Bool3DGrid::or_by_box_liberal ( BoundingBox const &  bb)

Turn the values of all the bins that overlap with the volume in this bounding box to true.

References set_value_for_bin().

void protocols::match::Bool3DGrid::or_by_sphere_conservative ( Vector const &  center,
Real  radius 
)

Set the value to true for any voxel that is wholy contained by the given sphere. A voxel is wholy contained iff all 8 corners of the voxel are within the sphere.

Sets the value of a voxel to true if all eight corners of the voxel are contained by the sphere.

References bin_center(), corners(), and set_value_for_bin().

void protocols::match::Bool3DGrid::or_by_sphere_liberal ( Vector const &  center,
Real  radius 
)

Set the value to true for any voxel that is partially contained by a given sphere. A voxel is partially contained iff any of the 8 corners of the voxel are within the sphere.

Sets the value of a voxel to true if any volume of a voxel is inside the sphere. Handles edge cases properly where a voxel is glanced by a sphere at a face, but where the corners of the voxel are not contained by the sphere, and when a sphere is entirely contained within a voxel.

References bin_center(), corners(), make_table_of_pilot_apps::d, and set_value_for_bin().

void protocols::match::Bool3DGrid::or_by_spheres_conservative ( utility::vector1< std::pair< Vector, Real > > const &  spheres)

Consider a voxel filled if each of its corners are covered, even if they are covered by seperate spheres. Dangerous, in that some voxels will be counted as being fully occupied when they are only partially occupied.

The sphere list should describe spheres by the centers and by their square radii, not by their radii.

References corners(), and set_value_for_bin().

void protocols::match::Bool3DGrid::or_with ( Bool3DGrid const &  other)

Performs a boolean OR on the voxels shared by the two grids, and ignores all voxels that are not shared by the two grids. These grids must be "compatible", in that the lower corner of other must lie on a grid point of this.

void protocols::match::Bool3DGrid::set_bin_width ( Real  width)
void protocols::match::Bool3DGrid::set_bounding_box ( BoundingBox const &  bb)
void protocols::match::Bool3DGrid::set_value_for_bin ( Bin3D const &  bin,
bool  setting 
)

set the boolean value for a particular bin. The bin dimensions are indexed from 0 to nbins-1.

Referenced by or_by_box_liberal(), or_by_sphere_conservative(), or_by_sphere_liberal(), and or_by_spheres_conservative().

void protocols::match::Bool3DGrid::subtract ( Bool3DGrid const &  other)

Sets any voxel on this grid to "false" which is true on the other grid. but does not set any voxel to "true" on this grid -- even if the other voxel is "false".

Set all the values in this grid to "false" that are true in the other grid.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines