CMS 3D CMS Logo

IgSoSimpleTrajectory Class Reference

#include <Iguana/Inventor/interface/IgSoSimpleTrajectory.h>

Inheritance diagram for IgSoSimpleTrajectory:

IgSoShapeKit

List of all members.

Public Member Functions

 IgSoSimpleTrajectory (void)

Static Public Member Functions

static void initClass (void)

Public Attributes

SoMFVec3f controlPoints
SoSFUShort linePattern
SoSFFloat lineWidth
SoMFVec3f markerPoints
SoSFFloat pointSize

Protected Member Functions

virtual void refresh (void)

Private Member Functions

 SO_KIT_CATALOG_ENTRY_HEADER (markers)
 SO_KIT_CATALOG_ENTRY_HEADER (line)
 SO_KIT_CATALOG_ENTRY_HEADER (style)
 SO_KIT_HEADER (IgSoTrajectory)


Detailed Description

The trajectory is described by a set of 3D points which are splined together. The spline curve is forced to pass through each point.

A set of markers may also be drawn.

Definition at line 28 of file IgSoSimpleTrajectory.h.


Constructor & Destructor Documentation

IgSoSimpleTrajectory::IgSoSimpleTrajectory ( void   ) 

Definition at line 26 of file IgSoSimpleTrajectory.cc.

References controlPoints, FALSE, parsecf::pyparsing::line(), linePattern, lineWidth, markerPoints, pointSize, IgSoShapeKit::setUpConnections(), and TRUE.

00027 {
00028     SO_KIT_CONSTRUCTOR (IgSoSimpleTrajectory);
00029     SO_KIT_ADD_FIELD (controlPoints, (0.0, 0.0, 0.0));
00030     SO_KIT_ADD_FIELD (markerPoints,  (0.0, 0.0, 0.0));
00031     SO_KIT_ADD_FIELD (lineWidth,     (1.0));
00032     SO_KIT_ADD_FIELD (pointSize,     (3.0));
00033     SO_KIT_ADD_FIELD (linePattern,   (0xffff));
00034     SO_KIT_ADD_CATALOG_ENTRY (style, SoDrawStyle, FALSE, separator,\x0, TRUE);
00035     SO_KIT_ADD_CATALOG_ENTRY (line, SoLineSet, FALSE, separator,\x0, TRUE); // FIXME: SoNurbsCurve
00036     SO_KIT_ADD_CATALOG_ENTRY (markers, SoPointSet, FALSE, separator,\x0, TRUE);
00037     SO_KIT_INIT_INSTANCE ();
00038     setUpConnections (true, true);
00039 }


Member Function Documentation

void IgSoSimpleTrajectory::initClass ( void   )  [static]

Reimplemented from IgSoShapeKit.

Definition at line 23 of file IgSoSimpleTrajectory.cc.

Referenced by initNodes(), and initShapes().

00024 { SO_KIT_INIT_CLASS (IgSoSimpleTrajectory, IgSoShapeKit, "IgSoShapeKit"); }

void IgSoSimpleTrajectory::refresh ( void   )  [protected, virtual]

Reimplemented from IgSoShapeKit.

Definition at line 42 of file IgSoSimpleTrajectory.cc.

References controlPoints, i, j, parsecf::pyparsing::line(), linePattern, lineWidth, markerPoints, n, and pointSize.

00043 {
00044     SoDrawStyle         *style = new SoDrawStyle;
00045     SoLineSet           *line = new SoLineSet; // FIXME: SoNurbsCurve
00046     SoPointSet          *markers = new SoPointSet;
00047     SoVertexProperty    *lineVtx = new SoVertexProperty;
00048     SoVertexProperty    *markerVtx = new SoVertexProperty;
00049 
00050     style->lineWidth = lineWidth;
00051     style->pointSize = pointSize;
00052     style->linePattern = linePattern;
00053 
00054 #if 0   // Old NURBS version
00055     if (controlPoints.getNum () >= 2)
00056     {
00057         static const int repeat = 2; // to force curve really through the points, repeat them
00058         int points = controlPoints.getNum ();
00059         for (int i = 0, n = 0; i < points; ++i)
00060             for (int j = 0; j < repeat; ++j, ++n)
00061                 lineVtx->vertex.set1Value (n, controlPoints [i]);
00062 
00063         // Define the knot vector
00064         for (int i = 0; i < points * repeat + 3; ++i)
00065             line->knotVector.set1Value (i, i);
00066 
00067         line->numControlPoints = points * repeat;
00068     }
00069 #endif
00070 
00071     lineVtx->vertex = controlPoints;
00072     line->vertexProperty = lineVtx;
00073 
00074     markerVtx->vertex = markerPoints;
00075     markers->vertexProperty = markerVtx;
00076 
00077     setPart ("style",   style);
00078     setPart ("line",    line);
00079     setPart ("markers", markers);
00080 }

IgSoSimpleTrajectory::SO_KIT_CATALOG_ENTRY_HEADER ( markers   )  [private]

IgSoSimpleTrajectory::SO_KIT_CATALOG_ENTRY_HEADER ( line   )  [private]

IgSoSimpleTrajectory::SO_KIT_CATALOG_ENTRY_HEADER ( style   )  [private]

IgSoSimpleTrajectory::SO_KIT_HEADER ( IgSoTrajectory   )  [private]


Member Data Documentation

SoMFVec3f IgSoSimpleTrajectory::controlPoints

Definition at line 39 of file IgSoSimpleTrajectory.h.

Referenced by IgSoSimpleTrajectory(), VisEventSetupService::refitTrack(), refresh(), VisGsfTrackTwig::update(), VisGsfPFRecTrackTwig::update(), VisTkIdealHelixTracksTwig::update(), VisPFRecTrackTwig::update(), VisTrackingParticleTwig::update(), VisTkSimTrackTwig::update(), and VisSimTrackTwig::update().

SoSFUShort IgSoSimpleTrajectory::linePattern

Definition at line 43 of file IgSoSimpleTrajectory.h.

Referenced by IgSoSimpleTrajectory(), refresh(), VisGsfTrackTwig::update(), VisGsfPFRecTrackTwig::update(), and VisPFRecTrackTwig::update().

SoSFFloat IgSoSimpleTrajectory::lineWidth

Definition at line 41 of file IgSoSimpleTrajectory.h.

Referenced by IgSoSimpleTrajectory(), VisEventSetupService::refitTrack(), refresh(), VisGsfTrackTwig::update(), VisGsfPFRecTrackTwig::update(), and VisPFRecTrackTwig::update().

SoMFVec3f IgSoSimpleTrajectory::markerPoints

Definition at line 40 of file IgSoSimpleTrajectory.h.

Referenced by IgSoSimpleTrajectory(), VisEventSetupService::refitTrack(), refresh(), VisGsfTrackTwig::update(), VisGsfPFRecTrackTwig::update(), VisTkIdealHelixTracksTwig::update(), VisPFRecTrackTwig::update(), VisTrackingParticleTwig::update(), VisTkSimTrackTwig::update(), and VisSimTrackTwig::update().

SoSFFloat IgSoSimpleTrajectory::pointSize

Definition at line 42 of file IgSoSimpleTrajectory.h.

Referenced by IgSoSimpleTrajectory(), and refresh().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:44 2009 for CMSSW by  doxygen 1.5.4