MetaBall Class Reference

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. A MetaBall exerts a non-zero charge (aka influence) over a spherical region emanating from a single point, 'position', out to a maximum distance of 'radius'. More...

#include <MetaBall.h>

Inheritance diagram for MetaBall:

MetaObject ScalarField PropertyMap

List of all members.

Public Member Functions

Constructors
 MetaBall (real_t strength=1.0, bool negative=false, const Point3 &position=Point3(), real_t radius=1.0)
virtual ~MetaBall ()
Core functionality
virtual void init ()
 Performs any initialization which may be necessary before calling getAABB or evaluate.
virtual AABB getAABB () const
virtual real_t evaluate (const Point3 &pt) const
Accessors / Mutators
Point3 getPosition () const
void setPosition (const Point3 &position)
 sets the initial charge of this object
real_t getRadius () const
void setRadius (real_t radius)
 sets the radius of this MetaBall

Protected Attributes

AABB m_aabb
Point3 m_position
real_t m_radius


Detailed Description

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. A MetaBall exerts a non-zero charge (aka influence) over a spherical region emanating from a single point, 'position', out to a maximum distance of 'radius'.

Author:
Travis Fischer (fisch0920@gmail.com)

Matthew Jacobs (jacobs.mh@gmail.com)

Date:
Spring 2008
Parameters:
position - center of sphere defining region of influence
radius - maximum extent of influence
See also:
also Blob

also MetaObject

Definition at line 31 of file MetaBall.h.


Constructor & Destructor Documentation

MetaBall::MetaBall ( real_t  strength = 1.0,
bool  negative = false,
const Point3 position = Point3(),
real_t  radius = 1.0 
) [inline]

Definition at line 36 of file MetaBall.h.

virtual MetaBall::~MetaBall (  )  [inline, virtual]

Definition at line 43 of file MetaBall.h.


Member Function Documentation

void MetaBall::init (  )  [virtual]

Performs any initialization which may be necessary before calling getAABB or evaluate.

Reimplemented from MetaObject.

Definition at line 31 of file MetaBall.cpp.

AABB MetaBall::getAABB (  )  const [virtual]

Returns:
the bounding box of influence which bounds the range in which this MetaBall may have a non-zero charge

Implements MetaObject.

Definition at line 49 of file MetaBall.cpp.

real_t MetaBall::evaluate ( const Point3 pt  )  const [virtual]

Returns:
this MetaBall's charge at the given point
Note:
If the given point is outside of this MetaBall's AABB, evaluate is assumed to return zero

Implements MetaObject.

Definition at line 53 of file MetaBall.cpp.

Point3 MetaBall::getPosition (  )  const [inline]

Returns:
the center of this MetaBall

Definition at line 79 of file MetaBall.h.

void MetaBall::setPosition ( const Point3 position  )  [inline]

sets the initial charge of this object

Definition at line 84 of file MetaBall.h.

real_t MetaBall::getRadius (  )  const [inline]

Returns:
the radius of this MetaBall

Definition at line 89 of file MetaBall.h.

void MetaBall::setRadius ( real_t  radius  )  [inline]

sets the radius of this MetaBall

Definition at line 94 of file MetaBall.h.


Member Data Documentation

AABB MetaBall::m_aabb [protected]

Definition at line 102 of file MetaBall.h.

Definition at line 103 of file MetaBall.h.

Definition at line 104 of file MetaBall.h.


The documentation for this class was generated from the following files:

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6