Browse Source

DebugTools: support color alpha in ForceRenderer and ShapeRenderer.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
4000ef571b
  1. 6
      src/DebugTools/ForceRenderer.h
  2. 6
      src/DebugTools/ShapeRenderer.h

6
src/DebugTools/ForceRenderer.h

@ -47,7 +47,7 @@ class ForceRendererOptions {
inline constexpr ForceRendererOptions(): _size(1.0f) {} inline constexpr ForceRendererOptions(): _size(1.0f) {}
/** @brief Color of rendered arrow */ /** @brief Color of rendered arrow */
inline constexpr Color3<> color() const { return _color; } inline constexpr Color4<> color() const { return _color; }
/** /**
* @brief Set color of rendered arrow * @brief Set color of rendered arrow
@ -55,7 +55,7 @@ class ForceRendererOptions {
* *
* Default is black. * Default is black.
*/ */
inline ForceRendererOptions* setColor(const Color3<>& color) { inline ForceRendererOptions* setColor(const Color4<>& color) {
_color = color; _color = color;
return this; return this;
} }
@ -75,7 +75,7 @@ class ForceRendererOptions {
} }
private: private:
Color3<> _color; Color4<> _color;
Float _size; Float _size;
}; };

6
src/DebugTools/ShapeRenderer.h

@ -60,7 +60,7 @@ class ShapeRendererOptions {
inline constexpr ShapeRendererOptions(): _pointSize(0.25f) {} inline constexpr ShapeRendererOptions(): _pointSize(0.25f) {}
/** @brief Color of rendered shape */ /** @brief Color of rendered shape */
inline constexpr Color3<> color() const { return _color; } inline constexpr Color4<> color() const { return _color; }
/** /**
* @brief Set color of rendered shape * @brief Set color of rendered shape
@ -68,7 +68,7 @@ class ShapeRendererOptions {
* *
* Default is black. * Default is black.
*/ */
inline ShapeRendererOptions* setColor(const Color3<>& color) { inline ShapeRendererOptions* setColor(const Color4<>& color) {
_color = color; _color = color;
return this; return this;
} }
@ -89,7 +89,7 @@ class ShapeRendererOptions {
} }
private: private:
Color3<> _color; Color4<> _color;
Float _pointSize; Float _pointSize;
}; };

Loading…
Cancel
Save