Blob 1.0
Public Member Functions | Protected Attributes | List of all members
TreeCloneFrame Class Reference

A simple instancing node. More...

#include <blobtree.h>

Inheritance diagram for TreeCloneFrame:
TreeUnary TreeOperator TreeNode

Public Member Functions

 TreeCloneFrame (TreeNode *, const Frame &)
 Creates an virtual clone of the subtree, using a frame. More...
 
virtual ~TreeCloneFrame ()
 Destroys the subtree.
 
virtual void SetThreshold (const double &)
 Recursively setup the threshold value. More...
 
double Intensity (const Vector &) const
 Compute the field value. More...
 
Vector Gradient (const Vector &) const
 Compute the gradient of the field function. More...
 
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
 Computes the Lipschitz constant of the sub-tree whithin the argument box. More...
 
double K (const Ray &) const
 Computes the Lipschitz constant along a ray. More...
 
double K (const Segment &) const
 Computes the Lipschitz constant. More...
 
double K (const RayStep &) const
 Computes the Lipschitz constant. More...
 
double K (const Sphere &) const
 Computes the Lipschitz constant. More...
 
Color GetMaterial (const Vector &, const Vector &=Vector::Null) const
 Computes the texture of an alpha-node. Simply scales the texture parameters. More...
 
TreeNodeCut (const Box &) const
 Cuts the node to simplify its structure inside a box. More...
 
virtual int Memory () const
 Compute the size of the sub-tree.
 
- 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...
 
- 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...
 

Protected Attributes

Frame frame
 Other 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.
 

Detailed Description

A simple instancing node.

This node has the same behaviour as a TreeUnion combining the subtree with a copy transformed using a TreeFrame operator, however it is more memory efficient.

TreeNode* node; // Sub-tree
Frame frame; // Frame
TreeNode* clone=new TreeUnion(node,new TreeFrame(node->Copy(),frame)); // Memory intensive clone
TreeNode* clone=new TreeCloneFrame(node,frame); // Inexpensive clone.
Frame frame
Other frame.
Definition: blobtree.h:216
TreeCloneFrame(TreeNode *, const Frame &)
Creates an virtual clone of the subtree, using a frame.
Definition: treeclonesymetryplane.cpp:28
Transformations such as rotations, scalings and translations embedded in a frame node.
Definition: blobtree.h:1154
The generic nodes with some pure virtual functions.
Definition: blobtree.h:27
virtual TreeNode * Copy() const =0
Creates a deep copy of the node, recursively traversing the whole structure.
The union node.
Definition: blobtree.h:121

,

Constructor & Destructor Documentation

◆ TreeCloneFrame()

TreeCloneFrame::TreeCloneFrame ( TreeNode node,
const Frame f 
)
explicit

Creates an virtual clone of the subtree, using a frame.

Parameters
nodeChild node.
fFrame.

Member Function Documentation

◆ Cut()

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

Cuts the node to simplify its structure inside a box.

This function breaks the cloning.

Parameters
bThe box.

Implements TreeNode.

◆ GetMaterial()

Color TreeCloneFrame::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.

◆ Gradient()

Vector TreeCloneFrame::Gradient ( const Vector p) const
virtual

Compute the gradient of the field function.

Parameters
pPoint.

Reimplemented from TreeNode.

◆ Intensity()

double TreeCloneFrame::Intensity ( const Vector p) const
virtual

Compute the field value.

Parameters
pPoint.

Implements TreeNode.

◆ K() [1/5]

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

Computes the Lipschitz constant of the sub-tree whithin the argument box.

Parameters
bThe box.

Implements TreeNode.

◆ K() [2/5]

double TreeCloneFrame::K ( const Ray ray) const
virtual

Computes the Lipschitz constant along a ray.

Parameters
rayThe ray.

Implements TreeNode.

◆ K() [3/5]

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

Computes the Lipschitz constant.

Parameters
raystepThe segment.

Reimplemented from TreeNode.

◆ K() [4/5]

double TreeCloneFrame::K ( const Segment segment) const
virtual

Computes the Lipschitz constant.

Parameters
segmentThe segment.

Reimplemented from TreeNode.

◆ K() [5/5]

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

Computes the Lipschitz constant.

Parameters
sThe sphere.

Reimplemented from TreeNode.

◆ SetThreshold()

void TreeCloneFrame::SetThreshold ( const double &  T)
virtual

Recursively setup the threshold value.

Parameters
TThreshold.

Reimplemented from TreeUnary.