Skip to content

Commit

Permalink
+ extend InventorBuilder to add an SoPolygonOffset node
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jul 30, 2016
1 parent 8fe7c94 commit 5c095de
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Base/Builder3D.cpp
Expand Up @@ -437,6 +437,16 @@ void InventorBuilder::addShapeHints(float crease)
<< Base::blanks(indent) << "}" << std::endl;
}

void InventorBuilder::addPolygonOffset(float factor, float units, const char* styles, bool on)
{
result << Base::blanks(indent) << "PolygonOffset {" << std::endl
<< Base::blanks(indent) << " factor " << factor << std::endl
<< Base::blanks(indent) << " units " << units << std::endl
<< Base::blanks(indent) << " styles " << styles << std::endl
<< Base::blanks(indent) << " on " << (on ? "TRUE" : "FALSE") << std::endl
<< Base::blanks(indent) << "}" << std::endl;
}

//**************************************************************************
// points handling

Expand Down
8 changes: 8 additions & 0 deletions src/Base/Builder3D.h
Expand Up @@ -228,6 +228,14 @@ class BaseExport InventorBuilder
* \param crease - the crease angle in radians
*/
void addShapeHints(float crease=0.0f);
/*!
* \brief Sets a polygon offset node.
* \param factor - Offset multiplication factor.
* \param units - Offset translation multiplication factor.
* \param styles - Can be FILLED, LINES or POINTS.
* \param on - Whether the offset is on or off.
*/
void addPolygonOffset(float factor=1.0f, float units=1.0f, const char* styles="FILLED", bool on=true);
//@}

/** @name Add coordinates */
Expand Down

0 comments on commit 5c095de

Please sign in to comment.