TridSketchPlane Class Reference

#include <TridSketches.h>

Inheritance diagram for TridSketchPlane:
TridSketch

List of all members.

Public Member Functions

 TridSketchPlane (void)
 TridSketchPlane (const TVector3 &p1, const TVector3 &p2, const TVector3 &p3, const TVector3 &p4)
 TridSketchPlane (const TVector3 &x0, const TVector3 &v1, float half_length, const TVector3 &v2, float half_width)
 ~TridSketchPlane (void)
void SetPoint (int ipoint, const TVector3 &pt)
void SetPoint (int ipoint, float x, float y, float z)
void DrawSelf (void)

Public Attributes

TVector3 p [4]

Detailed Description

Definition at line 145 of file TridSketches.h.


Constructor & Destructor Documentation

TridSketchPlane::TridSketchPlane ( void   ) 

Definition at line 205 of file TridSketches.cxx.

00206   : TridSketch(kPlane, TVector3())
00207 {
00208 }

TridSketchPlane::TridSketchPlane ( const TVector3 &  p1,
const TVector3 &  p2,
const TVector3 &  p3,
const TVector3 &  p4 
)

Definition at line 210 of file TridSketches.cxx.

References p.

00211   : TridSketch( kPlane, (p1 + p2 + p3 + p4)*0.25 )
00212 {
00213   //
00214   // Defines a plane using the four corner positions.
00215   // Vertices must be given in rotational order.
00216   //
00217   p[0] = p1;
00218   p[1] = p2;
00219   p[2] = p3;
00220   p[3] = p4;
00221 }

TridSketchPlane::TridSketchPlane ( const TVector3 &  x0,
const TVector3 &  v1,
float  half_length,
const TVector3 &  v2,
float  half_width 
)

Definition at line 223 of file TridSketches.cxx.

References TridSketch::fCenter, and p.

00226   : TridSketch( kPlane, x0 )
00227 {
00228   //
00229   // Defines a plane using the center, two width direction vectors, and half-widths.
00230   //
00231   p[0] = x0 + v1*half_length + v2*half_width;
00232   p[1] = x0 - v1*half_length + v2*half_width;
00233   p[2] = x0 - v1*half_length - v2*half_width;
00234   p[3] = x0 + v1*half_length - v2*half_width;
00235   fCenter = x0;
00236 }

TridSketchPlane::~TridSketchPlane ( void   )  [inline]

Definition at line 155 of file TridSketches.h.

00155 {};


Member Function Documentation

void TridSketchPlane::DrawSelf ( void   )  [virtual]

Reimplemented from TridSketch.

Definition at line 238 of file TridSketches.cxx.

References TridSketch::GlVertexTVector(), and p.

00239 {
00240   // Draws a plane in the current context.
00241 
00242   glBegin(GL_QUADS);
00243   GlVertexTVector(p[0]);
00244   GlVertexTVector(p[1]);
00245   GlVertexTVector(p[2]);
00246   GlVertexTVector(p[3]);
00247   glEnd();
00248 
00249 }

void TridSketchPlane::SetPoint ( int  ipoint,
float  x,
float  y,
float  z 
) [inline, virtual]

Reimplemented from TridSketch.

Definition at line 158 of file TridSketches.h.

References TridSketch::SetDirty().

00158 { p[ipoint].SetXYZ(x,y,z);  SetDirty();};

void TridSketchPlane::SetPoint ( int  ipoint,
const TVector3 &  pt 
) [inline, virtual]

Reimplemented from TridSketch.

Definition at line 157 of file TridSketches.h.

References TridSketch::SetDirty().

00157 { p[ipoint] = pt;  SetDirty();};


Member Data Documentation

TVector3 TridSketchPlane::p[4]

Definition at line 148 of file TridSketches.h.

Referenced by DrawSelf(), and TridSketchPlane().


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

Generated on 15 Jul 2018 for loon by  doxygen 1.6.1