Blob 1.0
|
Transformations such as rotations, scalings and translations embedded in a frame node. More...
#include <blobtree.h>
Public Member Functions | |
TreeFrame (TreeNode *=nullptr, const Frame &=Frame::Id) | |
Creates a frame node in the tree structure. More... | |
virtual | ~TreeFrame () |
Destroy a frame node in the tree. More... | |
virtual double | Intensity (const Vector &) const |
Returns the intensity computed by the child node after transforming the point into local space. More... | |
virtual Vector | Gradient (const Vector &) const |
Returns the transformed gradient computed by the child node after framing the point into local space. More... | |
virtual TreeNode * | Copy () const |
Creates a deep copy of the frame node. | |
int | Memory () const |
Compute the size of a node. | |
virtual double | K () const |
Compute the Lipschitz constant of the node. More... | |
virtual double | K (const Box &) const |
Compute the local Lipschitz constant in a box. More... | |
virtual double | K (const Sphere &) const |
Computes the Lipschitz constant within a sphere. More... | |
virtual double | K (const Segment &) const |
Computes the Lipschitz constant of the node intersecting a segment. More... | |
virtual double | K (const Ray &) const |
Computes the Lipschitz constant of the frame node intersecting a ray. More... | |
Color | GetMaterial (const Vector &, const Vector &=Vector::Null) const |
Compute the texture parameters. More... | |
TreeNode * | Cut (const Box &) const |
Cuts the node to simplify its structure inside a box. More... | |
Public Member Functions inherited from TreeWarp | |
TreeWarp (TreeNode *=nullptr) | |
Create a warping node. More... | |
virtual | ~TreeWarp () |
Recursively destroys the structure. More... | |
Public Member Functions inherited from TreeUnary | |
TreeUnary (TreeNode *) | |
Create a generic warping node. More... | |
virtual | ~TreeUnary () |
Recursively destroys the structure. | |
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... | |
virtual double | K (const RayStep &) const |
Compute the Lipschitz constant along an optimized ray-stepping segment. 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... | |
Protected Attributes | |
Frame | frame |
Frame. | |
Protected Attributes inherited from TreeNode | |
Box | box = Box::Null |
Bounding box of the node. | |
double | T = 0.5 |
Threshold value. | |
Additional Inherited Members | |
Static Protected Attributes inherited from TreeNode | |
static const double | Epsilon = 1e-6 |
Epsilon value for gradient computation. | |
Transformations such as rotations, scalings and translations embedded in a frame node.
As frame transformations are affine, the Lipschitz constant can be easily derived from the eighenvalues of the transformation matrix.
Frame nodes change the whole geometry of their children nodes. Note that frame nodes are completely different than TreeAlpha nodes that scale the field function instead of the geometry.
Example of how to code a frame node:
,
Creates a frame node in the tree structure.
node | The sub-tree. |
frame | The transformation. |
|
virtual |
Destroy a frame node in the tree.
Implicitly calls the destructor TreeWarp::TreeWarp() that recursively destroys its child node.
|
virtual |
Compute the texture parameters.
Simply transforms the point into the local frame, and compute the texture descending into the tree recursively.
p | Point. |
n | Normal. |
Implements TreeWarp.
Returns the transformed gradient computed by the child node after framing the point into local space.
p | Point. |
Reimplemented from TreeNode.
|
virtual |
Returns the intensity computed by the child node after transforming the point into local space.
p | Point. |
Implements TreeNode.
|
virtual |
Compute the Lipschitz constant of the node.
Implements TreeNode.
|
virtual |
Compute the local Lipschitz constant in a box.
Checks if the argument box intersects the box of the node, and returns the Lipchitz constant of the tree structure (should be times the maximum eigenvalue of the inverse matrix, but since we are dealing with rotation and translation only, this is 1) if intersection occurs.
Implements TreeNode.
|
virtual |
Computes the Lipschitz constant of the frame node intersecting a ray.
ray | The ray. |
Implements TreeNode.
|
virtual |
Computes the Lipschitz constant of the node intersecting a segment.
s | The segment. |
Reimplemented from TreeNode.
|
virtual |
Computes the Lipschitz constant within a sphere.
s | Sphere. |
Reimplemented from TreeNode.