Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix doxygen comment, remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
iche033 committed May 11, 2023
1 parent 8383807 commit b4a27fa
Showing 6 changed files with 10 additions and 28 deletions.
2 changes: 0 additions & 2 deletions examples/projector/Main.cc
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@
#include <iostream>
#include <vector>


#include <gz/common/Console.hh>
#include <gz/rendering.hh>

@@ -210,7 +209,6 @@ int main(int _argc, char** _argv)
}
catch (...)
{
// std::cout << ex.what() << std::endl;
std::cerr << "Error starting up: " << engineName << std::endl;
}
}
12 changes: 6 additions & 6 deletions include/gz/rendering/Projector.hh
Original file line number Diff line number Diff line change
@@ -42,27 +42,27 @@ namespace gz
/// \brief Destructor
public: virtual ~Projector();

/// \brief Get the camera's far clipping plane distance
/// \brief Get the projector's far clipping plane distance
/// \return Far clipping plane distance
public: virtual double FarClipPlane() const = 0;

/// \brief Set the camera's far clipping plane distance
/// \brief Set the projector's far clipping plane distance
/// \param[in] _far Far clipping plane distance
public: virtual void SetFarClipPlane(double _far) = 0;

/// \brief Get the camera's near clipping plane distance
/// \brief Get the projector's near clipping plane distance
/// \return Near clipping plane distance
public: virtual double NearClipPlane() const = 0;

/// \brief Set the projector's near clipping plane distance
/// \param[in] _near Near clipping plane distance
public: virtual void SetNearClipPlane(double _near) = 0;

/// \brief Get the camera's horizontal field-of-view
/// \return Angle containing the camera's horizontal field-of-view
/// \brief Get the projector's horizontal field-of-view
/// \return Angle containing the projector's horizontal field-of-view
public: virtual math::Angle HFOV() const = 0;

/// \brief Set the camera's horizontal field-of-view
/// \brief Set the projector's horizontal field-of-view
/// \param[in] _hfov Desired horizontal field-of-view
public: virtual void SetHFOV(const math::Angle &_hfov) = 0;

1 change: 0 additions & 1 deletion include/gz/rendering/Scene.hh
Original file line number Diff line number Diff line change
@@ -43,7 +43,6 @@ namespace gz
//
class RenderEngine;
class SceneExt;
// static std::unordered_map<const Scene *, SceneExt *> g_sceneExtMap;

/// \class Scene Scene.hh gz/rendering/Scene.hh
/// \brief Manages a single scene-graph. This class updates scene-wide
3 changes: 3 additions & 0 deletions ogre2/src/Ogre2Material.cc
Original file line number Diff line number Diff line change
@@ -1535,6 +1535,9 @@ void Ogre2Material::SetFragmentShader(const std::string &_path)

auto mat = this->Material();
auto pass = mat->getTechnique(0u)->getPass(0);
Ogre::HlmsBlendblock block;
block.setBlendType(Ogre::SBT_TRANSPARENT_ALPHA);
pass->setBlendblock(block);
pass->setFragmentProgram(fragmentShader->getName());
mat->compile();
mat->load();
2 changes: 1 addition & 1 deletion ogre2/src/Ogre2Projector.cc
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ Ogre2Projector::~Ogre2Projector()
if (!this->scene->IsInitialized())
return;

for (auto &ogreCamIt : this->dataPtr->camerasWithListener)
for (const auto &ogreCamIt : this->dataPtr->camerasWithListener)
{
Ogre::IdString camName = ogreCamIt.second;
auto ogreCam = this->scene->OgreSceneManager()->findCameraNoThrow(camName);
18 changes: 0 additions & 18 deletions src/base/BaseScene.cc
Original file line number Diff line number Diff line change
@@ -1613,21 +1613,3 @@ void BaseScene::CreateMaterials()
material->SetReceiveShadows(true);
material->SetLightingEnabled(true);
}

/*
//////////////////////////////////////////////////
BaseSceneExt::BaseSceneExt(Scene *_scene)
{
this->scene = _scene;
}
//////////////////////////////////////////////////
ObjectPtr BaseScene::CreateExt(const std::string &_type)
{
BaseScene *baseScene = dynamic_cast<BaseScene *>(this->scene);
if (_type == "projector")
{
return std::dynamic_pointer_cast<Object>(baseScene->CreateProjector());
}
}
*/

0 comments on commit b4a27fa

Please sign in to comment.