CMS 3D CMS Logo

IgSoQuad Class Reference

Quadrilateral in the (x,y) plane defined by the 2D vectors pointing to the corners. More...

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

Inheritance diagram for IgSoQuad:

IgSoShapeKit

List of all members.

Public Member Functions

 IgSoQuad (void)

Static Public Member Functions

static void initClass (void)

Public Attributes

SoSFVec2f llCornerOffset
SoSFVec2f lrCornerOffset
SoSFVec2f ulCornerOffset
SoSFVec2f urCornerOffset

Protected Member Functions

virtual void refresh (void)

Private Member Functions

 SO_KIT_CATALOG_ENTRY_HEADER (face)
 SO_KIT_HEADER (IgSoQuad)


Detailed Description

Quadrilateral in the (x,y) plane defined by the 2D vectors pointing to the corners.

Author:
Laurent Duflot
Date:
April 2002

Definition at line 26 of file IgSoQuad.h.


Constructor & Destructor Documentation

IgSoQuad::IgSoQuad ( void   ) 

Definition at line 24 of file IgSoQuad.cc.

References f, FALSE, llCornerOffset, lrCornerOffset, IgSoShapeKit::setUpConnections(), TRUE, ulCornerOffset, and urCornerOffset.

00025 {
00026     SO_KIT_CONSTRUCTOR (IgSoQuad);
00027     SO_KIT_ADD_FIELD (llCornerOffset, (-0.5f, -0.5f));
00028     SO_KIT_ADD_FIELD (lrCornerOffset, (0.5f, -0.5f));
00029     SO_KIT_ADD_FIELD (urCornerOffset, (0.5f, 0.5f));
00030     SO_KIT_ADD_FIELD (ulCornerOffset, (-0.5f, 0.5f));
00031     SO_KIT_ADD_CATALOG_ENTRY (face, SoFaceSet, FALSE, separator,\x0, TRUE);
00032     SO_KIT_INIT_INSTANCE ();
00033     setUpConnections (true, true);
00034 }


Member Function Documentation

void IgSoQuad::initClass ( void   )  [static]

Reimplemented from IgSoShapeKit.

Definition at line 21 of file IgSoQuad.cc.

Referenced by initNodes(), and initShapes().

00022 { SO_KIT_INIT_CLASS (IgSoQuad, IgSoShapeKit, "IgSoShapeKit"); }

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

Reimplemented from IgSoShapeKit.

Definition at line 37 of file IgSoQuad.cc.

References llCornerOffset, lrCornerOffset, ulCornerOffset, and urCornerOffset.

00038 {
00039     SoFaceSet           *face = new SoFaceSet;
00040     SoVertexProperty    *vtx = new SoVertexProperty;
00041     SbVec2f             ll = llCornerOffset.getValue ();
00042     SbVec2f             lr = lrCornerOffset.getValue ();
00043     SbVec2f             ul = ulCornerOffset.getValue ();
00044     SbVec2f             ur = urCornerOffset.getValue ();
00045 
00046     vtx->vertex.set1Value (0, SbVec3f (ll [0], ll [1], 0));
00047     vtx->vertex.set1Value (1, SbVec3f (ul [0], ul [1], 0));
00048     vtx->vertex.set1Value (2, SbVec3f (ur [0], ur [1], 0));
00049     vtx->vertex.set1Value (3, SbVec3f (lr [0], lr [1], 0));
00050     vtx->normal = SbVec3f (0, 0, 1);
00051     vtx->normalBinding = SoVertexProperty::OVERALL;
00052 
00053     face->numVertices = 4;
00054     face->vertexProperty = vtx;
00055 
00056     setPart ("face", face);
00057 }

IgSoQuad::SO_KIT_CATALOG_ENTRY_HEADER ( face   )  [private]

IgSoQuad::SO_KIT_HEADER ( IgSoQuad   )  [private]


Member Data Documentation

SoSFVec2f IgSoQuad::llCornerOffset

Definition at line 35 of file IgSoQuad.h.

Referenced by IgSoQuad(), and refresh().

SoSFVec2f IgSoQuad::lrCornerOffset

Definition at line 36 of file IgSoQuad.h.

Referenced by IgSoQuad(), and refresh().

SoSFVec2f IgSoQuad::ulCornerOffset

Definition at line 38 of file IgSoQuad.h.

Referenced by IgSoQuad(), and refresh().

SoSFVec2f IgSoQuad::urCornerOffset

Definition at line 37 of file IgSoQuad.h.

Referenced by IgSoQuad(), and refresh().


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