Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

vtkThickPlane Class Reference

#include <vtkThickPlane.h>

List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkThickPlane, vtkImplicitFunction)
void PrintSelf (ostream &os, vtkIndent indent)
double EvaluateFunction (double x[3])
double EvaluateFunction (double x, double y, double z)
void EvaluateGradient (double x[3], double g[3])
virtual void SetPose (double _n1, double _n2, double _n3, double _o1, double _o2, double _o3)
virtual void SetPose (double _n[3], double _o[3])
 vtkGetVectorMacro (Normal, double, 3)
 vtkGetVectorMacro (Origin, double, 3)
virtual void SetThickness (double _arg)
 vtkGetMacro (Thickness, double)

Static Public Member Functions

static vtkThickPlaneNew ()

Public Attributes

int count

Protected Member Functions

 vtkThickPlane ()
 ~vtkThickPlane ()
virtual void SetNormal (double _arg1, double _arg2, double _arg3)
virtual void SetNormal (double _arg[3])
virtual void SetOrigin (double _arg1, double _arg2, double _arg3)
virtual void SetOrigin (double _arg[3])

Protected Attributes

double Normal [3]
double Origin [3]
double Thickness
double Distance

Detailed Description

Definition at line 33 of file vtkThickPlane.h.


Constructor & Destructor Documentation

vtkThickPlane::vtkThickPlane (  ) [protected]

Definition at line 22 of file vtkThickPlane.cxx.

References Normal, and Origin.

{
  this->Normal[0] = 0.0;
  this->Normal[1] = 0.0;
  this->Normal[2] = 1.0;

  this->Origin[0] = 0.0;
  this->Origin[1] = 0.0;
  this->Origin[2] = 0.0;
}
vtkThickPlane::~vtkThickPlane (  ) [inline, protected]

Definition at line 70 of file vtkThickPlane.h.

{};

Member Function Documentation

double vtkThickPlane::EvaluateFunction ( double  x[3] )

Definition at line 34 of file vtkThickPlane.cxx.

{
  return this->EvaluateFunction(x[0],x[1],x[2]);
}
double vtkThickPlane::EvaluateFunction ( double  x,
double  y,
double  z 
)

Definition at line 40 of file vtkThickPlane.cxx.

References QuadProgPP::abs(), Distance, Normal, and Thickness.

{
  // PointPlaneDistance = Distance - Normal*Point
  double ppd = Distance - ( this->Normal[0]*x + 
    this->Normal[1]*y + 
    this->Normal[2]*z );

  if( abs(ppd) <= Thickness )
  {
    count++;
    return 0;
  }

  if( ppd >= 0 )
    return ppd - Thickness;
  
  return abs(ppd + Thickness);
}
void vtkThickPlane::EvaluateGradient ( double  x[3],
double  g[3] 
)
static vtkThickPlane* vtkThickPlane::New (  ) [static]
void vtkThickPlane::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

Definition at line 129 of file vtkThickPlane.cxx.

References Normal, Origin, and Thickness.

{
  this->Superclass::PrintSelf(os,indent);

  os << indent << "Normal: (" << this->Normal[0] << ", " 
    << this->Normal[1] << ", " << this->Normal[2] << ")\n";

  os << indent << "Origin: (" << this->Origin[0] << ", " 
    << this->Origin[1] << ", " << this->Origin[2] << ")\n";

  os << indent << "Thickness: " << this->Thickness << "\n";
}
void vtkThickPlane::SetNormal ( double  _arg1,
double  _arg2,
double  _arg3 
) [protected, virtual]

Definition at line 87 of file vtkThickPlane.cxx.

References Normal, and QuadProgPP::sqrt().

Referenced by SetNormal(), and SetPose().

{
  vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting " << Normal << " to (" << _arg1 << "," << _arg2 << "," << _arg3 << ")");
  if ((this->Normal[0] != _arg1)||(this->Normal[1] != _arg2)||(this->Normal[2] != _arg3))
  {
    double length = sqrt(_arg1*_arg1+_arg2*_arg2+_arg3*_arg3);
    this->Normal[0] = _arg1/length;
    this->Normal[1] = _arg2/length;
    this->Normal[2] = _arg3/length;
    this->Modified();
  }
};
void vtkThickPlane::SetNormal ( double  _arg[3] ) [protected, virtual]

Definition at line 100 of file vtkThickPlane.cxx.

References SetNormal().

{
  this->SetNormal (_arg[0], _arg[1], _arg[2]);
} 
void vtkThickPlane::SetOrigin ( double  _arg[3] ) [protected, virtual]

Definition at line 117 of file vtkThickPlane.cxx.

References SetOrigin().

{
  this->SetOrigin (_arg[0], _arg[1], _arg[2]);
} 
void vtkThickPlane::SetOrigin ( double  _arg1,
double  _arg2,
double  _arg3 
) [protected, virtual]

Definition at line 105 of file vtkThickPlane.cxx.

References Normal, and Origin.

Referenced by SetOrigin(), and SetPose().

{
  vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting " << Origin << " to (" << _arg1 << "," << _arg2 << "," << _arg3 << ")");
  if ((this->Normal[0] != _arg1)||(this->Normal[1] != _arg2)||(this->Normal[2] != _arg3))
  {
    this->Origin[0] = _arg1;
    this->Origin[1] = _arg2;
    this->Origin[2] = _arg3;
    this->Modified();
  }
};
void vtkThickPlane::SetPose ( double  _n1,
double  _n2,
double  _n3,
double  _o1,
double  _o2,
double  _o3 
) [virtual]

Definition at line 68 of file vtkThickPlane.cxx.

References Distance, Normal, Origin, SetNormal(), and SetOrigin().

Referenced by SetPose().

{
  SetNormal(_n1,_n2,_n3);
  SetOrigin(_o1,_o2,_o3);
  Distance = Normal[0]*Origin[0]+Normal[1]*Origin[1]+Normal[2]*Origin[2];
  if(Distance < 0.0)
  {
    Distance = -Distance;
    Normal[0] = -Normal[0];
    Normal[1] = -Normal[1];
    Normal[2] = -Normal[2];
  }
}
void vtkThickPlane::SetPose ( double  _n[3],
double  _o[3] 
) [virtual]

Definition at line 82 of file vtkThickPlane.cxx.

References SetPose().

{
  SetPose(_n[0],_n[1],_n[2],_o[0],_o[1],_o[2]);
}
void vtkThickPlane::SetThickness ( double  _arg ) [virtual]

Definition at line 122 of file vtkThickPlane.cxx.

References QuadProgPP::abs(), and Thickness.

{
  Thickness = abs(_arg);
}
vtkThickPlane::vtkGetMacro ( Thickness  ,
double   
)
vtkThickPlane::vtkGetVectorMacro ( Origin  ,
double  ,
 
)
vtkThickPlane::vtkGetVectorMacro ( Normal  ,
double  ,
 
)
vtkThickPlane::vtkTypeRevisionMacro ( vtkThickPlane  ,
vtkImplicitFunction   
)

Member Data Documentation

Definition at line 66 of file vtkThickPlane.h.

double vtkThickPlane::Distance [protected]

Definition at line 86 of file vtkThickPlane.h.

Referenced by EvaluateFunction(), and SetPose().

double vtkThickPlane::Normal[3] [protected]
double vtkThickPlane::Origin[3] [protected]

Definition at line 84 of file vtkThickPlane.h.

Referenced by PrintSelf(), SetOrigin(), SetPose(), and vtkThickPlane().

double vtkThickPlane::Thickness [protected]

Definition at line 85 of file vtkThickPlane.h.

Referenced by EvaluateFunction(), PrintSelf(), and SetThickness().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines