如何调整默认光源的亮度和方向?

  1. FAQ
  2. »
  3. Vectorization and Rendering Questions


您可以在绘图中添加平行光(distant light)。添加后,由于您的图形场景将包含非默认光源,因此可以禁用默认光照。

OdDbLightPtr pLight = OdDbLight::createObject();
pLight->setDatabaseDefaults(pDb);
pLight->setLightType(OdGiDrawable::kDistantLight);
pLight->setLightDirection(OdGeVector3d::kZAxis);
OdDbBlockTableRecord::cast(pDb->getActiveLayoutBTRId().openObject(OdDb::kForWrite))->appendOdDbEntity(pLight);