ATLAS Offline Software
Loading...
Searching...
No Matches
HEPVis::SbPlane Class Reference

#include <SbPlane.h>

Collaboration diagram for HEPVis::SbPlane:

Public Member Functions

 SbPlane ()
 SbPlane (const SbVec3d &normal, double D)
 SbPlane (const SbVec3d &normal, const SbVec3d &point)
double getDistance (const SbVec3d &point) const
const SbVec3d & getNormal () const
double getDistanceFromOrigin () const
double distance (const SbVec3d &point) const

Private Attributes

SbVec3d m_normal
double m_distance

Detailed Description

Definition at line 40 of file SbPlane.h.

Constructor & Destructor Documentation

◆ SbPlane() [1/3]

HEPVis::SbPlane::SbPlane ( void )

Definition at line 42 of file SbPlane.cxx.

44:m_normal(0,0,1) //CLHEP initialize with x-y plane (normal to z and distance 0)
45,m_distance(0)
46{}
SbVec3d m_normal
Definition SbPlane.h:54
double m_distance
Definition SbPlane.h:55

◆ SbPlane() [2/3]

HEPVis::SbPlane::SbPlane ( const SbVec3d & normal,
double D )

Definition at line 47 of file SbPlane.cxx.

48 : m_normal (a_normal),
49 m_distance (a_D)
50{
51 m_normal.normalize();
52 //NOTE : equation of the plan is then : n[0]*x+n[1]*y+n[2]*z-distance = 0
53}

◆ SbPlane() [3/3]

HEPVis::SbPlane::SbPlane ( const SbVec3d & normal,
const SbVec3d & point )

Definition at line 54 of file SbPlane.cxx.

55 : m_normal (a_normal)
56{
57 //FIXME if(normalref.sqrLength()==0) //throw
58 m_normal.normalize();
59 m_distance = m_normal.dot(a_point);
60}

Member Function Documentation

◆ distance()

double HEPVis::SbPlane::distance ( const SbVec3d & point) const

Definition at line 74 of file SbPlane.cxx.

74 {
75 return getDistance(a_point);
76}
double getDistance(const SbVec3d &point) const
Definition SbPlane.cxx:71

◆ getDistance()

double HEPVis::SbPlane::getDistance ( const SbVec3d & point) const

Definition at line 71 of file SbPlane.cxx.

71 {
72 return a_point.dot(m_normal) - m_distance;
73}

◆ getDistanceFromOrigin()

double HEPVis::SbPlane::getDistanceFromOrigin ( void ) const

Definition at line 78 of file SbPlane.cxx.

78{ return m_distance;}

◆ getNormal()

const SbVec3d & HEPVis::SbPlane::getNormal ( ) const

Definition at line 77 of file SbPlane.cxx.

77{ return m_normal;}

Member Data Documentation

◆ m_distance

double HEPVis::SbPlane::m_distance
private

Definition at line 55 of file SbPlane.h.

◆ m_normal

SbVec3d HEPVis::SbPlane::m_normal
private

Definition at line 54 of file SbPlane.h.


The documentation for this class was generated from the following files: