Blob Class Reference
Blobby isosurface composed of a set of MetaObjects, all of which combine to form a scalar field whose contour at this blob's threshold value defines the surface. Upon initialization (Blob::init), the implicit surface is polygonized into triangles using a variant of the well-known Marching Cubes algorithm. A MetaObject exerts a positive or negative 'charge' in a scalar field, whose isocontours (level sets) define blobby surfaces with different threshold values corresponding to the contour level. MetaObjects positively or negatively affect their neighboring MetaObjects depending on their 'strength' and 'negative' attributes. More...
#include <Blob.h>

Public Member Functions | |
Constructors | |
| Blob (real_t threshold=(0.17)) | |
| Blob (const MetaObjectList &metaObjects, real_t threshold=(0.17)) | |
| virtual | ~Blob () |
Core functionality | |
| virtual void | init () |
| Performs any initialization which may be necessary before calling getAABB or evaluate. | |
| virtual void | preview () |
| virtual real_t | getIntersection (const Ray &ray, SurfacePoint &pt) |
| Tests the given ray with this object for intersection. If a valid intersection exists, its "t" value will be returned and the given SurfacePoint will be initialized with enough data for this object to later fill in all relevant information lazily (world space normal at intersection point, uv coordinates, etc.). | |
| virtual bool | intersects (const Ray &ray, real_t tMax=INFINITY) |
| Used for occlusion/visibility testing where you don't necessarily care about anything other than whether or not an intersection exists. (generally faster than getIntersection). | |
| virtual real_t | evaluate (const Point3 &pt) const |
Accessors / Mutators | |
| real_t | getThreshold () const |
| void | setThreshold (real_t threshold) |
| sets the threshold spcifying the boundary of this blobby surface | |
| Mesh * | getMesh () |
| void | push_back (MetaObject *meta) |
| adds the given MetaObject to this blob | |
| MetaObjectList & | getMetaObjects () |
| virtual AABB | getAABB () const |
Protected Member Functions | |
| virtual void | _getUV (SurfacePoint &pt) const |
| virtual void | _getGeometricNormal (SurfacePoint &pt) const |
Protected Attributes | |
| MetaObjectList | m_metaObjects |
| Mesh * | m_mesh |
| real_t | m_threshold |
Detailed Description
Blobby isosurface composed of a set of MetaObjects, all of which combine to form a scalar field whose contour at this blob's threshold value defines the surface. Upon initialization (Blob::init), the implicit surface is polygonized into triangles using a variant of the well-known Marching Cubes algorithm. A MetaObject exerts a positive or negative 'charge' in a scalar field, whose isocontours (level sets) define blobby surfaces with different threshold values corresponding to the contour level. MetaObjects positively or negatively affect their neighboring MetaObjects depending on their 'strength' and 'negative' attributes.
- Date:
- Spring 2008
- Parameters:
-
threshold - specifies the particular isocontour boundary which will define the surface of this blobby shape (defaults to BLOB_THRESHOLD_DEFAULT)
- See also:
- also MetaObject
Definition at line 38 of file Blob.h.
Constructor & Destructor Documentation
| Blob::Blob | ( | const MetaObjectList & | metaObjects, | |
| real_t | threshold = (0.17) | |||
| ) | [inline] |
Member Function Documentation
| void Blob::init | ( | ) | [virtual] |
Performs any initialization which may be necessary before calling getAABB or evaluate.
- Note:
- Implementations will likely want to precompute their AABB in init and store it for later since getAABB may be called often
Default implementation synchs parameters from PropertyMap
Reimplemented from MetaObject.
| void Blob::preview | ( | ) | [virtual] |
Display a crude OpenGL preview of this shape
- Note:
- Default implementation sets the ModelView matrix appropriately with respect to this Transformable's transformation
Reimplemented from Transformable.
| real_t Blob::getIntersection | ( | const Ray & | ray, | |
| SurfacePoint & | pt | |||
| ) | [virtual] |
Tests the given ray with this object for intersection. If a valid intersection exists, its "t" value will be returned and the given SurfacePoint will be initialized with enough data for this object to later fill in all relevant information lazily (world space normal at intersection point, uv coordinates, etc.).
- Note:
- if you only care about whether or not an intersection exists and don't actually need to know the exact intersection point, see the intersects method instead.
- Returns:
- the smallest positive "t" value of any intersections found, or INFINITY if no valid intersection exists
Implements Intersectable.
Used for occlusion/visibility testing where you don't necessarily care about anything other than whether or not an intersection exists. (generally faster than getIntersection).
- Note:
- default implementation defers to getIntersection
- Returns:
- whether or not the given ray intersects this object with a positive "t" value greater than EPSILON and less than the given
tMax
Reimplemented from Intersectable.
- Returns:
- the aggregate charge at the given point
- Note:
- If the given point is outside of this Blob's AABB, evaluate is assumed to return zero
Implements MetaObject.
| real_t Blob::getThreshold | ( | ) | const [inline] |
| void Blob::setThreshold | ( | real_t | threshold | ) | [inline] |
| Mesh* Blob::getMesh | ( | ) | [inline] |
| void Blob::push_back | ( | MetaObject * | meta | ) | [inline] |
| AABB Blob::getAABB | ( | ) | const [virtual] |
- Returns:
- the bounding box of influence which bounds the range in which this MetaObject may have a non-zero charge
Implements MetaObject.
| void Blob::_getUV | ( | SurfacePoint & | pt | ) | const [protected, virtual] |
| void Blob::_getGeometricNormal | ( | SurfacePoint & | pt | ) | const [protected, virtual] |
Member Data Documentation
MetaObjectList Blob::m_metaObjects [protected] |
Mesh* Blob::m_mesh [protected] |
real_t Blob::m_threshold [protected] |
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6