Blob 1.0

A simple instancing node. More...

#include <blobtree.h>

Inheritance diagram for TreeClone:
TreeUnary TreeOperator TreeNode

Public Member Functions

 TreeClone (TreeNode *, const QVector< Frame > &)
 Creates an virtual clone of the subtree, translated at a given position.
virtual ~TreeClone ()
 Destroys the subtree.
double Intensity (const Vector &) const
 Compute the field value.
Vector Gradient (const Vector &) const
 Compute the gradient of the field function.
virtual TreeNodeCopy () const
 Creates a deep copy of the 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.
double K (const Ray &) const
 Computes the Lipschitz constant along a ray.
double K (const Segment &) const
 Computes the Lipschitz constant.
double K (const RayStep &) const
 Compute the Lipschitz constant along an optimized ray-stepping segment.
double K (const Sphere &) const
 Computes the Lipschitz constant.
Color GetMaterial (const Vector &, const Vector &=Vector::Null) const
 Computes the texture of an alpha-node. Simply scales the texture parameters.
TreeNodeCut (const Box &) const
 Cuts the node to simplify its structure inside a box.
virtual int Memory () const
 Compute the size of the sub-tree.
Public Member Functions inherited from TreeUnary
 TreeUnary (TreeNode *)
 Create a generic warping node.
virtual ~TreeUnary ()
 Recursively destroys the structure.
virtual int Nodes () const
 Compute the number of nodes of the sub-tree.
virtual int Depth () const
 Compute the dpeth of the sub-tree.
virtual void SetThreshold (const double &)
 Recursively setup the threshold value.
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 Omega (const Vector &) const
 Return the squared distance to the compact support of the node.
virtual void IntensityGradient (const Vector &, double &, Vector &) const
 Computes the field value and the gradient at a given point in space.
virtual TreeNodeBlend (TreeNode *)
 Insert a blending node that blends the old and the new sub-tree together.
virtual TreeNodeUnion (TreeNode *)
 Insert a union node that unions the old and the new sub-tree together.
virtual TreeNodeDifference (TreeNode *)
 Insert a difference node.
virtual TreeNodeTranslate (const Vector &)
 Insert a translation node.
virtual TreeNodeRotate (const Matrix &)
 Insert a rotation node.
virtual TreeNodeScale (const Vector &)
 Insert a scaling node.
Box GetBox () const
 Return the bounding box of the node.
virtual QString Show (int=0) const
 Show the tree hierarchy.
virtual Vector Dichotomy (Vector, Vector, double, double, double, const double &=1.0e-4)
 Compute the intersection between the implicit surface and a segment.

Protected Attributes

QVector< Frameframes
 Set of instances.
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.

Detailed Description

A simple instancing node.

,

Constructor & Destructor Documentation

◆ TreeClone()

TreeClone::TreeClone ( TreeNode * node,
const QVector< Frame > & f )
explicit

Creates an virtual clone of the subtree, translated at a given position.

Parameters
nodeChild node.
fSet of frames for instantiation.

Member Function Documentation

◆ Intensity()

double TreeClone::Intensity ( const Vector & p) const
virtual

Compute the field value.

Parameters
pPoint.

Implements TreeNode.

◆ Gradient()

Vector TreeClone::Gradient ( const Vector & p) const
virtual

Compute the gradient of the field function.

Parameters
pPoint.

Reimplemented from TreeNode.

◆ K() [1/5]

double TreeClone::K ( const Box & b) const
virtual

Compute the local Lipschitz constant in a box.

Implements TreeNode.

◆ K() [2/5]

double TreeClone::K ( const Ray & ray) const
virtual

Computes the Lipschitz constant along a ray.

Parameters
rayThe ray.

Implements TreeNode.

◆ K() [3/5]

double TreeClone::K ( const Segment & segment) const
virtual

Computes the Lipschitz constant.

Parameters
segmentThe segment.

Reimplemented from TreeNode.

◆ K() [4/5]

double TreeClone::K ( const RayStep & raystep) const
virtual

Compute the Lipschitz constant along an optimized ray-stepping segment.

By default return the Lipchitz constant of the segment, i.e. do not use optimized algorithms with pre-computed data in RayStep.

Parameters
raystepThe step.

Reimplemented from TreeNode.

◆ K() [5/5]

double TreeClone::K ( const Sphere & s) const
virtual

Computes the Lipschitz constant.

Parameters
sThe sphere.

Reimplemented from TreeNode.

◆ GetMaterial()

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

Computes the texture of an alpha-node. Simply scales the texture parameters.

Parameters
pPoint.
nNormal.

Reimplemented from TreeNode.

◆ Cut()

TreeNode * TreeClone::Cut ( const Box & b) const
virtual

Cuts the node to simplify its structure inside a box.

The implementation should be improved and optimized.

Parameters
bThe box.

Implements TreeNode.