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

Segment Class Reference

#include <Segment.h>

Inheritance diagram for Segment:

Inheritance graph
[legend]
Collaboration diagram for Segment:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Segment ()
 Default constructor.

 Segment (gmVector3 a, gmVector3 b)
 Explicit constructor.

virtual double proc (gmVector3 x)
 Evaluation of function.

virtual gmVector3 grad (gmVector3 x)
 Evaluation of gradient.

virtual gmMatrix3 hess (gmVector3 x)
 hess returns the Hessian of the function (proc()) for a point or region.

virtual Intervald proc (Box< double >)
 proc returns the evaluation of the function that defines the Implicit surface.

virtual Box3d grad (Box< double >)
virtual IMatrix3d hess (Box< double >)
virtual Intervald proct (Box< double >)
virtual Box3d gradt (Box< double >)
virtual void getq (double *q)
 getq(double*) Loads parameters into q

virtual void _setq (double *q)
 _setq(double*) Sets attributes from q

virtual int qlen ()
 Number of implicit model parameters for this implicit object including its children.

virtual void getqname (char **qn)
 getqname(char**) Returns a list of parameter names

 MAKE_NAME ()

Private Member Functions

void init (gmVector3, gmVector3)
 Called by the various constructors to allow for a single location for the init of a Segment object.

Box3d m_alrp (Intervald)
 Convenience function for the calculation of a LRP over a time interval for a particular m_a.

Box3d m_blrp (Intervald)

Private Attributes

gmVector3 m_a
gmVector3 m_b

Constructor & Destructor Documentation

Segment::Segment  ) 
 

Default constructor.

Definition at line 27 of file Segment.cpp.

References init().

Segment::Segment gmVector3  a,
gmVector3  b
 

Explicit constructor.

Parameters:
a First endpoint.
b Second endpoint.

Definition at line 37 of file Segment.cpp.

References init().


Member Function Documentation

void Segment::_setq double *  q  )  [virtual]
 

_setq(double*) Sets attributes from q

Reimplemented from Implicit.

Definition at line 282 of file Segment.cpp.

References m_a, and m_b.

void Segment::getq double *  q  )  [virtual]
 

getq(double*) Loads parameters into q

Reimplemented from Implicit.

Definition at line 268 of file Segment.cpp.

References m_a, and m_b.

void Segment::getqname char **  qn  )  [virtual]
 

getqname(char**) Returns a list of parameter names

Reimplemented from Implicit.

Definition at line 297 of file Segment.cpp.

Box3d Segment::grad Box< double >   )  [virtual]
 

Reimplemented from Implicit.

Definition at line 185 of file Segment.cpp.

References Interval< Type >::center(), convert(), dot(), Intervald, Box< double >::length(), m_a, m_alrp(), m_b, m_blrp(), and Box< double >::normalize().

gmVector3 Segment::grad gmVector3  x  )  [virtual]
 

Evaluation of gradient.

Parameters:
x Position at which to evaluate.
Returns:
Gradient vector.

Reimplemented from Implicit.

Definition at line 159 of file Segment.cpp.

References dot(), m_a, and m_b.

Box3d Segment::gradt Box< double >  x  )  [virtual]
 

Todo:
Fix me - but may not be calculatable.

Reimplemented from Implicit.

Definition at line 259 of file Segment.cpp.

IMatrix3d Segment::hess Box< double >   )  [virtual]
 

Reimplemented from Implicit.

Definition at line 240 of file Segment.cpp.

gmMatrix3 Segment::hess gmVector3  x  )  [virtual]
 

hess returns the Hessian of the function (proc()) for a point or region.

Basically, the Hessian is a matrix of second partial derivatives, or more formally hess(proc()) =

d^2proc/dx^2, d^2proc/dxdy d^2proc/dxdz \ d^2proc/dxdy, d^2proc/dy^2 d^2proc/dydz \ d^2proc/dxdz, d^2proc/dydz d^2proc/dz^2

Note:
Unless hess is overwritten, it defaults to the numerical approximation of the Hessian.
Parameters:
x Where to evaluate the Hessian of the function.
Returns:
The Hessian result.
See also:
setEpsilon(double)
Note:
The Hessian is symmetric for our uses.

Reimplemented from Implicit.

Definition at line 231 of file Segment.cpp.

void Segment::init gmVector3  a,
gmVector3  b
[private]
 

Called by the various constructors to allow for a single location for the init of a Segment object.

Parameters:
a First endpoint.
b Second endpoint.

Definition at line 20 of file Segment.cpp.

References m_a, and m_b.

Referenced by Segment().

Box3d Segment::m_alrp Intervald  t  )  [private]
 

Convenience function for the calculation of a LRP over a time interval for a particular m_a.

We use the "current" and the "last" coefficients to calculate an interval of the coefficients over a given time interval. This is used for 4D critical point finding.

Definition at line 48 of file Segment.cpp.

References Implicit::getqold(), Intervald, m_a, and qlen().

Referenced by grad(), and proc().

Box3d Segment::m_blrp Intervald   )  [private]
 

Definition at line 62 of file Segment.cpp.

References Implicit::getqold(), Intervald, m_b, and qlen().

Referenced by grad(), and proc().

Segment::MAKE_NAME  ) 
 

Intervald Segment::proc Box< double >  x  )  [virtual]
 

proc returns the evaluation of the function that defines the Implicit surface.

In normal circumstances, the gmVector3 version of proc defaults to a pure virtual function which means that you must define proc(gmVector3) in its subclasses. When INTERVAL_EVAL_ONLY is defined, the Implicit version of proc defaults to a pure virtual function and the gmVector3 version calls the Interval version. Either way, you must define proc() in subclasses of Implicit.

Parameters:
x Where to evaluate the function.
Returns:
The function result. The function is positive outside the surface and negative inside.

Reimplemented from Implicit.

Definition at line 107 of file Segment.cpp.

References Interval< Type >::center(), convert(), dot(), Intervald, Box< double >::length(), Box< double >::lengthSquared(), m_a, m_alrp(), m_b, m_blrp(), Box< double >::normalize(), and Interval< Type >::sqrt().

double Segment::proc gmVector3  x  )  [virtual]
 

Evaluation of function.

Parameters:
x Position at which to evaluate.
Returns:
Distance to segment.

Implements Implicit.

Definition at line 82 of file Segment.cpp.

References dot(), m_a, and m_b.

Intervald Segment::proct Box< double >  x  )  [virtual]
 

Todo:
Fix me - but may not be calculatable.

Reimplemented from Implicit.

Definition at line 251 of file Segment.cpp.

References Intervald.

virtual int Segment::qlen  )  [inline, virtual]
 

Number of implicit model parameters for this implicit object including its children.

Reimplemented from Implicit.

Definition at line 47 of file Segment.h.

Referenced by m_alrp(), and m_blrp().


Member Data Documentation

gmVector3 Segment::m_a [private]
 

Definition at line 19 of file Segment.h.

Referenced by _setq(), getq(), grad(), init(), m_alrp(), and proc().

gmVector3 Segment::m_b [private]
 

Definition at line 20 of file Segment.h.

Referenced by _setq(), getq(), grad(), init(), m_blrp(), and proc().


The documentation for this class was generated from the following files:
Generated on Mon Jun 28 15:03:07 2004 for Advanced Surface Library by doxygen 1.3.4