#include <ImplicitSphere.h>
Inherits ImplicitFunction.
Public Member Functions | |
ImplicitSphere (MDistance r, float w, MPoint c) | |
The Constructor. | |
virtual | ~ImplicitSphere () |
The Destructor. | |
virtual float | implicitValue (MPoint p) |
An virutal Function. | |
virtual void | applyMatrix (MTransformationMatrix matrix) |
An virutal Function. | |
virtual void | applyRadiusWeight (MDistance r, float w) |
An virutal Function. | |
virtual bool | testInfluance (MPoint p) |
An virutal Function. | |
Public Attributes | |
MDistance | radius |
A public variable. | |
MPoint | center |
A public variable. | |
double | a |
A public variable. | |
double | b |
A public variable. | |
double | z |
A public variable. |
The ImplicitSphere class represents the mathematical formulation of a "metaball". It uses the function of an ellipsoid as of http://www.hyperfun.org to calculate the implicit function value. It extends the ImplicitFunction class in order to provide the relevant methods to SurfaceGenerator.
Definition at line 31 of file ImplicitSphere.h.
|
The Constructor. This Constructor initalises and ImplicitSphere given the specified values. The initial radius passed in will be split into a, b, z in order to calculate the correct function of the ellipsoid. This enables the scaling of the metaball in and direction. It assumes that the initial ImplicitSphere is actually a sphere. The radius is passed in as a MDistance and not as an MFloat to comply with Maya's ability to specify different scales in which to calculate the size of an object.
Definition at line 9 of file ImplicitSphere.cpp. |
|
The Destructor. Destructs this ImplicitSphere Definition at line 55 of file ImplicitSphere.h. |
|
An virutal Function. Applies the given Transformation matrix in order to update the location in 3D space where to calculate the implicit function value. This enables the ImplicitSphere to be moved around in the Maya view port.
Implements ImplicitFunction. Definition at line 35 of file ImplicitSphere.cpp. Referenced by SurfaceGenerator::compute(). |
|
An virutal Function. Applies the given radius to this ImplicitSphere. It sets the new radius to the a, b, z value in order to calculate the function of the ellipsoid.
Definition at line 39 of file ImplicitSphere.cpp. References a, b, radius, and z. Referenced by SurfaceGenerator::compute(). |
|
An virutal Function. Return the implicit function value for this ImplicitSphere for the given point p. The method first translates the given point according to the current transformation matrix. This enables this ImplicitSphere to be translated, rotated and scaled within the Maya viewport. After translation it calculates the implicit function value based on the formala of an ellipsoid as specified on http://www.hyperfun.org. f(p)=1-((p.x-center.x)/a)^2-((p.y-center.y)/b)^2-((p.z-center.z)/z)^2
Implements ImplicitFunction. Definition at line 20 of file ImplicitSphere.cpp. References a, b, center, and z. Referenced by SurfaceGenerator::compute(), and testInfluance(). |
|
An virutal Function. Returns if the given point p is within the influence radius of this ImplicitSphere.
Implements ImplicitFunction. Definition at line 47 of file ImplicitSphere.cpp. References implicitValue(). |
|
A public variable. The a value for calculating the ellispsoid Definition at line 125 of file ImplicitSphere.h. Referenced by applyRadiusWeight(), ImplicitSphere(), and implicitValue(). |
|
A public variable. The b value for calculating the ellispsoid Definition at line 131 of file ImplicitSphere.h. Referenced by applyRadiusWeight(), ImplicitSphere(), and implicitValue(). |
|
A public variable. The center of this ImplicitSphere Definition at line 119 of file ImplicitSphere.h. Referenced by ImplicitSphere(), and implicitValue(). |
|
A public variable. The radius of this ImplicitSphere Definition at line 113 of file ImplicitSphere.h. Referenced by applyRadiusWeight(), and ImplicitSphere(). |
|
A public variable. The z value for calculating the ellispsoid Definition at line 137 of file ImplicitSphere.h. Referenced by applyRadiusWeight(), SurfaceGenerator::compute(), ImplicitSphere(), and implicitValue(). |