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

Texture node. More...

#include <blobtree.h>

Inheritance diagram for TreeTexture:
TreeUnary TreeOperator TreeNode

Public Member Functions

 TreeTexture (TreeNode *, const Color &)
 Create a texture node. More...
 
virtual ~TreeTexture ()
 Recursively destroys the texture node.
 
double Intensity (const Vector &) const
 Compute the intensity. More...
 
Vector Gradient (const Vector &) const
 Compute the gradient. More...
 
virtual TreeNodeCopy () const
 Creates a deep copy of the node.
 
TreeNodeCut (const Box &) const
 Cuts the node to simplify its structure inside a box. More...
 
int Memory () const
 Compute the size of the node.
 
double K () const
 Returns the Lipschitz constant of the element. More...
 
double K (const Box &) const
 Compute the local Lipschitz constant in a box. More...
 
double K (const Sphere &) const
 Returns the Lipschitz constant of the node. More...
 
double K (const Segment &) const
 Returns the Lipschitz constant of the node. More...
 
double K (const Ray &) const
 Returns the Lipschitz constant of the node if the ray intersects its bounding box. More...
 
double K (const RayStep &) const
 Returns the Lipschitz constant of the node if the ray intersects its bounding box. More...
 
Color GetMaterial (const Vector &, const Vector &=Vector::Null) const
 Compute the color at a given point of space. 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 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

Color color
 Texture.
 
- 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

Texture node.

The texture node defines the color of the sub-tree.

Constructor & Destructor Documentation

◆ TreeTexture()

TreeTexture::TreeTexture ( TreeNode node,
const Color color 
)
explicit

Create a texture node.

Parameters
nodeSub-tree.
colorColor.

Member Function Documentation

◆ Cut()

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

Cuts the node to simplify its structure inside a box.

Parameters
bThe box.

Implements TreeNode.

◆ GetMaterial()

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

Compute the color at a given point of space.

The whole sub-tree is colored by the node.

Parameters
pPoint in space.
nNormal.

Reimplemented from TreeNode.

◆ Gradient()

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

Compute the gradient.

Parameters
pPoint.

Reimplemented from TreeNode.

◆ Intensity()

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

Compute the intensity.

Parameters
pPoint.

Implements TreeNode.

◆ K() [1/6]

double TreeTexture::K ( ) const
virtual

Returns the Lipschitz constant of the element.

Simply return the Lipschitz constant of the child node.

Implements TreeNode.

◆ K() [2/6]

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

Compute the local Lipschitz constant in a box.

Implements TreeNode.

◆ K() [3/6]

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

Returns the Lipschitz constant of the node if the ray intersects its bounding box.

Parameters
rayThe ray.

Implements TreeNode.

◆ K() [4/6]

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

Returns the Lipschitz constant of the node if the ray intersects its bounding box.

Parameters
raystepThe ray-step.

Reimplemented from TreeNode.

◆ K() [5/6]

double TreeTexture::K ( const Segment s) const
virtual

Returns the Lipschitz constant of the node.

Parameters
sSegment box.

Reimplemented from TreeNode.

◆ K() [6/6]

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

Returns the Lipschitz constant of the node.

Parameters
sThe sphere.

Reimplemented from TreeNode.