Blob 1.0
Public Member Functions | List of all members

Virtual n-ary operator structure. More...

#include <blobtree.h>

Inheritance diagram for TreeBinary:
TreeOperator TreeNode TreeBlend TreeBlendRUnion TreeBlendSquared TreeBlendUnion TreeContact TreeDifference TreeHyperBlend TreeIntersection TreeUnion

Public Member Functions

 TreeBinary (TreeNode *, TreeNode *)
 Creates a union operator node given a small set of children nodes. More...
 
virtual ~TreeBinary ()
 Destroys an operator, destroying all existing children.
 
virtual int Memory () const
 Compute the size of the sub-tree.
 
virtual int Nodes () const
 Compute the number of nodes of the sub-tree. More...
 
virtual int Depth () const
 Compute the dpeth of the sub-tree. More...
 
virtual void SetThreshold (const double &)
 Recursively setup the threshold value. More...
 
- Public Member Functions inherited from TreeOperator
 TreeOperator ()
 Creates an operator node.
 
virtual ~TreeOperator ()
 Destroys an operator.
 
- Public Member Functions inherited from TreeNode
 TreeNode ()
 Create a virtual node of the Blob-Tree structure.
 
virtual ~TreeNode ()
 Destroys a node.
 
virtual double Intensity (const Vector &) const =0
 Compute the field function value at a given point in space.
 
virtual void IntensityGradient (const Vector &, double &, Vector &) const
 Computes the field value and the gradient at a given point in space. More...
 
virtual Vector Gradient (const Vector &) const
 Computes the gradient of the field function at a given point in space. More...
 
virtual TreeNodeBlend (TreeNode *)
 Insert a blending node that blends the old and the new sub-tree together. More...
 
virtual TreeNodeUnion (TreeNode *)
 Insert a union node that unions the old and the new sub-tree together. More...
 
virtual TreeNodeDifference (TreeNode *)
 Insert a difference node. More...
 
virtual TreeNodeTranslate (const Vector &)
 Insert a translation node. More...
 
virtual TreeNodeRotate (const Matrix &)
 Insert a rotation node. More...
 
virtual TreeNodeScale (const Vector &)
 Insert a scaling node. More...
 
virtual TreeNodeCopy () const =0
 Creates a deep copy of the node, recursively traversing the whole structure.
 
virtual double K () const =0
 Compute the Lipschitz constant of the node.
 
virtual double K (const Box &) const =0
 Compute the local Lipschitz constant in a box.
 
virtual double K (const Ray &) const =0
 Compute the local Lipschitz along a ray.
 
virtual double K (const Segment &) const
 Compute the Lipschitz constant along a segment. More...
 
virtual double K (const RayStep &) const
 Compute the Lipschitz constant along an optimized ray-stepping segment. More...
 
virtual double K (const Sphere &) const
 Compute the Lipschitz constant in a sphere. More...
 
Box GetBox () const
 Return the bounding box of the node.
 
virtual Color GetMaterial (const Vector &, const Vector &=Vector::Null) const
 Gets the color of a node at a point. More...
 
virtual TreeNodeCut (const Box &) const =0
 Cuts the node to simplify its structure inside a box.
 
virtual Vector Dichotomy (Vector, Vector, double, double, double, const double &=1.0e-4)
 Compute the intersection between the implicit surface and a segment. More...
 

Additional Inherited Members

- Protected Attributes inherited from TreeNode
Box box = Box::Null
 Bounding box of the node.
 
double T = 0.5
 Threshold value.
 
- Static Protected Attributes inherited from TreeNode
static const double Epsilon = 1e-6
 Epsilon value for gradient computation.
 

Detailed Description

Virtual n-ary operator structure.

This class handles most memory management. ,

Constructor & Destructor Documentation

◆ TreeBinary()

TreeBinary::TreeBinary ( TreeNode a,
TreeNode b 
)
explicit

Creates a union operator node given a small set of children nodes.

This member function does not compute the bounding box of the node.

Parameters
a,bChildren nodes (should not be null).

Member Function Documentation

◆ Depth()

int TreeBinary::Depth ( ) const
virtual

Compute the dpeth of the sub-tree.

Reimplemented from TreeNode.

◆ Nodes()

int TreeBinary::Nodes ( ) const
virtual

Compute the number of nodes of the sub-tree.

Reimplemented from TreeNode.

◆ SetThreshold()

void TreeBinary::SetThreshold ( const double &  T)
virtual

Recursively setup the threshold value.

Parameters
TThreshold.

Implements TreeOperator.