Browse Source

Minor documentation fixes.

It's not needed to have empty `()` after class name in this type
of expressions:

    (new Object())
        ->setFoo(a)
        ->setBar(b);
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
82ca09a4ed
  1. 2
      doc/debug-tools.dox
  2. 4
      doc/platform.dox
  3. 5
      src/DebugTools/ForceRenderer.h
  4. 4
      src/DebugTools/ObjectRenderer.h
  5. 4
      src/DebugTools/ShapeRenderer.h

2
doc/debug-tools.dox

@ -63,7 +63,7 @@ SceneGraph::DrawableGroup3D debugDrawables;
// Create renderer options which will be referenced later by "my" resource key // Create renderer options which will be referenced later by "my" resource key
DebugTools::ResourceManager::instance()->set("my", DebugTools::ResourceManager::instance()->set("my",
(new DebugTools::ObjectRendererOptions())->setSize(0.3f)); (new DebugTools::ObjectRendererOptions)->setSize(0.3f));
// Create debug renderer for given object, use "my" options for it. The // Create debug renderer for given object, use "my" options for it. The
// renderer is automatically added to the object features and also to // renderer is automatically added to the object features and also to

4
doc/platform.dox

@ -147,7 +147,7 @@ window size 800x600 pixels). If you want something else, you can pass
constructor. Using method chaining it can be done conveniently like this: constructor. Using method chaining it can be done conveniently like this:
@code @code
MyApplication::MyApplication(int& argc, char** argv): MyApplication::MyApplication(int& argc, char** argv):
Platform::GlutApplication(argc, argv, (new Configuration()) Platform::GlutApplication(argc, argv, (new Configuration)
->setTitle("My Application")->setSize({800, 600}) { ->setTitle("My Application")->setSize({800, 600}) {
// ... // ...
} }
@ -161,7 +161,7 @@ instead of Configuration instance and then specify it later with
MyApplication::MyApplication(int& argc, char** argv): Platform::GlutApplication(argc, argv, nullptr) { MyApplication::MyApplication(int& argc, char** argv): Platform::GlutApplication(argc, argv, nullptr) {
// ... // ...
createContext((new Configuration()) createContext((new Configuration)
->setTitle("My Application") ->setTitle("My Application")
->setSize(size)); ->setSize(size));

5
src/DebugTools/ForceRenderer.h

@ -90,9 +90,8 @@ See @ref debug-tools-renderers for more information.
Example code: Example code:
@code @code
// Create some options // Create some options
DebugTools::ResourceManager::instance()->set("my", (new DebugTools::ForceRendererOptions() DebugTools::ResourceManager::instance()->set("my", (new DebugTools::ForceRendererOptions)
->setScale(5.0f) ->setScale(5.0f)->setColor(Color3<>::fromHSV(120.0_degf, 1.0f, 0.7f)));
->setColor(Color3<>::fromHSV(120.0_degf, 1.0f, 0.7f)));
// Create debug renderer for given object, use "my" options for it // Create debug renderer for given object, use "my" options for it
Object3D* object; Object3D* object;

4
src/DebugTools/ObjectRenderer.h

@ -74,8 +74,8 @@ Visualizes object position, rotation and scale using colored axes. See
Example code: Example code:
@code @code
// Create some options // Create some options
DebugTools::ResourceManager::instance()->set("my", DebugTools::ResourceManager::instance()->set("my", (new DebugTools::ObjectRendererOptions)
(new DebugTools::ObjectRendererOptions())->setSize(0.3f)); ->setSize(0.3f));
// Create debug renderer for given object, use "my" options for it // Create debug renderer for given object, use "my" options for it
Object3D* object; Object3D* object;

4
src/DebugTools/ShapeRenderer.h

@ -104,8 +104,8 @@ Visualizes collision shapes using wireframe primitives. See
Example code: Example code:
@code @code
// Create some options // Create some options
DebugTools::ResourceManager::instance()->set("red", DebugTools::ResourceManager::instance()->set("red", (new DebugTools::ShapeRendererOptions)
(new DebugTools::ShapeRendererOptions())->setColor({1.0f, 0.0f, 0.0f})); ->setColor({1.0f, 0.0f, 0.0f}));
// Create debug renderer for given shape, use "red" options for it // Create debug renderer for given shape, use "red" options for it
Physics::ObjectShape2D* shape; Physics::ObjectShape2D* shape;

Loading…
Cancel
Save