KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
Tabular3DSet Class Reference

A 3D set that includes some marked regions on a grid. More...

#include <Tabular.h>

Inheritance diagram for Tabular3DSet:
BoxSet Meshing::VolumeGridTemplate< bool > CSet

Public Member Functions

 Tabular3DSet (const Array3D< bool > &valid, const Vector3 &bmin, const Vector3 &bmax)
 
 Tabular3DSet (int m, int n, int p, const Vector3 &bmin, const Vector3 &bmax)
 
virtual int NumDimensions () const
 Returns the number of dimensions this accepts (-1) for all dimensions.
 
virtual bool Contains (const Config &x)
 
virtual bool Project (Config &x)
 
virtual bool IsSampleable () const
 If true, the Sample() function is implemented.
 
virtual void Sample (Config &x)
 
- Public Member Functions inherited from BoxSet
 BoxSet (Real xmin, Real xmax, int d=1)
 
 BoxSet (const Vector &bmin, const Vector &bmax)
 
virtual bool IsConvex () const
 If true, the feasible set is convex with respect to the CSpace's interpolation function.
 
virtual Real ObstacleDistance (const Config &x)
 
virtual Optimization::NonlinearProgramNumeric ()
 
- Public Member Functions inherited from CSet
 CSet (CPredicate f)
 
virtual bool Contains (const Config &x)
 Returns true if this constraint is satisfied at configuration x.
 
virtual bool Project (Config &x)
 
virtual void Sample (Config &x)
 If IsSampleable is true, draws a config at random from the set.
 
virtual Real ObstacleDistance (const Config &x)
 
- Public Member Functions inherited from Meshing::VolumeGridTemplate< bool >
bool IsEmpty () const
 
void Resize (int m, int n, int p)
 
void ResizeByResolution (const Vector3 &res)
 
void MakeSimilar (const VolumeGridTemplate< T2 > &grid)
 
bool IsSimilar (const VolumeGridTemplate< T2 > &grid) const
 
void GetCell (int i, int j, int k, AABB3D &cell) const
 
void GetCell (const IntTriple &index, AABB3D &cell) const
 
void GetCellCenter (int i, int j, int k, Vector3 &center) const
 
Vector3 GetCellSize () const
 
void GetIndex (const Vector3 &pt, int &i, int &j, int &k) const
 Note: does not clamp to valid cells.
 
void GetIndex (const Vector3 &pt, IntTriple &index) const
 
void GetIndexAndParams (const Vector3 &pt, IntTriple &index, Vector3 &params) const
 Note: does not clamp to valid cells.
 
void GetIndexRange (const AABB3D &range, IntTriple &imin, IntTriple &imax) const
 Note: does not clamp to valid cells.
 
bool GetIndexChecked (const Vector3 &pt, int &i, int &j, int &k) const
 Note: checks whether cell is valid, returns false if cell invalid.
 
bool GetIndexAndParamsChecked (const Vector3 &pt, IntTriple &index, Vector3 &params) const
 Note: checks whether cell is valid, returns false if cell invalid.
 
bool GetIndexRangeClamped (const AABB3D &range, IntTriple &imin, IntTriple &imax) const
 Note: clamps to valid cells, returns false if no cells overlapped.
 
void GetCenter (const IntTriple &index, Vector3 &center) const
 
void SetValue (int i, int j, int k, const bool &v)
 
void SetValue (const Vector3 &pt, const bool &v)
 
bool GetValue (int i, int j, int k) const
 
bool GetValue (const Vector3 &pt) const
 
bool TrilinearInterpolate (const Vector3 &pt) const
 Computes the trilinear interpolation of the field at pt, assuming values are sampled exactly at cell centers.
 
bool MinimumFreeInterpolate (const Vector3 &pt) const
 Used only for fast marching method, really.
 
bool Average (const AABB3D &range) const
 Average value of the range. Each cell's value is weighted by the volume overlap with range.
 
void ResampleTrilinear (const MyT &grid)
 Resamples the given volume grid onto the current grid, taking trilinear interpolation at cell centers.
 
void ResampleAverage (const MyT &grid)
 Resamples the given volume grid onto the current grid, taking averages over grid cells.
 
void Gradient_ForwardDifference (const IntTriple &index, Vector3 &grad) const
 Returns the gradient estimated using forward differencing.
 
void Gradient_CenteredDifference (const IntTriple &index, Vector3 &grad) const
 Returns the gradient estimated using centered differencing.
 
void Gradient (const Vector3 &pt, Vector3 &grad) const
 
void Add (const MyT &grid)
 
void Add (boolval)
 
void Subtract (const MyT &grid)
 
void Multiply (const MyT &grid)
 
void Multiply (boolval)
 
void Max (const MyT &grid)
 
void Max (boolval)
 
void Min (const MyT &grid)
 
void Min (boolval)
 
iterator getIterator () const
 

Public Attributes

bool calculatedValidIndices
 
std::vector< IntTriplevalidIndices
 
- Public Attributes inherited from BoxSet
Vector bmin
 
Vector bmax
 
- Public Attributes inherited from CSet
CPredicate test
 
- Public Attributes inherited from Meshing::VolumeGridTemplate< bool >
Array3D< bool > value
 
AABB3D bb
 

Additional Inherited Members

- Public Types inherited from CSet
typedef bool(* CPredicate) (const Config &)
 
- Public Types inherited from Meshing::VolumeGridTemplate< bool >
typedef VolumeGridTemplate< bool > MyT
 
typedef VolumeGridIterator< bool > iterator
 

Detailed Description

A 3D set that includes some marked regions on a grid.

Basically an adaptor from VolumeGridTemplate to the CSpace methods.


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