+ extend InventorBuilder to add an SoPolygonOffset node

This commit is contained in:
wmayer 2016-07-30 14:20:00 +02:00
parent 8fe7c94452
commit 5c095de599
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -228,6 +228,14 @@ public:
* \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 */