本文整理汇总了C++中SO_NODE_ADD_FIELD函数的典型用法代码示例。如果您正苦于以下问题:C++ SO_NODE_ADD_FIELD函数的具体用法?C++ SO_NODE_ADD_FIELD怎么用?C++ SO_NODE_ADD_FIELD使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SO_NODE_ADD_FIELD函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SO_NODE_CONSTRUCTOR
/**
* Constructor.
*/
SoXipBindTextures::SoXipBindTextures()
{
SO_NODE_CONSTRUCTOR(SoXipBindTextures);
SO_NODE_DEFINE_ENUM_VALUE(TextureDimension, TEXTURE_1D);
SO_NODE_DEFINE_ENUM_VALUE(TextureDimension, TEXTURE_2D);
SO_NODE_DEFINE_ENUM_VALUE(TextureDimension, TEXTURE_3D);
SO_NODE_SET_SF_ENUM_TYPE(textureDimension, TextureDimension);
// add input fields
SO_NODE_ADD_FIELD(textureDimension, (TEXTURE_2D));
SO_NODE_ADD_FIELD(attachmentHandles, (0));
// add output fields
SO_NODE_ADD_FIELD(texture0Output, (-1));
SO_NODE_ADD_FIELD(texture1Output, (-1));
SO_NODE_ADD_FIELD(texture2Output, (-1));
SO_NODE_ADD_FIELD(texture3Output, (-1));
SO_NODE_ADD_FIELD(texture4Output, (-1));
SO_NODE_ADD_FIELD(texture5Output, (-1));
SO_NODE_ADD_FIELD(texture6Output, (-1));
SO_NODE_ADD_FIELD(texture7Output, (-1));
//attachmentHandles.deleteValues(0);
mNumTextures = attachmentHandles.getNum();
for (int i = 0; i < 16; i++) {
mTexHandles[i] = 0;
mTexUnits[i] = 0;
}
mNodeId = 0;
mNeedsSync = true;
}
示例2: SO_NODE_CONSTRUCTOR
SoXipBlendFunc::SoXipBlendFunc()
{
SO_NODE_CONSTRUCTOR(SoXipBlendFunc);
SO_NODE_ADD_FIELD(enableBlending, (true));
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, ZERO);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, ONE);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, SRC_COLOR);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, DST_COLOR);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, SRC_ALPHA);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, DST_ALPHA);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, ONE_MINUS_SRC_COLOR);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, ONE_MINUS_DST_COLOR);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, ONE_MINUS_SRC_ALPHA);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, ONE_MINUS_DST_ALPHA);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, CONSTANT_COLOR);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, CONSTANT_ALPHA);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, ONE_MINUS_CONSTANT_COLOR);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, ONE_MINUS_CONSTANT_ALPHA);
SO_NODE_DEFINE_ENUM_VALUE(BlendFactor, SRC_ALPHA_SATURATE);
SO_NODE_SET_SF_ENUM_TYPE(srcFunc, BlendFactor);
SO_NODE_SET_SF_ENUM_TYPE(dstFunc, BlendFactor);
SO_NODE_ADD_FIELD(srcFunc, (SRC_ALPHA));
SO_NODE_ADD_FIELD(dstFunc, (ONE_MINUS_SRC_ALPHA));
}
示例3: 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 );
}
示例4: SO_NODE_INTERNAL_CONSTRUCTOR
/*!
Constructor.
*/
SoShaderParameter::SoShaderParameter(void)
{
SO_NODE_INTERNAL_CONSTRUCTOR(SoShaderParameter);
SO_NODE_ADD_FIELD(name, (""));
SO_NODE_ADD_FIELD(identifier, (0));
}
示例5: PRIVATE
SoVRMLShape::SoVRMLShape(void)
{
PRIVATE(this) = new SoVRMLShapeP;
SO_VRMLNODE_INTERNAL_CONSTRUCTOR(SoVRMLShape);
SO_VRMLNODE_ADD_EXPOSED_FIELD(appearance, (NULL));
SO_VRMLNODE_ADD_EXPOSED_FIELD(geometry, (NULL));
SO_NODE_ADD_FIELD(renderCaching, (AUTO));
SO_NODE_ADD_FIELD(boundingBoxCaching, (AUTO));
SO_NODE_DEFINE_ENUM_VALUE(CacheEnabled, ON);
SO_NODE_DEFINE_ENUM_VALUE(CacheEnabled, OFF);
SO_NODE_DEFINE_ENUM_VALUE(CacheEnabled, AUTO);
SO_NODE_SET_SF_ENUM_TYPE(renderCaching, CacheEnabled);
SO_NODE_SET_SF_ENUM_TYPE(boundingBoxCaching, CacheEnabled);
// supply a NULL-pointer as parent, since notifications will be
// handled by the fields that actually contain the node(s)
PRIVATE(this)->childlist = new SoChildList(NULL);
PRIVATE(this)->childlistvalid = FALSE;
PRIVATE(this)->cachelist = NULL;
}
示例6: 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;
}
示例7: PRIVATE
/*!
Constructor.
*/
SoBlinker::SoBlinker(void)
{
PRIVATE(this) = new SoBlinkerP(this);
PRIVATE(this)->calculator = new SoCalculator;
PRIVATE(this)->calculator->ref();
PRIVATE(this)->calculator->a.connectFrom(&this->on);
PRIVATE(this)->calculator->b.connectFrom(&this->speed);
PRIVATE(this)->calculator->expression = "oa = ((b > 0) && (a != 0)) ? 1.0 : 0.0;";
PRIVATE(this)->counter = new SoTimeCounter;
PRIVATE(this)->counter->ref();
PRIVATE(this)->counter->min = SO_SWITCH_NONE;
PRIVATE(this)->counter->max = SO_SWITCH_NONE;
PRIVATE(this)->counter->frequency.connectFrom(&this->speed);
PRIVATE(this)->counter->on.connectFrom(&PRIVATE(this)->calculator->oa);
PRIVATE(this)->whichChildSensor =
new SoOneShotSensor(SoBlinkerP::whichChildCB, PRIVATE(this));
PRIVATE(this)->whichChildSensor->setPriority(1);
PRIVATE(this)->whichvalue = SO_SWITCH_NONE;
SO_NODE_INTERNAL_CONSTRUCTOR(SoBlinker);
SO_NODE_ADD_FIELD(speed, (1));
SO_NODE_ADD_FIELD(on, (TRUE));
this->whichChild.connectFrom(&PRIVATE(this)->counter->output, TRUE);
}
示例8: SO_NODE_INTERNAL_CONSTRUCTOR
/*!
Constructor.
*/
SoShuttle::SoShuttle(void)
{
SO_NODE_INTERNAL_CONSTRUCTOR(SoShuttle);
SO_NODE_ADD_FIELD(translation0, (SbVec3f(0.0f, 0.0f, 0.0f)));
SO_NODE_ADD_FIELD(translation1, (SbVec3f(0.0f, 0.0f, 0.0f)));
SO_NODE_ADD_FIELD(speed, (1.0f));
SO_NODE_ADD_FIELD(on, (TRUE));
this->interpolator = new SoInterpolateVec3f;
this->interpolator->ref();
this->calculator = new SoCalculator;
this->calculator->ref();
this->timer = new SoElapsedTime;
this->timer->ref();
this->calculator->expression = "oa = (1.0 - cos(a*b*2*M_PI)) * 0.5";
this->calculator->a.connectFrom(&this->timer->timeOut);
this->timer->on.connectFrom(&this->on);
this->calculator->b.connectFrom(&this->speed);
this->interpolator->input0.connectFrom(&this->translation0);
this->interpolator->input1.connectFrom(&this->translation1);
this->interpolator->alpha.connectFrom(&this->calculator->oa);
this->translation.connectFrom(&this->interpolator->output, TRUE);
}
示例9: SO_NODE_CONSTRUCTOR
SoXipIcon::SoXipIcon()
{
SO_NODE_CONSTRUCTOR( SoXipIcon );
SO_NODE_DEFINE_ENUM_VALUE( IconType, IC_NONE );
SO_NODE_DEFINE_ENUM_VALUE( IconType, IC_COPY );
SO_NODE_DEFINE_ENUM_VALUE( IconType, IC_CUT );
SO_NODE_DEFINE_ENUM_VALUE( IconType, IC_PASTE );
SO_NODE_SET_SF_ENUM_TYPE( icon, IconType );
SO_NODE_ADD_FIELD( icon, (IC_NONE) );
SO_NODE_ADD_FIELD( isTransparent, (FALSE) );
SO_NODE_ADD_FIELD( transparentColor, (0, 0, 0) );
mTexture = new SoTexture2;
mTexture->ref();
mFieldSensors[0] = new SoFieldSensor( fieldSensorsCB, this );
mFieldSensors[0]->attach( &icon );
mFieldSensors[1] = new SoFieldSensor( fieldSensorsCB, this );
mFieldSensors[1]->attach( &isTransparent );
mFieldSensors[2] = new SoFieldSensor( fieldSensorsCB, this );
mFieldSensors[2]->attach( &transparentColor );
}
示例10: 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)));
}
示例11: SO_NODE_CONSTRUCTOR
SoXipDrawClipPlane::SoXipDrawClipPlane() {
SO_NODE_CONSTRUCTOR(SoXipDrawClipPlane);
SO_NODE_ADD_FIELD(plane, (SbPlane(SbVec3f(0, 0, 1), 0)));
SO_NODE_ADD_FIELD(on, (TRUE));
SO_NODE_ADD_FIELD(boundingBox, (SbMatrix::identity()));
}
示例12: SO_NODE_CONSTRUCTOR
SoXipMenuItemBase::SoXipMenuItemBase()
{
SO_NODE_CONSTRUCTOR( SoXipMenuItemBase );
SO_XIP_KIT_ADD_TYPE_ENTRY( mSeparator, SoSeparator, this );
SO_XIP_KIT_ADD_TYPE_ENTRY( mSubMenuSwitch, SoSwitch, mSeparator );
SO_NODE_DEFINE_ENUM_VALUE( IconType, IC_NONE );
SO_NODE_DEFINE_ENUM_VALUE( IconType, IC_COPY );
SO_NODE_DEFINE_ENUM_VALUE( IconType, IC_CUT );
SO_NODE_DEFINE_ENUM_VALUE( IconType, IC_PASTE );
SO_NODE_SET_SF_ENUM_TYPE( icon, IconType );
SO_NODE_ADD_FIELD( focused, (FALSE) );
SO_NODE_ADD_FIELD( enabled, (TRUE) );
SO_NODE_ADD_FIELD( caption, ("") );
SO_NODE_ADD_FIELD( icon, (IC_NONE) );
SoField* fields[] = { &focused, &enabled, &caption, &icon };
int numFieldSensors = 4;
for( int i = 0; i < numFieldSensors; ++ i )
{
mFieldSensors[i] = new SoFieldSensor( fieldSensorCB, this );
mFieldSensors[i]->attach( fields[i] );
}
}
示例13: SO_NODE_CONSTRUCTOR
TransmissivityATMParameters::TransmissivityATMParameters( )
{
SO_NODE_CONSTRUCTOR( TransmissivityATMParameters );
SO_NODE_ADD_FIELD( atm1, ( 0.29544 ) );
SO_NODE_ADD_FIELD( atm2, ( 15.22128 ) );
SO_NODE_ADD_FIELD( atm3, ( -1.8598 ) );
SO_NODE_ADD_FIELD( atm4, ( 0.15182 ) );
}
示例14: SO_NODE_INTERNAL_CONSTRUCTOR
/*!
Constructor.
*/
SoTextureCoordinateObject::SoTextureCoordinateObject()
{
SO_NODE_INTERNAL_CONSTRUCTOR(SoTextureCoordinateObject);
SO_NODE_ADD_FIELD(factorS, (1.0f, 0.0f, 0.0f, 0.0f));
SO_NODE_ADD_FIELD(factorT, (0.0f, 1.0f, 0.0f, 0.0f));
SO_NODE_ADD_FIELD(factorR, (0.0f, 0.0f, 1.0f, 0.0f));
SO_NODE_ADD_FIELD(factorQ, (0.0f, 0.0f, 0.0f, 1.0f));
}
示例15: SO_NODE_CONSTRUCTOR
SoXipDropShadowStyle::SoXipDropShadowStyle()
{
SO_NODE_CONSTRUCTOR( SoXipDropShadowStyle );
SO_NODE_ADD_FIELD( on, (FALSE) );
SO_NODE_ADD_FIELD( color, (0, 0, 0) );
SO_NODE_ADD_FIELD( transparency, (0) );
SO_NODE_ADD_FIELD( pixelOffset, (1, -1) );
}