Go to the documentation of this file. 1 #ifndef SimTK_BICUBIC_SURFACE_H_
2 #define SimTK_BICUBIC_SURFACE_H_
247 Real calcValue(
const Vec2& XY, PatchHint& hint)
const;
252 Real calcValue(
const Vec2& XY)
const;
266 UnitVec3 calcUnitNormal(
const Vec2& XY, PatchHint& hint)
const;
299 const Vec2& XY, PatchHint& hint)
const;
305 const Vec2& XY)
const;
318 bool isSurfaceDefined(
const Vec2& XY)
const;
322 Vec2 getMinXY()
const;
325 Vec2 getMaxXY()
const;
347 int getNumAccesses()
const;
353 int getNumAccessesSamePoint()
const;
359 int getNumAccessesSamePatch()
const;
366 int getNumAccessesNearbyPatch()
const;
371 void resetStatistics()
const;
423 void calcParaboloid(
const Vec2& XY, PatchHint& hint,
433 void getNumPatches(
int& nx,
int& ny)
const;
467 const BicubicSurface::Guts& getGuts()
const
468 { assert(guts);
return *guts; }
471 BicubicSurface::Guts* guts;
499 bool isEmpty()
const;
506 const Guts& getGuts()
const {
return *guts;}
507 Guts& updGuts() {
return *guts;}
551 "The argument Vector XY must have exactly 2 elements but had %d.",
553 return surface.calcValue(
Vec2(XY[0],XY[1]), hint);
576 const Vector& XY)
const override {
577 SimTK_ERRCHK1(XY.size()==2,
"BicubicFunction::calcDerivative()",
578 "The argument Vector XY must have exactly 2 elements but had %d.",
580 return surface.calcDerivative(derivComponents,
Vec2(XY[0],XY[1]), hint);
614 #endif // SimTK_BICUBIC_SURFACE_H_
Vec< 2 > Vec2
This is the most common 2D vector type: a column of 2 Real values stored consecutively in memory (pac...
Definition: SmallMatrix.h:126
BicubicFunction * clone() const override
Definition: BicubicSurface.h:595
This abstract class represents a mathematical function that calculates a value of arbitrary type base...
Definition: Function.h:51
This object is used to hold precalculated data about the most recently accessed patch to accelerate t...
Definition: BicubicSurface.h:482
BicubicSurface()
Construct an uninitialized BicubicSurface handle.
Definition: BicubicSurface.h:164
#define SimTK_SIMMATH_EXPORT
Definition: SimTKmath/include/simmath/internal/common.h:64
Real calcDerivative(const Array_< int > &derivComponents, const Vector &XY) const override
Calculate a partial derivative of this function at a particular point.
Definition: BicubicSurface.h:575
#define SimTK_ERRCHK1(cond, whereChecked, fmt, a1)
Definition: ExceptionMacros.h:326
This is a System that represents the dynamics of a particle moving along a smooth surface.
Definition: Assembler.h:37
const BicubicSurface & getBicubicSurface() const
Return a reference to the BicubicSurface object being used by this BicubicFunction.
Definition: BicubicSurface.h:540
int getMaxDerivativeOrder() const override
This implements the Function base class pure virtual specifying how many derivatives can be taken of ...
Definition: BicubicSurface.h:592
A primitive useful for computations involving a single bicubic Hermite patch.
Definition: Geo.h:66
bool isEmpty() const
Return true if this is an empty handle meaning that it does not currently refer to any surface.
Definition: BicubicSurface.h:455
ELEM max(const VectorBase< ELEM > &v)
Definition: VectorMath.h:251
This class provides a description of a mesh made of polygonal faces (not limited to triangles).
Definition: PolygonalMesh.h:70
This Array_ helper class is the base class for ArrayView_ which is the base class for Array_; here we...
Definition: Array.h:51
Real calcValue(const Vector &XY) const override
Calculate the value of the function at a particular XY coordinate.
Definition: BicubicSurface.h:549
This is a two-argument Function built using a shared BicubicSurface and managing current state to opt...
Definition: BicubicSurface.h:532
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:606
int getArgumentSize() const override
This implements the Function base class pure virtual; here it always returns 2 (X and Y).
Definition: BicubicSurface.h:585
BicubicFunction(const BicubicSurface &surface)
Create a BicubicFunction referencing the given BicubicSurface, which is shared not copied.
Definition: BicubicSurface.h:536
This class will create a smooth surface that approximates a two-argument function F(X,...
Definition: BicubicSurface.h:158
Real calcDerivative(const std::vector< int > &derivComponents, const Vector &x) const
This provides compatibility with std::vector without requiring any copying.
Definition: BicubicSurface.h:599
A primitive useful for computations involving a single bicubic Bezier patch.
Definition: Geo.h:68