当前位置: 首页>>代码示例>>C++>>正文


C++ SO_NODE_CONSTRUCTOR函数代码示例

本文整理汇总了C++中SO_NODE_CONSTRUCTOR函数的典型用法代码示例。如果您正苦于以下问题:C++ SO_NODE_CONSTRUCTOR函数的具体用法?C++ SO_NODE_CONSTRUCTOR怎么用?C++ SO_NODE_CONSTRUCTOR使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SO_NODE_CONSTRUCTOR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SO_NODE_CONSTRUCTOR

// --------------------------------------------------------------------------
//! Constructor, creates fields
// --------------------------------------------------------------------------
SoView2DLiftChart::SoView2DLiftChart() {
   // Execute inventor internal stuff for node construction.
   SO_NODE_CONSTRUCTOR(SoView2DLiftChart);
   
   SO_NODE_ADD_FIELD(verticalOffset, (100));
   

   //! Set inherited fields to a default state using the default string setting
   //! mechanism available in OpenInventor. E.g. in this case the extension
   //! shall be activated by button 1 and it must be over a valid voxel position
   //! to be activated.
   set("button1 PRESSED button2 IGNORED button3 IGNORED needsValidVoxel FALSE");

   _topOffset = _bottomOffset = 100;
   _leftOffset = 10;
   _currentSlice = 0;
   _width = 0;
   _height = 0;
   _dsl = 0;
   _liftChartData = 0;

   // Create a sensor calling _nodeChangedCB if any field changes. Use a priority 0
   // sensor to be sure that changes are not delayed or collected.
   _nodeSensor = new SoNodeSensor(SoView2DLiftChart::nodeChangedCB, this);
   _nodeSensor->setPriority(0);
   _nodeSensor->attach(this);
}
开发者ID:cguagliano,项目名称:communitymodules,代码行数:30,代码来源:SoView2DLiftChart.cpp

示例2: SO_NODE_CONSTRUCTOR

SoXipOverlayFilter::SoXipOverlayFilter()
{
	SO_NODE_CONSTRUCTOR( SoXipOverlayFilter );

	SO_NODE_ADD_FIELD( label, ("") );
	label.setNum(0);
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:7,代码来源:SoXipOverlayFilter.cpp

示例3: SO_NODE_CONSTRUCTOR

SoV1Environment::SoV1Environment()
//
////////////////////////////////////////////////////////////////////////
{
    SO_NODE_CONSTRUCTOR(SoV1Environment);

    SO_NODE_ADD_FIELD(ambientIntensity,	(0.2));
    SO_NODE_ADD_FIELD(ambientColor,	(1.0, 1.0, 1.0));
    SO_NODE_ADD_FIELD(attenuation,	(0.0, 0.0, 1.0));
    SO_NODE_ADD_FIELD(fogType,		(NONE));
    SO_NODE_ADD_FIELD(fogComputed,	(PER_VERTEX));
    SO_NODE_ADD_FIELD(fogColor,		(1.0, 1.0, 1.0));
    SO_NODE_ADD_FIELD(fogDensity,	(0.0));
    SO_NODE_ADD_FIELD(fogNearDistance,	(1.0));
    SO_NODE_ADD_FIELD(fogFarDistance,	(10.0));

    // Set up static info for enumerated type fields
    SO_NODE_DEFINE_ENUM_VALUE(Type, NONE);
    SO_NODE_DEFINE_ENUM_VALUE(Type, LINEAR);
    SO_NODE_DEFINE_ENUM_VALUE(Type, EXPONENTIAL);
    SO_NODE_DEFINE_ENUM_VALUE(Type, EXPONENTIAL_SQUARED);
    SO_NODE_DEFINE_ENUM_VALUE(Computed, PER_VERTEX);
    SO_NODE_DEFINE_ENUM_VALUE(Computed, PER_PIXEL);

    // Set up info in enumerated type fields
    SO_NODE_SET_SF_ENUM_TYPE(fogType, Type);
    SO_NODE_SET_SF_ENUM_TYPE(fogComputed, Computed);
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:28,代码来源:SoV1Environment.cpp

示例4: SO_NODE_CONSTRUCTOR

SoXipImageOverlayManager::SoXipImageOverlayManager()
{
	SO_NODE_CONSTRUCTOR( SoXipImageOverlayManager );

	SO_NODE_ADD_FIELD( store, () );
	SO_NODE_ADD_FIELD( update, () );

	mShapeSwitch->whichChild.setValue(-1);
	mShapeSwitch->removeAllChildren();

	mImageData			= 0;
	mCurrentSlice		= -1;

	mStoreSensor = new SoFieldSensor( storeSensorCB, this );
	mStoreSensor->attach( &store );

	mUpdateSensor = new SoFieldSensor( updateSensorCB, this );
	mUpdateSensor->attach( &update );

	mOverlaysSensor = new SoNodeSensor( overlaysSensorCB, this );
	mOverlaysSensor->attach( mShapeSwitch );

	mOverlaysTimerSensor = new SoTimerSensor( overlaysTimerSensorCB, this );
	mOverlaysTimerSensor->unschedule();
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:25,代码来源:SoXipImageOverlayManager.cpp

示例5: SO_NODE_CONSTRUCTOR

SoOrthoSlice::SoOrthoSlice(void)
{
  SO_NODE_CONSTRUCTOR(SoOrthoSlice);

  PRIVATE(this) = new SoOrthoSliceP(this);

  SO_NODE_DEFINE_ENUM_VALUE(Axis, X);
  SO_NODE_DEFINE_ENUM_VALUE(Axis, Y);
  SO_NODE_DEFINE_ENUM_VALUE(Axis, Z);
  SO_NODE_SET_SF_ENUM_TYPE(axis, Axis);

  SO_NODE_DEFINE_ENUM_VALUE(Interpolation, NEAREST);
  SO_NODE_DEFINE_ENUM_VALUE(Interpolation, LINEAR);
  SO_NODE_SET_SF_ENUM_TYPE(interpolation, Interpolation);

  SO_NODE_DEFINE_ENUM_VALUE(AlphaUse, ALPHA_AS_IS);
  SO_NODE_DEFINE_ENUM_VALUE(AlphaUse, ALPHA_OPAQUE);
  SO_NODE_DEFINE_ENUM_VALUE(AlphaUse, ALPHA_BINARY);
  SO_NODE_SET_SF_ENUM_TYPE(alphaUse, AlphaUse);

  SO_NODE_DEFINE_ENUM_VALUE(ClippingSide, FRONT);
  SO_NODE_DEFINE_ENUM_VALUE(ClippingSide, BACK);
  SO_NODE_SET_SF_ENUM_TYPE(clippingSide, ClippingSide);

  SO_NODE_ADD_FIELD(sliceNumber, (0));
  SO_NODE_ADD_FIELD(axis, (Z));
  SO_NODE_ADD_FIELD(interpolation, (LINEAR));
  SO_NODE_ADD_FIELD(alphaUse, (ALPHA_BINARY));
  SO_NODE_ADD_FIELD(clippingSide, (BACK));
  SO_NODE_ADD_FIELD(clipping, (FALSE));

  // FIXME: implement proper support for alternateRep field. 20041008 mortene.
  SO_NODE_ADD_FIELD(alternateRep, (NULL));
}
开发者ID:Alexpux,项目名称:SIMVoleon,代码行数:34,代码来源:OrthoSlice.cpp

示例6: SO_NODE_CONSTRUCTOR

SoXipMarkerSet::SoXipMarkerSet()
{
	SO_NODE_CONSTRUCTOR( SoXipMarkerSet );

	SO_NODE_DEFINE_ENUM_MARKER_VALUES( markerType );
	SO_NODE_SET_SF_ENUM_TYPE( marker, markerType );	
	SO_NODE_ADD_FIELD( marker, (0) );

	mCoord = new SoCoordinate3;
	if( mCoord )
		mCoord->ref();

	mFaceSet = new SoFaceSet;
	if( mFaceSet ) 
		mFaceSet->ref();

	mTranslation = new SoTranslation;
	if( mTranslation )
		mTranslation->ref();

	mScale = new SoScale;
	if( mScale ) 
		mScale->ref();

	mRotation = new SoRotation;
	if( mRotation ) 
		mRotation->ref();
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:28,代码来源:SoXipMarkerSet.cpp

示例7: SO_NODE_CONSTRUCTOR

SoV1WrapperKit::SoV1WrapperKit()
//
////////////////////////////////////////////////////////////////////////
{
    SO_NODE_CONSTRUCTOR(SoV1WrapperKit);

    if(SO_NODE_IS_FIRST_INSTANCE() ) {

    // Initialize children catalog and add entries to it
    // These are the macros you use to make a catalog.
    // Use ...INHERIT_CATALOG once, and put it first.
    // Then, use combinations of ...ADD_CATALOG_ENTRY 
    // and ...ADD_CATALOG_LIST_ENTRY.  See SoSubKit.h for more info
    // on syntax of these macros.
    SO_V1_SUBKIT_INHERIT_CATALOG(SoV1WrapperKit, SoV1GroupKit );
    SO_V1_SUBKIT_ADD_CATALOG_ENTRY("contents", SoSeparator,
				    "topSeparator", "childList", TRUE );

    }

    
    

    createNodekitPartsList();
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:25,代码来源:SoV1WrapperKit.cpp

示例8: SO_NODE_CONSTRUCTOR

SoXipGetCameraProperties::SoXipGetCameraProperties() {
	SO_NODE_CONSTRUCTOR(SoXipGetCameraProperties);

    SO_NODE_ADD_FIELD(camPos, (SbVec3f(0.0,0.0,0.0)));
	SO_NODE_ADD_FIELD(camDir, (SbVec3f(0.0,0.0,0.0)));
	SO_NODE_ADD_FIELD(viewport, (SbVec4f(0.0,0.0,0.0,0.0)));
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:7,代码来源:SoXipGetCameraProperties.cpp

示例9: SO_NODE_CONSTRUCTOR

SoXipMenuItem::SoXipMenuItem()
{
	SO_NODE_CONSTRUCTOR( SoXipMenuItem );	

	SO_XIP_KIT_ADD_TYPE_ENTRY( mVertices, SoVertexProperty, mSeparator );
	SO_XIP_KIT_ADD_TYPE_ENTRY( mFaces, SoIndexedFaceSet, mSeparator );

	SO_XIP_KIT_ADD_ENTRY( mIconOffset, SoTranslation, mSeparator );
	SO_XIP_KIT_ADD_ENTRY( mIconSwitch, SoSwitch, mSeparator );
	SO_XIP_KIT_ADD_ENTRY( mIconSeparator, SoSeparator, mIconSwitch );
	SO_XIP_KIT_ADD_ENTRY( mIconComplexity, SoComplexity, mIconSeparator );
	SO_XIP_KIT_ADD_TYPE_ENTRY( mIconTexture, SoXipIcon, mIconSeparator );
	SO_XIP_KIT_ADD_ENTRY( mIconTextCoords, SoTextureCoordinate2, mIconSeparator );
	SO_XIP_KIT_ADD_ENTRY( mIconCoords, SoVertexProperty, mIconSeparator );
	SO_XIP_KIT_ADD_ENTRY( mIconFaces, SoFaceSet, mIconSeparator );

	SO_XIP_KIT_ADD_ENTRY( mTextSeparator, SoSeparator, mSeparator );
	SO_XIP_KIT_ADD_ENTRY( mTextOffset, SoTranslation, mTextSeparator );
	SO_XIP_KIT_ADD_ENTRY( mTextMaterial, SoMaterial, mTextSeparator );
	SO_XIP_KIT_ADD_ENTRY( mText, SoXipText2, mTextSeparator );
	
	// Set the vertices for the item background
	mVertices->materialBinding.setValue( SoVertexProperty::PER_VERTEX_INDEXED );
	mVertices->orderedRGBA.setValues( 0, 9, s_defaultColors );
	mVertices->vertex.setValues( 0, 9, s_vertexCoords );

	// Set the face indices of the item background
	mFaces->coordIndex.setValues( 0, 32, s_faceIndices );	

	// Set the complexity of the icon texture to high
	mIconComplexity->set( "textureQuality 1" );

	((SoTextureCoordinate2 *) mIconTextCoords)->point.setValues( 0, 4, s_iconTextCoords );
	((SoVertexProperty*) mIconCoords)->vertex.setValues( 0, 4, s_iconCoords );
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:35,代码来源:SoXipMenuItem.cpp

示例10: SO_NODE_CONSTRUCTOR

SoV1NurbsCurveKit::SoV1NurbsCurveKit()
//
////////////////////////////////////////////////////////////////////////
{
    SO_NODE_CONSTRUCTOR(SoV1NurbsCurveKit);

    if(SO_NODE_IS_FIRST_INSTANCE() ) {

    // Initialize children catalog and add entries to it
    // These are the macros you use to make a catalog.
    // Use ...INHERIT_CATALOG once, and put it first.
    // Then, use combinations of ...ADD_CATALOG_ENTRY 
    // and ...ADD_CATALOG_LIST_ENTRY.  See SoSubKit.h for more info
    // on syntax of these macros.
    SO_V1_SUBKIT_INHERIT_CATALOG(SoV1NurbsCurveKit, SoV1ShapeKit );
    SO_V1_SUBKIT_ADD_CATALOG_ENTRY("coordinate3", SoCoordinate3,
				    "topSeparator", "shape", TRUE );
    SO_V1_SUBKIT_ADD_CATALOG_ENTRY("coordinate4", SoCoordinate4,
				    "topSeparator", "shape", TRUE );
    SO_V1_SUBKIT_ADD_CATALOG_ENTRY("textureCoordinate2", SoTextureCoordinate2,
				    "topSeparator", "shape", TRUE );
    SO_V1_SUBKIT_CHANGE_ENTRY_TYPE("shape", SoNurbsCurve, SoNurbsCurve );

    }

    
    

    createNodekitPartsList();
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:30,代码来源:SoV1NurbCurvKit.cpp

示例11: PRIVATE

/*!
  Constructor.
*/
SoSceneTextureCubeMap::SoSceneTextureCubeMap(void)
{
  PRIVATE(this) = new SoSceneTextureCubeMapP(this);

  SO_NODE_CONSTRUCTOR(SoSceneTextureCubeMap);

  SO_NODE_ADD_FIELD(size, (256, 256));
  SO_NODE_ADD_FIELD(scene, (NULL));
  SO_NODE_ADD_FIELD(backgroundColor, (0.0f, 0.0f, 0.0f));
  SO_NODE_ADD_FIELD(transparencyFunction, (NONE));

  SO_NODE_ADD_FIELD(wrapS, (REPEAT));
  SO_NODE_ADD_FIELD(wrapT, (REPEAT));
  SO_NODE_ADD_FIELD(wrapR, (REPEAT));
  SO_NODE_ADD_FIELD(model, (MODULATE));
  SO_NODE_ADD_FIELD(blendColor, (0.0f, 0.0f, 0.0f));

  SO_NODE_DEFINE_ENUM_VALUE(Wrap, REPEAT);
  SO_NODE_DEFINE_ENUM_VALUE(Wrap, CLAMP);

  SO_NODE_SET_SF_ENUM_TYPE(wrapS, Wrap);
  SO_NODE_SET_SF_ENUM_TYPE(wrapT, Wrap);
  SO_NODE_SET_SF_ENUM_TYPE(wrapR, Wrap);

  SO_NODE_DEFINE_ENUM_VALUE(Model, MODULATE);
  SO_NODE_DEFINE_ENUM_VALUE(Model, DECAL);
  SO_NODE_DEFINE_ENUM_VALUE(Model, BLEND);
  SO_NODE_DEFINE_ENUM_VALUE(Model, REPLACE);
  SO_NODE_SET_SF_ENUM_TYPE(model, Model);

  SO_NODE_DEFINE_ENUM_VALUE(TransparencyFunction, NONE);
  SO_NODE_DEFINE_ENUM_VALUE(TransparencyFunction, ALPHA_BLEND);
  SO_NODE_DEFINE_ENUM_VALUE(TransparencyFunction, ALPHA_TEST);
  SO_NODE_SET_SF_ENUM_TYPE(transparencyFunction, TransparencyFunction);
}
开发者ID:Alexpux,项目名称:Coin3D,代码行数:38,代码来源:SoSceneTextureCubeMap.cpp

示例12: SO_NODE_CONSTRUCTOR

SoXipOverlayManips::SoXipOverlayManips()
{
	SO_NODE_CONSTRUCTOR( SoXipOverlayManips );

	SO_NODE_ADD_FIELD( numNodesUpToContainer, (2) );
	SO_NODE_ADD_FIELD( multipleSelection, (FALSE) );
	SO_NODE_ADD_FIELD( enableSelection,	  (TRUE)  );

	// Main separator
	SO_XIP_KIT_ADD_ENTRY( mTopSeparator, SoSeparator, this );

	// Manipulators
	SO_XIP_KIT_ADD_ENTRY( mHandlerManip, SoXipOverlayHandlerManip, this );
	SO_XIP_KIT_ADD_ENTRY( mTransformBox, SoXipOverlayTransformBoxManip, this );
	SO_XIP_KIT_ADD_ENTRY( mSelectionManip, SoXipOverlaySelectionManip, this );
	SO_XIP_KIT_ADD_ENTRY( mTranslationManip, SoXipOverlayTranslationManip, this );
	SO_XIP_KIT_ADD_ENTRY( mSelectionFrame, SoXipOverlaySelectionFrame, this );

	((SoXipOverlayManipBase *) mHandlerManip)->numNodesUpToContainer.connectFrom( &numNodesUpToContainer );
	((SoXipOverlayManipBase *) mHandlerManip)->on.connectFrom( &enableSelection );
	((SoXipOverlayManipBase *) mSelectionManip)->numNodesUpToContainer.connectFrom( &numNodesUpToContainer );
    ((SoXipOverlayManipBase *) mSelectionManip)->on.connectFrom( &enableSelection );
	((SoXipOverlayManipBase *) mSelectionFrame)->numNodesUpToContainer.connectFrom( &numNodesUpToContainer );
	((SoXipOverlayManipBase *) mSelectionFrame)->on.connectFrom( &multipleSelection );
	((SoXipOverlayManipBase *) mTransformBox)->numNodesUpToContainer.connectFrom( &numNodesUpToContainer );
	((SoXipOverlayManipBase *) mTransformBox)->on.connectFrom( &enableSelection );
	((SoXipOverlayManipBase *) mTranslationManip)->numNodesUpToContainer.connectFrom( &numNodesUpToContainer );
	((SoXipOverlayManipBase *) mTranslationManip)->on.connectFrom( &enableSelection ); 
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:29,代码来源:SoXipOverlayManips.cpp

示例13: SO_NODE_CONSTRUCTOR

//!  Constructor
SoUMDViewerTrigger::SoUMDViewerTrigger()
{
    // Execute inventor internal stuff for node construction.
    SO_NODE_CONSTRUCTOR(SoUMDViewerTrigger);

    //SO_NODE_ADD_FIELD(ViewerNameFld, ("UndefindedName"));
    SO_NODE_ADD_FIELD(StatusFld, ("Ready"));
    //SO_NODE_ADD_FIELD(PongFld, ("Ready"));
    //SO_NODE_ADD_FIELD(PositionFld, (0,0,0));
    //SO_NODE_ADD_FIELD(OrientationFld, (0,0,0,0));
    //SO_NODE_ADD_FIELD(ForceRedrawFld, ());


    timerSensor = new SoTimerSensor((SoSensorCB*)SoUMDViewerTrigger::timerEvent, this);
    timerSensor->setInterval(SbTime(1.0/50.0));
    //timerSensor->setInterval(SbTime(1.0/1.0)); //!!!!ACHTUNG NUR ZUM VERLANGSAMEN FÜR EUROVISPAPER
    timerSensor->unschedule();

    currentlyLeft = false;
    frameRendered = true;


    // Create a sensor calling nodeChangedCB if any field changes.
    //_nodeSensor = new SoNodeSensor((SoSensorCB*)SoUMDViewerTrigger::_nodeChangedCB, this);
    //_nodeSensor->attach(this);

    // Set priority of sensor. Priority 0 forces direct call which is needed for correct field detection.
    //_nodeSensor->setPriority(0);

}
开发者ID:nmhansson,项目名称:communitymodules,代码行数:31,代码来源:SoUMDViewerTrigger.cpp

示例14: SO_NODE_CONSTRUCTOR

SoXipMenuItemSeparator::SoXipMenuItemSeparator()
{
	SO_NODE_CONSTRUCTOR( SoXipMenuItemSeparator );

	SO_XIP_KIT_ADD_ENTRY( mFaceSeparator,      SoSeparator, mSeparator );
	SO_XIP_KIT_ADD_TYPE_ENTRY( mVertices, SoVertexProperty, mFaceSeparator );
	SO_XIP_KIT_ADD_TYPE_ENTRY(    mFaces, SoIndexedFaceSet, mFaceSeparator );

	SO_XIP_KIT_ADD_ENTRY(   mLineSeparator,   SoSeparator, mSeparator );
	SO_XIP_KIT_ADD_ENTRY(    mLineMaterial,    SoMaterial, mLineSeparator );
	SO_XIP_KIT_ADD_ENTRY(       mLineStyle,   SoDrawStyle, mLineSeparator );
	SO_XIP_KIT_ADD_TYPE_ENTRY( mLineCoords, SoCoordinate3, mLineSeparator );
	SO_XIP_KIT_ADD_ENTRY(         mLineSet,     SoLineSet, mLineSeparator );

	mVertices->materialBinding.setValue( SoVertexProperty::PER_VERTEX_INDEXED );
	mVertices->vertex.setNum(4);
	mVertices->vertex.setValues( 0, 4, s_faceCoords );
	mVertices->orderedRGBA.setValues( 0, 4, s_vertexColors );
	
	mFaces->coordIndex.setValues( 0, 8, s_faceIndices );
	mLineCoords->point.setValues( 0, 2, s_lineCoords );

	mLineMaterial->set( "diffuseColor 0.5 0.5 0.5" );
	mLineStyle->set( "lineWidth 1" );
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:25,代码来源:SoXipMenuItemSeparator.cpp

示例15: SO_NODE_CONSTRUCTOR

SoV2Text3::SoV2Text3()
//
////////////////////////////////////////////////////////////////////////
{
    SO_NODE_CONSTRUCTOR(SoV2Text3);

    SO_NODE_ADD_FIELD(string,	(""));
    SO_NODE_ADD_FIELD(spacing,	(1.0));
    SO_NODE_ADD_FIELD(justification,	(LEFT));
    SO_NODE_ADD_FIELD(parts,		(FRONT));

    // Set up static info for enumerated type field
    SO_NODE_DEFINE_ENUM_VALUE(Justification,	LEFT);
    SO_NODE_DEFINE_ENUM_VALUE(Justification,	RIGHT);
    SO_NODE_DEFINE_ENUM_VALUE(Justification,	CENTER);

    // Set up static info for enumerated type field
    SO_NODE_DEFINE_ENUM_VALUE(Part, SIDES);
    SO_NODE_DEFINE_ENUM_VALUE(Part, FRONT);
    SO_NODE_DEFINE_ENUM_VALUE(Part, BACK);
    SO_NODE_DEFINE_ENUM_VALUE(Part, ALL);

    // Set up info in enumerated type field
    SO_NODE_SET_SF_ENUM_TYPE(justification, Justification);
    SO_NODE_SET_SF_ENUM_TYPE(parts, Part);
    
    isBuiltIn = TRUE;
}
开发者ID:OpenXIP,项目名称:xip-libraries,代码行数:28,代码来源:SoV2Text3.cpp


注:本文中的SO_NODE_CONSTRUCTOR函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。