Blob 1.0
|
Difference node. More...
#include <blobtree.h>
Public Member Functions | |
TreeDifference (TreeNode *, TreeNode *, TreeNode *=nullptr, TreeNode *=nullptr) | |
Creates a difference operator node given a small set of children nodes. More... | |
virtual | ~TreeDifference () |
Destroy a difference node. More... | |
double | Intensity (const Vector &) const |
Computes the intensity. More... | |
Vector | Gradient (const Vector &) const |
Compute the gradient of the field function. More... | |
virtual TreeNode * | Copy () const |
Create a deep copy of a difference node. | |
double | K () const |
Compute the gradient Lipschitz constant of the difference 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 |
Compute the Lipschitz constant along a ray. More... | |
Color | GetMaterial (const Vector &, const Vector &=Vector::Null) const |
Computes the texture of a difference node. More... | |
TreeNode * | Cut (const Box &) const |
Cut 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 TreeNode * | Blend (TreeNode *) |
Insert a blending node that blends the old and the new sub-tree together. More... | |
virtual TreeNode * | Union (TreeNode *) |
Insert a union node that unions the old and the new sub-tree together. More... | |
virtual TreeNode * | Difference (TreeNode *) |
Insert a difference node. More... | |
virtual TreeNode * | Translate (const Vector &) |
Insert a translation node. More... | |
virtual TreeNode * | Rotate (const Matrix &) |
Insert a rotation node. More... | |
virtual TreeNode * | Scale (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. | |
Difference node.
It does not use Wyvill's implementation, but a slightly different one that takes the threshold of the BlobTree into account. The threshold value is directly updated when creating a BlobTree by recursive calls to TreeNode::SetThreshold().
,
TreeDifference::TreeDifference | ( | TreeNode * | n0, |
TreeNode * | n1, | ||
TreeNode * | n2 = nullptr , |
||
TreeNode * | n3 = nullptr |
||
) |
Creates a difference operator node given a small set of children nodes.
Generate the difference between the first sub-tree and the union of the other sub-trees.
|
virtual |
Destroy a difference node.
Implicitly calls TreeOperator::~TreeOperator().
|
virtual |
Compute the gradient of the field function.
This function behaves mostly the same way as intersection does, save the gradient is negated for extra field functions.
p | Point. |
Reimplemented from TreeNode.
|
virtual |
Computes the intensity.
This function uses the threshold value to perform the computation of the difference.
p | Point. |
Implements TreeNode.
|
virtual |
Compute the local Lipschitz constant in a box.
Implements TreeNode.
|
virtual |
|
virtual |
Compute the Lipschitz constant along a segment.
raystep | The segment. |
Reimplemented from TreeNode.
|
virtual |
Compute the Lipschitz constant along a segment.
s | The segment. |
Reimplemented from TreeNode.