#include <Iguana/Inventor/interface/IgSo2DArrow.h>
Public Member Functions | |
IgSo2DArrow (void) | |
Static Public Member Functions | |
static void | initClass (void) |
Public Attributes | |
SoSFFloat | headHeight |
SoSFFloat | length |
SoSFFloat | lengthRatio |
Protected Member Functions | |
virtual void | refresh (void) |
Private Member Functions | |
SO_KIT_CATALOG_ENTRY_HEADER (head) | |
SO_KIT_CATALOG_ENTRY_HEADER (line) | |
SO_KIT_HEADER (IgSo2DArrow) |
Definition at line 27 of file IgSo2DArrow.h.
IgSo2DArrow::IgSo2DArrow | ( | void | ) |
Definition at line 25 of file IgSo2DArrow.cc.
References f, FALSE, headHeight, length, lengthRatio, parsecf::pyparsing::line(), IgSoShapeKit::setUpConnections(), and TRUE.
00026 { 00027 SO_KIT_CONSTRUCTOR (IgSo2DArrow); 00028 SO_KIT_ADD_FIELD (length, (1.0f)); 00029 SO_KIT_ADD_FIELD (lengthRatio, (0.1f)); 00030 SO_KIT_ADD_FIELD (headHeight, (0.05f)); 00031 SO_KIT_ADD_CATALOG_ENTRY (line, SoLineSet, FALSE, separator,\x0, TRUE); 00032 SO_KIT_ADD_CATALOG_ENTRY (head, SoFaceSet, FALSE, separator,\x0, TRUE); 00033 SO_KIT_INIT_INSTANCE (); 00034 setUpConnections (true, true); 00035 }
Reimplemented from IgSoShapeKit.
Definition at line 22 of file IgSo2DArrow.cc.
Referenced by initNodes(), and initShapes().
00023 { SO_KIT_INIT_CLASS (IgSo2DArrow, IgSoShapeKit, "IgSoShapeKit"); }
Reimplemented from IgSoShapeKit.
Definition at line 38 of file IgSo2DArrow.cc.
References f, headHeight, hh, edm::es::l(), length, lengthRatio, and parsecf::pyparsing::line().
00039 { 00040 SoLineSet *line = new SoLineSet; 00041 SoFaceSet *head = new SoFaceSet; 00042 SoVertexProperty *vtx; 00043 00044 float lRatio = lengthRatio.getValue (); 00045 float hh = headHeight.getValue (); 00046 float l = length.getValue (); 00047 00048 // line 00049 vtx = new SoVertexProperty; 00050 vtx->vertex.set1Value (0, 0.f, 0.f, 0.f); 00051 vtx->vertex.set1Value (1, (1.f-lRatio)*l, 0.f, 0.f); 00052 vtx->normal = SbVec3f (0.f,0.f,1.f); 00053 line->numVertices = 2; 00054 line->vertexProperty = vtx; 00055 00056 // head 00057 vtx = new SoVertexProperty; 00058 vtx->vertex.set1Value (0, (1.f-lRatio)*l, -.5f*hh, 0.f); 00059 vtx->vertex.set1Value (1, l, 0.f, 0.f); 00060 vtx->vertex.set1Value (2, (1.f-lRatio)*l, .5f*hh, 0.f); 00061 vtx->normal = SbVec3f (0.f,0.f,1.f); 00062 head->numVertices = 3; 00063 head->vertexProperty = vtx; 00064 00065 setPart ("line", line); 00066 setPart ("head", head); 00067 }
IgSo2DArrow::SO_KIT_CATALOG_ENTRY_HEADER | ( | head | ) | [private] |
IgSo2DArrow::SO_KIT_CATALOG_ENTRY_HEADER | ( | line | ) | [private] |
IgSo2DArrow::SO_KIT_HEADER | ( | IgSo2DArrow | ) | [private] |
SoSFFloat IgSo2DArrow::headHeight |
SoSFFloat IgSo2DArrow::length |
SoSFFloat IgSo2DArrow::lengthRatio |