Blob 1.0
Public Member Functions | List of all members
TreeIntersection Class Reference

Intersection node. More...

#include <blobtree.h>

Inheritance diagram for TreeIntersection:
TreeBinary TreeOperator TreeNode

Public Member Functions

 TreeIntersection (TreeNode *, TreeNode *, TreeNode *=nullptr, TreeNode *=nullptr)
 Creates an intersection operator node given a small set of children nodes.
 
virtual ~TreeIntersection ()
 Destroy an intersection node. More...
 
double Intensity (const Vector &) const
 Compute the field value at a given point in space.
 
Vector Gradient (const Vector &) const
 Compute the gradient of the intersection function at a given point in space. The returned vector is the gradient of the minimum contributing field function.
 
virtual TreeNodeCopy () const
 Creates a deep copy of intersection node.
 
double K () const
 Computes the Lipschitz constant of the sub-tree.
 
double K (const Box &) const
 Compute the local Lipschitz constant in a box. More...
 
double K (const Segment &) const
 Compute the Lipschitz constant along a segment. More...
 
double K (const RayStep &) const
 Compute the Lipschitz constant along a segment. More...
 
double K (const Sphere &) const
 Compute the Lipschitz constant in a sphere. More...
 
double K (const Ray &) const
 Computes the Lipschitz constant of the sub-tree that intersects a ray.
 
Color GetMaterial (const Vector &, const Vector &=Vector::Null) const
 Compute the texture of an intersection node. More...
 
TreeNodeCut (const Box &) const
 Cuts the node to simplify its structure inside a box. More...
 
- Public Member Functions inherited from TreeBinary
 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 void IntensityGradient (const Vector &, double &, Vector &) const
 Computes the field value and the gradient 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...
 
Box GetBox () const
 Return the bounding box of the node.
 
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

Intersection node.

Example of how to code an intersection node:

TreeNode* node=new TreeBlend(
new TreeVertex(Vector(1,0,-2),new BlendCubic(2.0,1.0)),
new TreeBox(Vector(-1,4,0),Vector(1,2,1),new BlendWyvill(1.0,1.0)));
Normalized blending functions (1-r2)3.
Definition: blend.h:114
Wyvill's cubic falloff function.
Definition: blend.h:156
The blending node which is the same blend as for Blobs.
Definition: blobtree.h:290
Box primitive.
Definition: blobtree.h:748
The generic nodes with some pure virtual functions.
Definition: blobtree.h:27
A point skeleton element.
Definition: blobtree.h:550

,

Constructor & Destructor Documentation

◆ ~TreeIntersection()

TreeIntersection::~TreeIntersection ( )
virtual

Destroy an intersection node.

Implicitly calls TreeOperator::~TreeOperator().

Member Function Documentation

◆ Cut()

TreeNode * TreeIntersection::Cut ( const Box b) const
virtual

Cuts the node to simplify its structure inside a box.

Parameters
bThe box.

Implements TreeNode.

◆ GetMaterial()

Color TreeIntersection::GetMaterial ( const Vector p,
const Vector n = Vector::Null 
) const
virtual

Compute the texture of an intersection node.

Simply returns the material parameters of the child node that has the minimum field value.

Parameters
pPoint.
nNormal.

Reimplemented from TreeNode.

◆ K() [1/4]

double TreeIntersection::K ( const Box b) const
virtual

Compute the local Lipschitz constant in a box.

Implements TreeNode.

◆ K() [2/4]

double TreeIntersection::K ( const RayStep raystep) const
virtual

Compute the Lipschitz constant along a segment.

Parameters
raystepThe segment.

Reimplemented from TreeNode.

◆ K() [3/4]

double TreeIntersection::K ( const Segment s) const
virtual

Compute the Lipschitz constant along a segment.

Parameters
sThe segment.

Reimplemented from TreeNode.

◆ K() [4/4]

double TreeIntersection::K ( const Sphere s) const
virtual

Compute the Lipschitz constant in a sphere.

Parameters
sThe sphere.

Reimplemented from TreeNode.