本文整理汇总了C++中MaterialChunkUnrecPtr::setShininess方法的典型用法代码示例。如果您正苦于以下问题:C++ MaterialChunkUnrecPtr::setShininess方法的具体用法?C++ MaterialChunkUnrecPtr::setShininess怎么用?C++ MaterialChunkUnrecPtr::setShininess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaterialChunkUnrecPtr
的用法示例。
在下文中一共展示了MaterialChunkUnrecPtr::setShininess方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
MaterialUnrecPtr Graphics3DExtrude::createDefaultMaterial(void)
{
MaterialChunkUnrecPtr TheMaterialChunk = MaterialChunk::create();
TheMaterialChunk->setAmbient(Color4f(0.4,0.4,0.4,1.0));
TheMaterialChunk->setDiffuse(Color4f(0.8,0.8,0.8,1.0));
TheMaterialChunk->setSpecular(Color4f(0.85,0.85,0.85,1.0));
TheMaterialChunk->setEmission(Color4f(0.0,0.0,0.0,1.0));
TheMaterialChunk->setShininess(50.0);
TheMaterialChunk->setLit(true);
TheMaterialChunk->setColorMaterial(true);
ChunkMaterialUnrecPtr TheMaterial = ChunkMaterial::create();
TheMaterial->addChunk(TheMaterialChunk);
return TheMaterial;
}
示例2: initGeometries
void VTKPolyDataMapper::initGeometries(void)
{
NodeUnrecPtr pRoot = Node::create();
pRoot->setCore(Group::create());
setRoot(pRoot);
for(UInt32 i = 0; i < 4; ++i)
{
GeometryUnrecPtr pGeo = Geometry::create();
ChunkMaterialUnrecPtr pMat = ChunkMaterial::create();
MaterialChunkUnrecPtr pMatChunk = MaterialChunk::create();
GeoPnt3fPropertyUnrecPtr pPoints = GeoPnt3fProperty ::create();
GeoUInt32PropertyUnrecPtr pLengths = GeoUInt32Property ::create();
GeoUInt8PropertyUnrecPtr pTypes = GeoUInt8Property ::create();
GeoColor4fPropertyUnrecPtr pColors = GeoColor4fProperty::create();
GeoVec3fPropertyUnrecPtr pNormals = GeoVec3fProperty ::create();
if(i < 2)
{
pMatChunk->setLit(false);
}
pMatChunk->setDiffuse (OSG::Color4f(1.0, 1.0, 1.0, 1.0));
pMatChunk->setSpecular (OSG::Color4f(0.0, 0.0, 0.0, 1.0));
pMatChunk->setShininess(10.0f);
pMat->addChunk(pMatChunk);
TwoSidedLightingChunkUnrecPtr pTSLChunk =
TwoSidedLightingChunk::create();
pMat->addChunk(pTSLChunk);
pGeo->setDlistCache(false );
pGeo->setMaterial (pMat );
pGeo->setPositions (pPoints );
pGeo->setLengths (pLengths);
pGeo->setTypes (pTypes );
pGeo->setColors (pColors );
if(i > 1)
{
pGeo->setNormals(pNormals);
}
OSG::NodeUnrecPtr pGeoRoot = OSG::Node::create();
pGeoRoot->setCore (pGeo);
pGeoRoot->setTravMask(0 );
pRoot->addChild(pGeoRoot);
this->pushToGeometries (pGeo );
this->pushToMaterials (pMat );
this->pushToMaterialChunks(pMatChunk);
this->pushToPositions (pPoints );
this->pushToLength (pLengths );
this->pushToTypes (pTypes );
this->pushToColors (pColors );
this->pushToNormals (pNormals );
this->pushToGeoRoots (pGeoRoot );
}
}