本文整理汇总了C++中osgdb::Output::writeObject方法的典型用法代码示例。如果您正苦于以下问题:C++ Output::writeObject方法的具体用法?C++ Output::writeObject怎么用?C++ Output::writeObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osgdb::Output
的用法示例。
在下文中一共展示了Output::writeObject方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VolumeTile_writeLocalData
bool VolumeTile_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
const osgVolume::VolumeTile& volumeTile = static_cast<const osgVolume::VolumeTile&>(obj);
int prec = fw.precision();
fw.precision(15);
if (volumeTile.getLocator())
{
fw.writeObject(*volumeTile.getLocator());
}
if (volumeTile.getLayer())
{
fw.writeObject(*volumeTile.getLayer());
}
if (volumeTile.getVolumeTechnique())
{
fw.writeObject(*volumeTile.getVolumeTechnique());
}
fw.precision(prec);
return true;
}
示例2: ParticleEffect_writeLocalData
bool ParticleEffect_writeLocalData(const osg::Object& object, osgDB::Output& fw)
{
const osgParticle::ParticleEffect& effect = static_cast<const osgParticle::ParticleEffect&>(object);
fw.indent()<<"textFileName "<<fw.wrapString(effect.getTextureFileName())<<std::endl;
fw.indent()<<"position "<<effect.getPosition()<<std::endl;
fw.indent()<<"scale "<<effect.getScale()<<std::endl;
fw.indent()<<"intensity "<<effect.getIntensity()<<std::endl;
fw.indent()<<"startTime "<<effect.getStartTime()<<std::endl;
fw.indent()<<"emitterDuration "<<effect.getEmitterDuration()<<std::endl;
fw.indent()<<"particleDuration "<<effect.getParticleDuration()<<std::endl;
osgParticle::rangef rf = effect.getDefaultParticleTemplate().getSizeRange();
fw.indent() << "particleSizeRange " << rf.minimum << " " << rf.maximum << std::endl;
rf = effect.getDefaultParticleTemplate().getAlphaRange();
fw.indent() << "particleAlphaRange " << rf.minimum << " " << rf.maximum << std::endl;
osgParticle::rangev4 rv4 = effect.getDefaultParticleTemplate().getColorRange();
fw.indent() << "particleColorRange ";
fw << rv4.minimum.x() << " " << rv4.minimum.y() << " " << rv4.minimum.z() << " " << rv4.minimum.w() << " ";
fw << rv4.maximum.x() << " " << rv4.maximum.y() << " " << rv4.maximum.z() << " " << rv4.maximum.w() << std::endl;
fw.indent()<<"wind "<<effect.getWind()<<std::endl;
fw.indent()<<"useLocalParticleSystem ";
if (effect.getUseLocalParticleSystem()) fw<<"TRUE"<<std::endl;
else
{
fw<<"FALSE"<<std::endl;
fw.writeObject(*effect.getParticleSystem());
}
return true;
}
示例3: TransferFunctionProperty_writeLocalData
bool TransferFunctionProperty_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
const osgVolume::TransferFunctionProperty& tfp = static_cast<const osgVolume::TransferFunctionProperty&>(obj);
const osg::TransferFunction* tf = tfp.getTransferFunction();
if (tf) fw.writeObject(*tf);
return true;
}
示例4: BumpMapping_writeLocalData
bool BumpMapping_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
{
const osgFX::BumpMapping &myobj = static_cast<const osgFX::BumpMapping &>(obj);
fw.indent() << "lightNumber " << myobj.getLightNumber() << "\n";
fw.indent() << "diffuseUnit " << myobj.getDiffuseTextureUnit() << "\n";
fw.indent() << "normalMapUnit " << myobj.getNormalMapTextureUnit() << "\n";
if (myobj.getOverrideDiffuseTexture()) {
fw.writeObject(*myobj.getOverrideDiffuseTexture());
}
if (myobj.getOverrideNormalMapTexture()) {
fw.writeObject(*myobj.getOverrideNormalMapTexture());
}
return true;
}
示例5: ModularProgram_writeLocalData
bool ModularProgram_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
{
const osgParticle::ModularProgram &myobj = static_cast<const osgParticle::ModularProgram &>(obj);
for (int i=0; i<myobj.numOperators(); ++i) {
fw.writeObject(*myobj.getOperator(i));
}
return true;
}
示例6: ShadowedScene_writeLocalData
bool ShadowedScene_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
const osgShadow::ShadowedScene& ss = static_cast<const osgShadow::ShadowedScene &>(obj);
if (ss.getShadowTechnique())
{
fw.writeObject(*ss.getShadowTechnique());
}
return true;
}
示例7: DatabaseBuilder_writeLocalData
bool DatabaseBuilder_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
const vpb::DatabaseBuilder& db = static_cast<const vpb::DatabaseBuilder&>(obj);
if (db.getBuildOptions())
{
fw.writeObject(*db.getBuildOptions());
}
return true;
}
示例8: CompositeProperty_writeLocalData
bool CompositeProperty_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
const osgVolume::CompositeProperty& cp = static_cast<const osgVolume::CompositeProperty&>(obj);
for(unsigned int i=0; i<cp.getNumProperties(); ++i)
{
fw.writeObject(*cp.getProperty(i));
}
return true;
}
示例9: NodeCallback_writeLocalData
bool NodeCallback_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
{
const NodeCallback* nc = dynamic_cast<const NodeCallback*>(&obj);
if (!nc) return false;
NodeCallback* nnc = (NodeCallback*) nc;
if (nnc->getNestedCallback())
{
fw.writeObject(*(nnc->getNestedCallback()));
}
return true;
}
示例10: AnimationPathCallback_writeLocalData
bool AnimationPathCallback_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
{
const osg::AnimationPathCallback* apc = dynamic_cast<const osg::AnimationPathCallback*>(&obj);
if (!apc) return false;
fw.indent() <<"pivotPoint " <<apc->getPivotPoint()<<std::endl;
fw.indent() <<"timeOffset " <<apc->_timeOffset<<std::endl;
fw.indent() <<"timeMultiplier " <<apc->_timeMultiplier << std::endl;
if (apc->getAnimationPath())
{
fw.writeObject(*(apc->getAnimationPath()));
}
return true;
}
示例11: HeightFieldLayer_writeLocalData
bool HeightFieldLayer_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
const osgTerrain::HeightFieldLayer& layer = static_cast<const osgTerrain::HeightFieldLayer&>(obj);
if (!layer.getFileName().empty())
{
std::string str = osgTerrain::createCompoundSetNameAndFileName(layer.getName(), layer.getFileName());
fw.indent()<<"file "<< str << std::endl;
}
else
{
if (layer.getHeightField())
{
fw.writeObject(*layer.getHeightField());
}
}
return true;
}
示例12: ParticleProcessor_writeLocalData
bool ParticleProcessor_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
{
const osgParticle::ParticleProcessor &myobj = static_cast<const osgParticle::ParticleProcessor &>(obj);
if (myobj.getParticleSystem()) fw.writeObject(*myobj.getParticleSystem());
fw.indent() << "enabled ";
if (myobj.isEnabled())
fw << "TRUE" << std::endl;
else
fw << "FALSE" << std::endl;
fw.indent() << "referenceFrame ";
switch (myobj.getReferenceFrame())
{
case osgParticle::ParticleProcessor::ABSOLUTE_RF:
fw << "ABSOLUTE" << std::endl;
break;
case osgParticle::ParticleProcessor::RELATIVE_RF:
default:
fw << "RELATIVE" << std::endl;
}
fw.indent() << "endless ";
if (myobj.isEndless())
fw << "TRUE" << std::endl;
else
fw << "FALSE" << std::endl;
fw.indent() << "lifeTime " << myobj.getLifeTime() << std::endl;
fw.indent() << "startTime " << myobj.getStartTime() << std::endl;
fw.indent() << "currentTime " << myobj.getCurrentTime() << std::endl;
fw.indent() << "resetTime " << myobj.getResetTime() << std::endl;
return true;
}