Skip to content

Commit

Permalink
Add doxygen comment, fix codecheck/format
Browse files Browse the repository at this point in the history
Signed-off-by: Athena Z <[email protected]>
  • Loading branch information
athenaz2 committed Aug 16, 2024
1 parent 5bf2d70 commit 0bc87f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/plugins/minimal_scene/MinimalScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,8 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem)
texSizeStr >> texSize;
if (texSizeStr.fail())
{
gzerr << "Unable to set shadow <texture_size> to '" << texSizeStr.str()
gzerr << "Unable to set shadow <texture_size> to '"
<< texSizeStr.str()
<< "' using default texture size" << std::endl;
}
else
Expand All @@ -1511,13 +1512,14 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem)
if (!renderWindow->SetShadowTextureSize(
rendering::LightType::DIRECTIONAL, texSize))
{
gzerr << "Unable to set shadow <texture_size> to '" << texSizeStr.str()
gzerr << "Unable to set shadow <texture_size> to '"
<< texSizeStr.str()
<< "' using default texture size" << std::endl;
}
}
else
{
gzerr << "Setting shadow <texture_size> for light type ["
gzerr << "Setting shadow <texture_size> for light type ["
<< lightType << "] is not supported." << std::endl;
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/plugins/minimal_scene/MinimalScene.hh
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ namespace gz::gui::plugins
/// \brief True if sky is enabled;
public: bool skyEnable = false;

/// \brief Shadow texture size for directional light
public: unsigned int directionalLightTextureSize = 2048u;

/// \brief Horizontal FOV of the camera;
Expand Down Expand Up @@ -372,8 +373,8 @@ namespace gz::gui::plugins
public: void SetSkyEnabled(const bool &_sky);

/// \brief Set the shadow texture size for the given light type.
/// @param _lightType Light type that creates the shadow
/// @param _textureSize Shadow texture size
/// \param _lightType Light type that creates the shadow
/// \param _textureSize Shadow texture size
public: bool SetShadowTextureSize(rendering::LightType _lightType,
unsigned int _textureSize);

Expand Down

0 comments on commit 0bc87f8

Please sign in to comment.