Inherited by jbt_ngnode and jbt_object.
A list of symbolic identifiers to check the type of the node. Abstract classes should not have an identifier in this list, nor implement the type function.
Enumeration values:
[virtual]
Returns a field value suitable for use with Jules Bloomenthals polygonizer from Graphics Gems IV. Namely, negative inside the surface and positive outside. This function is also the one used for the numerical ray intersection algorithm.
Intersects the given ray with the implicit surface using a numerical method for root finding. This method is fast but not guaranteed, because it relies on the quality of the bracketing performed by the primitives. The steps are as follows:
1. Compute the brackets of the distances to the zero surfaces for each primitive, or reasonably close to these distances. 2. Find the maximum of the field value inside each of these brackets. 3. Use a numerical root finder to find a root in these brackets.
Steps 2 and 3 use respectively jRootFinder::BrentsMin() and jRootFinder::Brents() to solve these problems. These methods are quadratically convergent one-dimensional solvers which do no rely on the derivative. Perfect for our application.
There is a natural optimization. You can pass a value for the second parameter which is an initial guess for a Newtons method iteration. You should only pass the solution from a previous call which is likely to have correlation to this ray.
[virtual]Begins a query session of the implicit surface. Call this function to enable the ability to ask questions about the surface.
Reimplemented in jbt_warp, jbt_transformation, jbt_texturingnode, jbt_primitive, jbt_parameterize, jbt_ngnode, jbt_csg and jbt_compound.
Returns the object space point for the current query.
Returns the field value for the current query point.
Returns the bloomenthal field for the current query point.
Returns the normal vector for the current query point.
Returns the two dimensional ( u, v ) coordinate for the current query point. This is not generally a useful query from the root node of a BlobTree. This query is mostly used by the texturing nodes.
[pure virtual]Fills in the given attribute. To query the BlobTree for an attribute type. Create a jbt_attribute of the appropriate type and pass a pointer to it to have the data filled in. If the BlobTree does not define the attribute on the surface at the current query point then the attribute will return false in its jbt_attribute::valid() function. Since the number of different types of attributes in a tree can be any size, attribute computations are not cached. Be careful calling this function too many times. It is not terribly expensive (depending on the cost of the jbt_attribute::add() function) but it does require traversing the whole tree.
Reimplemented in jbt_primitive, jbt_ngnode, jbt_csg, jbt_blend and jbt_attributenode.
[pure virtual]An all in one attribute query. This is for efficiencies sake if you are traversing to find the attributes for a Phong type illumination equation.
Reimplemented in jbt_primitive, jbt_ngnode, jbt_csg, jbt_blend and jbt_attributenode.
Returns the gradient vector for the current query point. This vector is different from the normal. It is computed by sampling the field and using a numeric method to approximate the gradient. This is useful because the magnitude is approximated as well. Note that this is considerably slower than calling normal.
Returns the bounding box of the implicit surface in object space coordinates.
[pure virtual]Compute the bounding box for the implicit surface. If there is a chance that the bounding box should be re-computed you should call this function.
Reimplemented in jbt_warp, jbt_union, jbt_transformation, jbt_square, jbt_primitive, jbt_polyline, jbt_point, jbt_plane, jbt_ngnode, jbt_line, jbt_intersection, jbt_disk, jbt_difference, jbt_circle and jbt_blend.
[pure virtual]Appends seed points to the list of points. A seed point is a point on the skeleton (or some other point near the surface). This is used by some polygonization algorithms. Namely the one in bbt.
Reimplemented in jbt_warp, jbt_transformation, jbt_square, jbt_seedpoint, jbt_polyline, jbt_point, jbt_plane, jbt_ngnode, jbt_line, jbt_disk, jbt_compound and jbt_circle.
[virtual]Returns true if the two points span a CSG junction.
Reimplemented in jbt_transformation, jbt_primitive, jbt_ngnode, jbt_csg and jbt_compound.
[pure virtual]Returns the algebraic expression for the scalar field surrounding the skeleton. Pass the identity matrix as the parameter.
Reimplemented in jbt_transformation, jbt_primitive, jbt_ngnode, jbt_csg and jbt_blend.
[pure virtual]Returns the jbt_blobtree::Type of the node. This is for rudimentary runtime type information.
Reimplemented in jbt_uvtransformation, jbt_union, jbt_twist, jbt_transformation, jbt_texturingnode, jbt_taper, jbt_square, jbt_seedpoint, jbt_polyline, jbt_point, jbt_plane, jbt_parameterize, jbt_object, jbt_ngnode, jbt_line, jbt_intersection, jbt_disk, jbt_difference, jbt_circle, jbt_bumpmap, jbt_blend, jbt_bend and jbt_attributenode.
[virtual]
For internal use only.
Reimplemented in jbt_transformation, jbt_square, jbt_primitive, jbt_polyline, jbt_point, jbt_plane, jbt_ngnode, jbt_line, jbt_disk, jbt_csg, jbt_compound and jbt_circle.
[pure virtual] [pure virtual]
For internal use only.
Reimplemented in jbt_uvtransformation, jbt_transformation, jbt_primitive, jbt_parameterize, jbt_object, jbt_ngnode, jbt_csg and jbt_blend.
[virtual]Sets the name of the BlobTree. This is a string name only used in the printing of a BlobTree from the Write function. There is no need to override this function unless you care about neatness when a BlobTree is printed. The size of the buffer is 50 bytes.
[static]
[static]
[static]
[static]Returns a character string for the type of the node.
[static]Writes the tree to the given stream.
[static]Writes the tree to the given stream.
[static]Gets the transformation that is applied to the top level geometry of the given BlobTree.
[protected]
[protected, pure virtual] [protected, pure virtual]Compute and set the normal vector.
Reimplemented in jbt_warp, jbt_transformation, jbt_primitive, jbt_ngnode, jbt_difference, jbt_csg, jbt_bumpmap and jbt_blend.
[protected]Maps the given point to a point on the surface according to the trajectory in chapter "Direct Application of Textures" from Tigges thesis. This trajectory maps points in a blended area inwards to the main surface. There are two motivating factors: correctness, coverage. This mapping is used by the primitive class to map points in blend onto the offset of the skeleton and by the texturingnode to map from a larger surface to the subset that it represents.
The parameters are the point to traject onto the surface, the ancestor whose surface the lies on, and the transformation matrix to transform from the ancestor to this.
[static]The level set used to define the surface of the BlobTree.
[protected]Query point. This is the object space location which is currently being used for implicit function evaluation.
[protected]The bounding box of the object.