Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Implicit.h File Reference


Detailed Description

Author:
Nate Carr, Jeff Decker, John C. Hart, and Terry Fleury Implicit Class definition

Definition in file Implicit.h.

#include <string>
#include <valarray>
#include <vector>
#include <sstream>
#include "factory.h"
#include "pixmaps.h"
#include "Surface.h"
#include "Interval.h"
#include "Box.h"
#include "IMatrix.h"
#include "Polygonizer/jbvertices.h"
#include "gmTNTconvert.h"

Include dependency graph for Implicit.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class  Implicit
 The master class of all implicit surfaces. More...


Defines

#define VIRTUAL_DERIV   virtual
 If you are using the standard versions of grad() and hess() (ie.

#define M_PI   3.14159265358979323846
#define REGISTER_IMPLICIT(class_name, class_string)
 Macro to register a new Implicit subclass.

#define MAKE_NAME()
 Macro to add name() and objectName functionality to all subclasses of Implicit.

#define IMPLICIT_REGISTRY   genericFactory<Implicit>::instance().registry
 Macro to get the registry for the ImplicitFactory.

#define NEW_IMPLICIT(class_string)   genericFactory<Implicit>::instance().create(class_string);
 Macro to construct a new subclass of Implicit.


Typedefs

typedef std::valarray< double > DoubleArray
typedef std::vector< double > DoubleVector
typedef std::vector< std::string > NameVector
typedef genericFactory< ImplicitImplicitFactory
 Shorthand type for a factory that creates Implicits.

typedef genericFactory< Implicit
>::FN_REGISTRY 
ImplicitRegistry
 Shorthand type for the ImplicitFactory registry.


Functions

gmMatrix3 outer (gmVector3 x, gmVector3 y)
 Computes the outer product between to 3-vectors.

IMatrix3d outer (Box3d x, Box3d y)
 Interval version of outer product of two Boxes.


Define Documentation

#define IMPLICIT_REGISTRY   genericFactory<Implicit>::instance().registry
 

Macro to get the registry for the ImplicitFactory.

The registry is a map of classname strings to new class constructors.

Returns:
The registry of type ImplicitRegistry.

Definition at line 432 of file Implicit.h.

#define M_PI   3.14159265358979323846
 

Definition at line 108 of file Implicit.h.

Referenced by ParticleShader::applyTransformations(), Sphere::area(), CatmullClarkSubdivision::divideFace(), ModButterflySubdivision::ExceptionalVertex(), ParticleRendererGL::ParticleRendererGL(), and sphericalMotion().

 
#define MAKE_NAME  ) 
 

Value:

static std::string registry_name; \
  virtual const std::string name() { return registry_name; } \
  virtual void resetObjectName() { \
  std::ostringstream objectNumberName; \
  objectNumberName << ":" << ++objectNumber; \
  objectName = Implicit::defaultObjectNamePrefix + name() + \
                     objectNumberName.str(); \
  }
Macro to add name() and objectName functionality to all subclasses of Implicit.

Definition at line 418 of file Implicit.h.

#define NEW_IMPLICIT class_string   )     genericFactory<Implicit>::instance().create(class_string);
 

Macro to construct a new subclass of Implicit.

Parameters:
class_string String name of the class to create.
Returns:
A std::auto_ptr<Implicit> to the appropriate subclass. This is pretty much just a Implicit* but the auto_ptr adds some safety mechanisms to avoid memory leaks.

Definition at line 440 of file Implicit.h.

Referenced by ImpFileManager::readImplicit().

#define REGISTER_IMPLICIT class_name,
class_string   ) 
 

Value:

int grab##class_name; \
    std::string class_name::registry_name = class_string; \
  namespace { \
  registerInFactory<Implicit,class_name> registerMe(class_name::registry_name);\
  }
Macro to register a new Implicit subclass.

Parameters:
class_name The token name of the class.
class_string The string name of the class.
Note:
This belongs in the .cpp file, right after the includes.

Definition at line 408 of file Implicit.h.

#define VIRTUAL_DERIV   virtual
 

If you are using the standard versions of grad() and hess() (ie.

you have not defined INTERVAL_EVAL_ONLY), you may #undef VIRTUAL_DERIV to force grad() and hess() to use numerical approximations of the functions EVEN IF these methods are overridden in subclasses. You may want to do this when testing out new implemenations of grad() and hess() to verify that they are accurate.

Definition at line 103 of file Implicit.h.


Typedef Documentation

typedef std::valarray<double> DoubleArray
 

Definition at line 111 of file Implicit.h.

Referenced by SurfacePropagation::applyConstraint(), SurfaceAdhesion::applyConstraint(), Implicit::getq(), Implicit::getqold(), Implicit::interpolate(), Implicit::procq(), and Implicit::setq().

typedef std::vector<double> DoubleVector
 

Definition at line 112 of file Implicit.h.

Referenced by ParticleStuff::getq(), Implicit::getq(), Implicit::getqold(), ParticleStuff::getqpp(), Implicit::procq(), ParFileManager::readParticles(), ParticleStuff::setq(), Implicit::setq(), ParticleStuff::setqpp(), and ParFileManager::writeParticles().

typedef genericFactory<Implicit> ImplicitFactory
 

Shorthand type for a factory that creates Implicits.

ImplicitFactory is a genericFactory<Implicit>.

Definition at line 394 of file Implicit.h.

typedef genericFactory<Implicit>::FN_REGISTRY ImplicitRegistry
 

Shorthand type for the ImplicitFactory registry.

This type is essentially a map of classname strings to functions that create the new class.

See also:
IMPLICIT_REGISTRY

Definition at line 401 of file Implicit.h.

typedef std::vector< std::string > NameVector
 

Definition at line 113 of file Implicit.h.

Referenced by Implicit::getqname(), ParticleStuff::qname(), ParticleStuff::qnamepp(), ParticleStuff::qshortname(), ParFileManager::readParticles(), and ParFileManager::writeParticles().


Function Documentation

IMatrix3d outer Box3d  x,
Box3d  y
 

Interval version of outer product of two Boxes.

Definition at line 1260 of file Implicit.cpp.

Referenced by Blob::hess(), Blend::hess(), and RBF::hessphi().

gmMatrix3 outer gmVector3  x,
gmVector3  y
 

Computes the outer product between to 3-vectors.

The result might be the transpose of what it really should be. I haven't checked the ordering.

Parameters:
x 3-vector factor
y 3-vector factor
Returns:
3x3 matrix containing pairwise products of x,y elements
Note:
Hate to put this here of all places, but want to keep libgm unchanged and this is the only file I know will be included by everyone.

Definition at line 1251 of file Implicit.cpp.


Generated on Mon Jun 28 14:59:18 2004 for Advanced Surface Library by doxygen 1.3.4