Blob 1.0
Public Member Functions | List of all members
TreeWarp Class Referenceabstract

Generic warping node. More...

#include <blobtree.h>

Inheritance diagram for TreeWarp:
TreeUnary TreeOperator TreeNode TreeFrame TreeRotate TreeScale TreeTaper TreeTranslate TreeTwist

Public Member Functions

 TreeWarp (TreeNode *=nullptr)
 Create a warping node. More...
 
virtual ~TreeWarp ()
 Recursively destroys the structure. More...
 
virtual Color GetMaterial (const Vector &, const Vector &=Vector::Null) const =0
 Gets the color of a node at a point. More...
 
- Public Member Functions inherited from TreeUnary
 TreeUnary (TreeNode *)
 Create a generic warping node. More...
 
virtual ~TreeUnary ()
 Recursively destroys the structure.
 
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 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

Generic warping node.

This class implements the generic warping node model. In contrast to most other nodes, warpings are always unary nodes.

,

Constructor & Destructor Documentation

◆ TreeWarp()

TreeWarp::TreeWarp ( TreeNode node = nullptr)
explicit

Create a warping node.

Parameters
nodeChild node.

◆ ~TreeWarp()

TreeWarp::~TreeWarp ( )
virtual

Recursively destroys the structure.

Implicitly calls TreeUnary::~TreeUnary().

Member Function Documentation

◆ GetMaterial()

virtual Color TreeWarp::GetMaterial ( const Vector ,
const Vector = Vector::Null 
) const
pure virtual

Gets the color of a node at a point.

This function returns a default black material.

Reimplemented from TreeNode.

Implemented in TreeFrame, TreeTranslate, TreeRotate, TreeScale, TreeTwist, and TreeTaper.