本文整理汇总了C++中TextNode::addLength方法的典型用法代码示例。如果您正苦于以下问题:C++ TextNode::addLength方法的具体用法?C++ TextNode::addLength怎么用?C++ TextNode::addLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextNode
的用法示例。
在下文中一共展示了TextNode::addLength方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddSFFloat
void AddSFFloat(float value)
{
switch (GetCurrentNodeType()) {
case VRML_NODETYPE_ELEVATIONGRID_HEIGHT:
{
ElevationGridNode *elev = (ElevationGridNode *)GetCurrentNodeObject();
elev->addHeight(value);
}
break;
case VRML_NODETYPE_BACKGROUND_GROUNDANGLE:
{
BackgroundNode *bg = (BackgroundNode *)GetCurrentNodeObject();
bg->addGroundAngle(value);
}
break;
case VRML_NODETYPE_BACKGROUND_SKYANGLE:
{
BackgroundNode *bg = (BackgroundNode *)GetCurrentNodeObject();
bg->addSkyAngle(value);
}
break;
case VRML_NODETYPE_INTERPOLATOR_KEY:
switch (GetPrevNodeType()) {
case VRML_NODETYPE_COLORINTERPOLATOR:
{
ColorInterpolatorNode *colorInterp = (ColorInterpolatorNode *)GetCurrentNodeObject();
colorInterp->addKey(value);
}
break;
case VRML_NODETYPE_COORDINATEINTERPOLATOR:
{
CoordinateInterpolatorNode *coordInterp = (CoordinateInterpolatorNode *)GetCurrentNodeObject();
coordInterp->addKey(value);
}
break;
case VRML_NODETYPE_NORMALINTERPOLATOR:
{
NormalInterpolatorNode *normInterp = (NormalInterpolatorNode *)GetCurrentNodeObject();
normInterp->addKey(value);
}
break;
case VRML_NODETYPE_ORIENTATIONINTERPOLATOR:
{
OrientationInterpolatorNode *oriInterp = (OrientationInterpolatorNode *)GetCurrentNodeObject();
oriInterp->addKey(value);
}
break;
case VRML_NODETYPE_POSITIONINTERPOLATOR:
{
PositionInterpolatorNode *posInterp = (PositionInterpolatorNode *)GetCurrentNodeObject();
posInterp->addKey(value);
}
break;
case VRML_NODETYPE_SCALARINTERPOLATOR:
{
ScalarInterpolatorNode *scalarInterp = (ScalarInterpolatorNode *)GetCurrentNodeObject();
scalarInterp->addKey(value);
}
break;
}
break;
case VRML_NODETYPE_INTERPOLATOR_KEYVALUE:
switch (GetPrevNodeType()) {
case VRML_NODETYPE_SCALARINTERPOLATOR:
{
ScalarInterpolatorNode *scalarInterp = (ScalarInterpolatorNode *)GetCurrentNodeObject();
scalarInterp->addKeyValue(value);
}
break;
}
break;
case VRML_NODETYPE_LOD_RANGE:
{
((LodNode *)GetCurrentNodeObject())->addRange(value);
}
break;
case VRML_NODETYPE_NAVIGATIONINFO_AVATARSIZE:
{
NavigationInfoNode *navInfo = (NavigationInfoNode *)GetCurrentNodeObject();
navInfo->addAvatarSize(value);
}
break;
case VRML_NODETYPE_TEXT_LENGTH:
{
TextNode *text = (TextNode *)GetCurrentNodeObject();
text->addLength(value);
}
break;
}
}