AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
Color.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agx/Vec4.h>
21
22namespace agxRender
23{
24
32
40
47 class Color : public agx::Vec4f
48 {
49 public:
52 : agx::Vec4f( 0.f, 0.f, 0.f, 1.f )
53 {
54 }
55
57 explicit Color( float r, float g, float b, float a = 1.f )
58 : agx::Vec4f( r, g, b, a )
59 {
60 }
61
63 explicit Color(const agx::Vec3f& color, float a = 1.f)
64 : agx::Vec4f(color[0], color[1], color[2], a)
65 {
66 }
67
72 explicit Color(float c)
73 : agx::Vec4f(c)
74 {
75 }
76
77 explicit Color( const agx::Vec4f& color )
78 : agx::Vec4f( color )
79 {
80 }
81
82 explicit Color( const agx::Vec4d& color )
83 : agx::Vec4f( (agx::Vec4f)color )
84 {
85 }
86
87 inline float r() const { return x(); }
88 inline float& r() { return x(); }
89 inline float g() const { return y(); }
90 inline float& g() { return y(); }
91 inline float b() const { return z(); }
92 inline float& b() { return z(); }
93 inline float a() const { return w(); }
94 inline float& a() { return w(); }
95
96 inline operator agx::Vec3f() const
97 {
98 return agx::Vec3f( r(), g(), b() );
99 }
100
101 inline operator agx::Vec3d() const
102 {
103 return agx::Vec3d( (double)r(), (double)g(), (double)b() );
104 }
105
106 inline operator agx::Vec4d() const
107 {
108 return agx::Vec4d( (double)r(), (double)g(), (double)b(), (double)a() );
109 }
110
111 inline Color& operator=( const agx::Vec4f& other )
112 {
113 x() = other.x();
114 y() = other.y();
115 z() = other.z();
116 w() = other.w();
117
118 return *this;
119 }
120
121 inline agx::Vec4 asVec4() const
122 {
123 return agx::Vec4((agx::Real)r(), (agx::Real)g(), (agx::Real)b(), (agx::Real)a() );
124 }
125
136 AGXPHYSICS_EXPORT static Color fromHash( agx::UInt64 hash, float a = 1.0f, float h0 = 0.0f );
137
147 AGXPHYSICS_EXPORT static Color fromHSV( float h, float s, float v, float a = 1.0f, bool hueInDegrees = false );
148
153 AGXPHYSICS_EXPORT agx::Vec4f asHSV( bool hueInDegrees = false ) const;
154
155#ifndef SWIG
157 AGXPHYSICS_EXPORT Color lerp( const Color& to, float t ) const;
158#endif
159
161 AGXPHYSICS_EXPORT static Color lerp( const Color& from, const Color& to, float t );
162
163 public:
166
169
170 // If you add or remove a color, be sure to reflect that in the InitColorTable method!
171 inline static agxRender::Color Wheat() { return agxRender::Color( 0.960784f, 0.870588f, 0.701961f, 1.f ); }
172 inline static agxRender::Color DarkKhaki() { return agxRender::Color( 0.741176f, 0.717647f, 0.419608f, 1.f ); }
173 inline static agxRender::Color DarkGoldenrod() { return agxRender::Color( 0.721569f, 0.525490f, 0.043137f, 1.f ); }
174 inline static agxRender::Color YellowGreen() { return agxRender::Color( 0.603922f, 0.803922f, 0.196078f, 1.f ); }
175 inline static agxRender::Color PaleGreen() { return agxRender::Color( 0.596078f, 0.984314f, 0.596078f, 1.f ); }
176 inline static agxRender::Color SpringGreen() { return agxRender::Color( 0.000000f, 1.000000f, 0.498039f, 1.f ); }
177 inline static agxRender::Color AliceBlue() { return agxRender::Color( 0.941176f, 0.972549f, 1.000000f, 1.f ); }
178 inline static agxRender::Color OrangeRed() { return agxRender::Color( 1.000000f, 0.270588f, 0.000000f, 1.f ); }
179 inline static agxRender::Color LightSalmon() { return agxRender::Color( 1.000000f, 0.627451f, 0.478431f, 1.f ); }
180 inline static agxRender::Color SlateBlue() { return agxRender::Color( 0.415686f, 0.352941f, 0.803922f, 1.f ); }
181 inline static agxRender::Color Aquamarine() { return agxRender::Color( 0.498039f, 1.000000f, 0.831373f, 1.f ); }
182 inline static agxRender::Color OliveDrab() { return agxRender::Color( 0.419608f, 0.556863f, 0.137255f, 1.f ); }
183 inline static agxRender::Color PapayaWhip() { return agxRender::Color( 1.000000f, 0.937255f, 0.835294f, 1.f ); }
184 inline static agxRender::Color LemonChiffon() { return agxRender::Color( 1.000000f, 0.980392f, 0.803922f, 1.f ); }
185 inline static agxRender::Color OldLace() { return agxRender::Color( 0.992157f, 0.960784f, 0.901961f, 1.f ); }
186 inline static agxRender::Color FloralWhite() { return agxRender::Color( 1.000000f, 0.980392f, 0.941176f, 1.f ); }
187 inline static agxRender::Color Maroon() { return agxRender::Color( 0.501961f, 0.000000f, 0.000000f, 1.f ); }
188 inline static agxRender::Color Linen() { return agxRender::Color( 0.980392f, 0.941176f, 0.901961f, 1.f ); }
189 inline static agxRender::Color LightSlateBlue() { return agxRender::Color( 0.517647f, 0.439216f, 1.000000f, 1.f ); }
190 inline static agxRender::Color DarkSlateGray() { return agxRender::Color( 0.184314f, 0.309804f, 0.309804f, 1.f ); }
191 inline static agxRender::Color CadetBlue() { return agxRender::Color( 0.372549f, 0.619608f, 0.627451f, 1.f ); }
192 inline static agxRender::Color NavajoWhite() { return agxRender::Color( 1.000000f, 0.870588f, 0.678431f, 1.f ); }
193 inline static agxRender::Color Violet() { return agxRender::Color( 0.933333f, 0.509804f, 0.933333f, 1.f ); }
194 inline static agxRender::Color PaleVioletRed() { return agxRender::Color( 0.858824f, 0.439216f, 0.576471f, 1.f ); }
195 inline static agxRender::Color LightGoldenrod() { return agxRender::Color( 0.933333f, 0.866667f, 0.509804f, 1.f ); }
196 inline static agxRender::Color Cornsilk() { return agxRender::Color( 1.000000f, 0.972549f, 0.862745f, 1.f ); }
197 inline static agxRender::Color Silver() { return agxRender::Color( 0.752941f, 0.752941f, 0.752941f, 1.f ); }
198 inline static agxRender::Color DarkCyan() { return agxRender::Color( 0.000000f, 0.545098f, 0.545098f, 1.f ); }
199 inline static agxRender::Color DarkOrchid() { return agxRender::Color( 0.600000f, 0.196078f, 0.800000f, 1.f ); }
200 inline static agxRender::Color AntiqueWhite() { return agxRender::Color( 0.980392f, 0.921569f, 0.843137f, 1.f ); }
201 inline static agxRender::Color MediumSpringGreen() { return agxRender::Color( 0.000000f, 0.980392f, 0.603922f, 1.f ); }
202 inline static agxRender::Color IndianRed() { return agxRender::Color( 0.803922f, 0.360784f, 0.360784f, 1.f ); }
203 inline static agxRender::Color DarkBlue() { return agxRender::Color( 0.000000f, 0.000000f, 0.545098f, 1.f ); }
204 inline static agxRender::Color Sienna() { return agxRender::Color( 0.627451f, 0.321569f, 0.176471f, 1.f ); }
205 inline static agxRender::Color ForestGreen() { return agxRender::Color( 0.133333f, 0.545098f, 0.133333f, 1.f ); }
206 inline static agxRender::Color LightSlateGray() { return agxRender::Color( 0.466667f, 0.533333f, 0.600000f, 1.f ); }
207 inline static agxRender::Color BlanchedAlmond() { return agxRender::Color( 1.000000f, 0.921569f, 0.803922f, 1.f ); }
208 inline static agxRender::Color Moccasin() { return agxRender::Color( 1.000000f, 0.894118f, 0.709804f, 1.f ); }
209 inline static agxRender::Color LimeGreen() { return agxRender::Color( 0.196078f, 0.803922f, 0.196078f, 1.f ); }
210 inline static agxRender::Color HotPink() { return agxRender::Color( 1.000000f, 0.411765f, 0.705882f, 1.f ); }
211 inline static agxRender::Color PeachPuff() { return agxRender::Color( 1.000000f, 0.854902f, 0.725490f, 1.f ); }
212 inline static agxRender::Color DimGray() { return agxRender::Color( 0.411765f, 0.411765f, 0.411765f, 1.f ); }
213 inline static agxRender::Color Purple() { return agxRender::Color( 0.501961f, 0.000000f, 0.501961f, 1.f ); }
214 inline static agxRender::Color MediumSlateBlue() { return agxRender::Color( 0.482353f, 0.407843f, 0.933333f, 1.f ); }
215 inline static agxRender::Color Brown() { return agxRender::Color( 0.647059f, 0.164706f, 0.164706f, 1.f ); }
216 inline static agxRender::Color MediumBlue() { return agxRender::Color( 0.000000f, 0.000000f, 0.803922f, 1.f ); }
217 inline static agxRender::Color Red() { return agxRender::Color( 1.000000f, 0.000000f, 0.000000f, 1.f ); }
218 inline static agxRender::Color Teal() { return agxRender::Color( 0.000000f, 0.501961f, 0.501961f, 1.f ); }
219 inline static agxRender::Color Burlywood() { return agxRender::Color( 0.870588f, 0.721569f, 0.529412f, 1.f ); }
220 inline static agxRender::Color MintCream() { return agxRender::Color( 0.960784f, 1.000000f, 0.980392f, 1.f ); }
221 inline static agxRender::Color Khaki() { return agxRender::Color( 0.941176f, 0.901961f, 0.549020f, 1.f ); }
222 inline static agxRender::Color DodgerBlue() { return agxRender::Color( 0.117647f, 0.564706f, 1.000000f, 1.f ); }
223 inline static agxRender::Color DarkOrange() { return agxRender::Color( 1.000000f, 0.549020f, 0.000000f, 1.f ); }
224 inline static agxRender::Color White() { return agxRender::Color( 1.000000f, 1.000000f, 1.000000f, 1.f ); }
225 inline static agxRender::Color DeepSkyBlue() { return agxRender::Color( 0.000000f, 0.749020f, 1.000000f, 1.f ); }
226 inline static agxRender::Color Orchid() { return agxRender::Color( 0.854902f, 0.439216f, 0.839216f, 1.f ); }
227 inline static agxRender::Color Ivory() { return agxRender::Color( 1.000000f, 1.000000f, 0.941176f, 1.f ); }
228 inline static agxRender::Color DarkMagenta() { return agxRender::Color( 0.545098f, 0.000000f, 0.545098f, 1.f ); }
229 inline static agxRender::Color LightCyan() { return agxRender::Color( 0.878431f, 1.000000f, 1.000000f, 1.f ); }
230 inline static agxRender::Color LightSeaGreen() { return agxRender::Color( 0.125490f, 0.698039f, 0.666667f, 1.f ); }
231 inline static agxRender::Color MediumPurple() { return agxRender::Color( 0.576471f, 0.439216f, 0.858824f, 1.f ); }
232 inline static agxRender::Color LightSteelBlue() { return agxRender::Color( 0.690196f, 0.768627f, 0.870588f, 1.f ); }
233 inline static agxRender::Color Green() { return agxRender::Color( 0.000000f, 0.501961f, 0.000000f, 1.f ); }
234 inline static agxRender::Color DarkSeaGreen() { return agxRender::Color( 0.560784f, 0.737255f, 0.560784f, 1.f ); }
235 inline static agxRender::Color MediumOrchid() { return agxRender::Color( 0.729412f, 0.333333f, 0.827451f, 1.f ); }
236 inline static agxRender::Color Bisque() { return agxRender::Color( 1.000000f, 0.894118f, 0.768627f, 1.f ); }
237 inline static agxRender::Color Cyan() { return agxRender::Color( 0.000000f, 1.000000f, 1.000000f, 1.f ); }
238 inline static agxRender::Color Thistle() { return agxRender::Color( 0.847059f, 0.749020f, 0.847059f, 1.f ); }
239 inline static agxRender::Color LightPink() { return agxRender::Color( 1.000000f, 0.713726f, 0.756863f, 1.f ); }
240 inline static agxRender::Color CornflowerBlue() { return agxRender::Color( 0.392157f, 0.584314f, 0.929412f, 1.f ); }
241 inline static agxRender::Color LightSkyBlue() { return agxRender::Color( 0.529412f, 0.807843f, 0.980392f, 1.f ); }
242 inline static agxRender::Color Beige() { return agxRender::Color( 0.960784f, 0.960784f, 0.862745f, 1.f ); }
243 inline static agxRender::Color Aqua() { return agxRender::Color( 0.000000f, 1.000000f, 1.000000f, 1.f ); }
244 inline static agxRender::Color DarkGray() { return agxRender::Color( 0.662745f, 0.662745f, 0.662745f, 1.f ); }
245 inline static agxRender::Color PowderBlue() { return agxRender::Color( 0.690196f, 0.878431f, 0.901961f, 1.f ); }
246 inline static agxRender::Color GreenYellow() { return agxRender::Color( 0.678431f, 1.000000f, 0.184314f, 1.f ); }
247 inline static agxRender::Color Lime() { return agxRender::Color( 0.000000f, 1.000000f, 0.000000f, 1.f ); }
248 inline static agxRender::Color MediumVioletRed() { return agxRender::Color( 0.780392f, 0.082353f, 0.521569f, 1.f ); }
249 inline static agxRender::Color Salmon() { return agxRender::Color( 0.980392f, 0.501961f, 0.447059f, 1.f ); }
250 inline static agxRender::Color Firebrick() { return agxRender::Color( 0.698039f, 0.133333f, 0.133333f, 1.f ); }
251 inline static agxRender::Color RosyBrown() { return agxRender::Color( 0.737255f, 0.560784f, 0.560784f, 1.f ); }
252 inline static agxRender::Color Lavender() { return agxRender::Color( 0.901961f, 0.901961f, 0.980392f, 1.f ); }
253 inline static agxRender::Color Navy() { return agxRender::Color( 0.000000f, 0.000000f, 0.501961f, 1.f ); }
254 inline static agxRender::Color DarkSlateBlue() { return agxRender::Color( 0.282353f, 0.239216f, 0.545098f, 1.f ); }
255 inline static agxRender::Color MediumAquamarine() { return agxRender::Color( 0.400000f, 0.803922f, 0.666667f, 1.f ); }
256 inline static agxRender::Color DarkViolet() { return agxRender::Color( 0.580392f, 0.000000f, 0.827451f, 1.f ); }
257 inline static agxRender::Color Yellow() { return agxRender::Color( 1.000000f, 1.000000f, 0.000000f, 1.f ); }
258 inline static agxRender::Color Chartreuse() { return agxRender::Color( 0.498039f, 1.000000f, 0.000000f, 1.f ); }
259 inline static agxRender::Color Gold() { return agxRender::Color( 1.000000f, 0.843137f, 0.000000f, 1.f ); }
260 inline static agxRender::Color WhiteSmoke() { return agxRender::Color( 0.960784f, 0.960784f, 0.960784f, 1.f ); }
261 inline static agxRender::Color SkyBlue() { return agxRender::Color( 0.529412f, 0.807843f, 0.921569f, 1.f ); }
262 inline static agxRender::Color VioletRed() { return agxRender::Color( 0.815686f, 0.125490f, 0.564706f, 1.f ); }
263 inline static agxRender::Color LavenderBlush() { return agxRender::Color( 1.000000f, 0.941176f, 0.960784f, 1.f ); }
264 inline static agxRender::Color Turquoise() { return agxRender::Color( 0.250980f, 0.878431f, 0.815686f, 1.f ); }
265 inline static agxRender::Color Magenta() { return agxRender::Color( 1.000000f, 0.000000f, 1.000000f, 1.f ); }
266 inline static agxRender::Color Blue() { return agxRender::Color( 0.000000f, 0.000000f, 1.000000f, 1.f ); }
267 inline static agxRender::Color Tomato() { return agxRender::Color( 1.000000f, 0.388235f, 0.278431f, 1.f ); }
268 inline static agxRender::Color Tan() { return agxRender::Color( 0.823529f, 0.705882f, 0.549020f, 1.f ); }
269 inline static agxRender::Color SeaGreen() { return agxRender::Color( 0.180392f, 0.545098f, 0.341176f, 1.f ); }
270 inline static agxRender::Color SandyBrown() { return agxRender::Color( 0.956863f, 0.643137f, 0.376471f, 1.f ); }
271 inline static agxRender::Color Pink() { return agxRender::Color( 1.000000f, 0.752941f, 0.796078f, 1.f ); }
272 inline static agxRender::Color Goldenrod() { return agxRender::Color( 0.854902f, 0.647059f, 0.125490f, 1.f ); }
273 inline static agxRender::Color MediumTurquoise() { return agxRender::Color( 0.282353f, 0.819608f, 0.800000f, 1.f ); }
274 inline static agxRender::Color DarkSalmon() { return agxRender::Color( 0.913725f, 0.588235f, 0.478431f, 1.f ); }
275 inline static agxRender::Color Gainsboro() { return agxRender::Color( 0.862745f, 0.862745f, 0.862745f, 1.f ); }
276 inline static agxRender::Color Peru() { return agxRender::Color( 0.803922f, 0.521569f, 0.247059f, 1.f ); }
277 inline static agxRender::Color SlateGray() { return agxRender::Color( 0.439216f, 0.501961f, 0.564706f, 1.f ); }
278 inline static agxRender::Color Olive() { return agxRender::Color( 0.501961f, 0.501961f, 0.000000f, 1.f ); }
279 inline static agxRender::Color LightBlue() { return agxRender::Color( 0.678431f, 0.847059f, 0.901961f, 1.f ); }
280 inline static agxRender::Color Seashell() { return agxRender::Color( 1.000000f, 0.960784f, 0.933333f, 1.f ); }
281 inline static agxRender::Color SteelBlue() { return agxRender::Color( 0.274510f, 0.509804f, 0.705882f, 1.f ); }
282 inline static agxRender::Color DeepPink() { return agxRender::Color( 1.000000f, 0.078431f, 0.576471f, 1.f ); }
283 inline static agxRender::Color SaddleBrown() { return agxRender::Color( 0.545098f, 0.270588f, 0.074510f, 1.f ); }
284 inline static agxRender::Color RoyalBlue() { return agxRender::Color( 0.254902f, 0.411765f, 0.882353f, 1.f ); }
285 inline static agxRender::Color PaleTurquoise() { return agxRender::Color( 0.686275f, 0.933333f, 0.933333f, 1.f ); }
286 inline static agxRender::Color DarkOliveGreen() { return agxRender::Color( 0.333333f, 0.419608f, 0.184314f, 1.f ); }
287 inline static agxRender::Color LightGreen() { return agxRender::Color( 0.564706f, 0.933333f, 0.564706f, 1.f ); }
288 inline static agxRender::Color Gray() { return agxRender::Color( 0.501961f, 0.501961f, 0.501961f, 1.f ); }
289 inline static agxRender::Color DarkRed() { return agxRender::Color( 0.545098f, 0.000000f, 0.000000f, 1.f ); }
290 inline static agxRender::Color DarkTurquoise() { return agxRender::Color( 0.000000f, 0.807843f, 0.819608f, 1.f ); }
291 inline static agxRender::Color Plum() { return agxRender::Color( 0.866667f, 0.627451f, 0.866667f, 1.f ); }
292 inline static agxRender::Color MediumSeaGreen() { return agxRender::Color( 0.235294f, 0.701961f, 0.443137f, 1.f ); }
293 inline static agxRender::Color GhostWhite() { return agxRender::Color( 1.000000f, 0.980392f, 0.980392f, 1.f ); }
294 inline static agxRender::Color DarkGreen() { return agxRender::Color( 0.000000f, 0.392157f, 0.000000f, 1.f ); }
295 inline static agxRender::Color Snow() { return agxRender::Color( 1.000000f, 0.980392f, 0.980392f, 1.f ); }
296 inline static agxRender::Color LawnGreen() { return agxRender::Color( 0.486275f, 0.988235f, 0.000000f, 1.f ); }
297 inline static agxRender::Color LightYellow() { return agxRender::Color( 1.000000f, 1.000000f, 0.878431f, 1.f ); }
298 inline static agxRender::Color Azure() { return agxRender::Color( 0.941176f, 1.000000f, 1.000000f, 1.f ); }
299 inline static agxRender::Color MidnightBlue() { return agxRender::Color( 0.098039f, 0.098039f, 0.439216f, 1.f ); }
300 inline static agxRender::Color Black() { return agxRender::Color( 0.000000f, 0.000000f, 0.000000f, 1.f ); }
301 inline static agxRender::Color MistyRose() { return agxRender::Color( 1.000000f, 0.894118f, 0.882353f, 1.f ); }
302 inline static agxRender::Color LightGray() { return agxRender::Color( 0.827451f, 0.827451f, 0.827451f, 1.f ); }
303 inline static agxRender::Color PaleGoldenrod() { return agxRender::Color( 0.933333f, 0.909804f, 0.666667f, 1.f ); }
304 inline static agxRender::Color LightCoral() { return agxRender::Color( 0.941176f, 0.501961f, 0.501961f, 1.f ); }
305 inline static agxRender::Color Orange() { return agxRender::Color( 1.000000f, 0.647059f, 0.000000f, 1.f ); }
306 inline static agxRender::Color Honeydew() { return agxRender::Color( 0.941176f, 1.000000f, 0.941176f, 1.f ); }
307 inline static agxRender::Color BlueViolet() { return agxRender::Color( 0.541176f, 0.168627f, 0.886275f, 1.f ); }
308 inline static agxRender::Color LightGoldenrodYellow() { return agxRender::Color( 0.980392f, 0.980392f, 0.823529f, 1.f ); }
309 inline static agxRender::Color Chocolate() { return agxRender::Color( 0.823529f, 0.411765f, 0.117647f, 1.f ); }
310 inline static agxRender::Color Fuschia() { return agxRender::Color( 1.000000f, 0.000000f, 1.000000f, 1.f ); }
311 inline static agxRender::Color Coral() { return agxRender::Color( 1.000000f, 0.498039f, 0.313726f, 1.f ); }
312 };
313
315}
316
#define AGXPHYSICS_EXPORT
Utility color class with "common colors".
Definition: Color.h:48
static AGXPHYSICS_EXPORT size_t getNumColors()
static agxRender::Color SaddleBrown()
Definition: Color.h:283
static agxRender::Color Beige()
Definition: Color.h:242
static agxRender::Color OldLace()
Definition: Color.h:185
static agxRender::Color OliveDrab()
Definition: Color.h:182
static agxRender::Color Khaki()
Definition: Color.h:221
static agxRender::Color MediumAquamarine()
Definition: Color.h:255
static AGXPHYSICS_EXPORT Color fromHSV(float h, float s, float v, float a=1.0f, bool hueInDegrees=false)
Create RGB color given HSV (Hue, Saturation, Value).
static agxRender::Color LightGray()
Definition: Color.h:302
static agxRender::Color LawnGreen()
Definition: Color.h:296
static agxRender::Color MediumSeaGreen()
Definition: Color.h:292
static agxRender::Color Plum()
Definition: Color.h:291
static agxRender::Color Goldenrod()
Definition: Color.h:272
static agxRender::Color OrangeRed()
Definition: Color.h:178
static agxRender::Color DarkSalmon()
Definition: Color.h:274
static agxRender::Color LightCyan()
Definition: Color.h:229
static agxRender::Color NavajoWhite()
Definition: Color.h:192
static agxRender::Color LavenderBlush()
Definition: Color.h:263
static agxRender::Color DarkMagenta()
Definition: Color.h:228
Color(const agx::Vec3f &color, float a=1.f)
Constructor.
Definition: Color.h:63
static agxRender::Color PaleTurquoise()
Definition: Color.h:285
static agxRender::Color GhostWhite()
Definition: Color.h:293
static agxRender::Color PowderBlue()
Definition: Color.h:245
static agxRender::Color SeaGreen()
Definition: Color.h:269
float & g()
Definition: Color.h:90
static agxRender::Color Violet()
Definition: Color.h:193
static agxRender::Color Moccasin()
Definition: Color.h:208
static agxRender::Color AliceBlue()
Definition: Color.h:177
float & r()
Definition: Color.h:88
static agxRender::Color Chocolate()
Definition: Color.h:309
static agxRender::Color Tan()
Definition: Color.h:268
static agxRender::Color Red()
Definition: Color.h:217
static agxRender::Color Orange()
Definition: Color.h:305
static agxRender::Color Firebrick()
Definition: Color.h:250
static agxRender::Color Blue()
Definition: Color.h:266
static agxRender::Color Black()
Definition: Color.h:300
static agxRender::Color SkyBlue()
Definition: Color.h:261
static agxRender::Color MediumBlue()
Definition: Color.h:216
static agxRender::Color Sienna()
Definition: Color.h:204
static agxRender::Color SpringGreen()
Definition: Color.h:176
static agxRender::Color LightGoldenrodYellow()
Definition: Color.h:308
static agxRender::Color Cyan()
Definition: Color.h:237
Color()
Default constructor. Set color to 0,0,0,1.
Definition: Color.h:51
static agxRender::Color VioletRed()
Definition: Color.h:262
static agxRender::Color Brown()
Definition: Color.h:215
static agxRender::Color LimeGreen()
Definition: Color.h:209
static agxRender::Color Orchid()
Definition: Color.h:226
static agxRender::Color Turquoise()
Definition: Color.h:264
AGXPHYSICS_EXPORT agx::Vec4f asHSV(bool hueInDegrees=false) const
static agxRender::Color LightSalmon()
Definition: Color.h:179
static AGXPHYSICS_EXPORT Color fromHash(agx::UInt64 hash, float a=1.0f, float h0=0.0f)
Visually distinct, deterministic color given a hash value, index or id.
static agxRender::Color Gainsboro()
Definition: Color.h:275
static agxRender::Color BlueViolet()
Definition: Color.h:307
static agxRender::Color Linen()
Definition: Color.h:188
static agxRender::Color DarkRed()
Definition: Color.h:289
static agxRender::Color DarkSlateBlue()
Definition: Color.h:254
static agxRender::Color Fuschia()
Definition: Color.h:310
static agxRender::Color MediumPurple()
Definition: Color.h:231
static agxRender::Color LemonChiffon()
Definition: Color.h:184
static agxRender::Color Teal()
Definition: Color.h:218
float b() const
Definition: Color.h:91
float & b()
Definition: Color.h:92
static agxRender::Color Ivory()
Definition: Color.h:227
static agxRender::Color DarkSlateGray()
Definition: Color.h:190
static agxRender::Color DarkCyan()
Definition: Color.h:198
static agxRender::Color Wheat()
Definition: Color.h:171
static agxRender::Color AntiqueWhite()
Definition: Color.h:200
static agxRender::Color PaleGreen()
Definition: Color.h:175
static agxRender::Color Burlywood()
Definition: Color.h:219
static agxRender::Color CadetBlue()
Definition: Color.h:191
static agxRender::Color DarkOrchid()
Definition: Color.h:199
static agxRender::Color SandyBrown()
Definition: Color.h:270
static agxRender::Color LightPink()
Definition: Color.h:239
AGXPHYSICS_EXPORT Color lerp(const Color &to, float t) const
Linear interpolation between this color to the other given time [0, 1].
static agxRender::Color Peru()
Definition: Color.h:276
static agxRender::Color DarkTurquoise()
Definition: Color.h:290
float r() const
Definition: Color.h:87
static agxRender::Color Azure()
Definition: Color.h:298
static agxRender::Color DodgerBlue()
Definition: Color.h:222
static agxRender::Color Snow()
Definition: Color.h:295
agx::Vec4 asVec4() const
Definition: Color.h:121
static agxRender::Color Honeydew()
Definition: Color.h:306
static agxRender::Color LightCoral()
Definition: Color.h:304
static agxRender::Color DarkOrange()
Definition: Color.h:223
static agxRender::Color DarkSeaGreen()
Definition: Color.h:234
static agxRender::Color LightYellow()
Definition: Color.h:297
static agxRender::Color YellowGreen()
Definition: Color.h:174
static agxRender::Color MidnightBlue()
Definition: Color.h:299
static AGXPHYSICS_EXPORT Color lerp(const Color &from, const Color &to, float t)
Linear interpolation between from color to the other given time [0, 1].
Color(const agx::Vec4d &color)
Definition: Color.h:82
static agxRender::Color MediumVioletRed()
Definition: Color.h:248
static agxRender::Color DeepSkyBlue()
Definition: Color.h:225
static agxRender::Color LightSeaGreen()
Definition: Color.h:230
static agxRender::Color Tomato()
Definition: Color.h:267
Color(const agx::Vec4f &color)
Definition: Color.h:77
static agxRender::Color Bisque()
Definition: Color.h:236
static agxRender::Color BlanchedAlmond()
Definition: Color.h:207
static agxRender::Color Gray()
Definition: Color.h:288
Color(float r, float g, float b, float a=1.f)
Constructor.
Definition: Color.h:57
static agxRender::Color Yellow()
Definition: Color.h:257
static agxRender::Color Pink()
Definition: Color.h:271
static agxRender::Color DarkViolet()
Definition: Color.h:256
static AGXPHYSICS_EXPORT agxRender::Color getColor(size_t)
static agxRender::Color GreenYellow()
Definition: Color.h:246
static agxRender::Color Seashell()
Definition: Color.h:280
static agxRender::Color LightBlue()
Definition: Color.h:279
static agxRender::Color PaleVioletRed()
Definition: Color.h:194
Color & operator=(const agx::Vec4f &other)
Definition: Color.h:111
static agxRender::Color Magenta()
Definition: Color.h:265
static agxRender::Color Cornsilk()
Definition: Color.h:196
static agxRender::Color HotPink()
Definition: Color.h:210
static agxRender::Color PaleGoldenrod()
Definition: Color.h:303
static agxRender::Color MintCream()
Definition: Color.h:220
static agxRender::Color SlateBlue()
Definition: Color.h:180
static agxRender::Color DimGray()
Definition: Color.h:212
static agxRender::Color Maroon()
Definition: Color.h:187
static agxRender::Color PeachPuff()
Definition: Color.h:211
static agxRender::Color Gold()
Definition: Color.h:259
static agxRender::Color SlateGray()
Definition: Color.h:277
static agxRender::Color Coral()
Definition: Color.h:311
static agxRender::Color Green()
Definition: Color.h:233
static agxRender::Color LightSteelBlue()
Definition: Color.h:232
float a() const
Definition: Color.h:93
static agxRender::Color White()
Definition: Color.h:224
static agxRender::Color DarkOliveGreen()
Definition: Color.h:286
static agxRender::Color CornflowerBlue()
Definition: Color.h:240
static agxRender::Color MediumSlateBlue()
Definition: Color.h:214
static agxRender::Color Olive()
Definition: Color.h:278
static agxRender::Color Aquamarine()
Definition: Color.h:181
static agxRender::Color LightSlateGray()
Definition: Color.h:206
static agxRender::Color IndianRed()
Definition: Color.h:202
float g() const
Definition: Color.h:89
static agxRender::Color Silver()
Definition: Color.h:197
static agxRender::Color MistyRose()
Definition: Color.h:301
static agxRender::Color Navy()
Definition: Color.h:253
static agxRender::Color DeepPink()
Definition: Color.h:282
static agxRender::Color Salmon()
Definition: Color.h:249
static agxRender::Color Aqua()
Definition: Color.h:243
static agxRender::Color RosyBrown()
Definition: Color.h:251
static agxRender::Color DarkGoldenrod()
Definition: Color.h:173
static agxRender::Color MediumOrchid()
Definition: Color.h:235
static agxRender::Color MediumSpringGreen()
Definition: Color.h:201
static agxRender::Color LightGreen()
Definition: Color.h:287
static agxRender::Color ForestGreen()
Definition: Color.h:205
Color(float c)
Constructor which set all elements of color to c.
Definition: Color.h:72
static agxRender::Color FloralWhite()
Definition: Color.h:186
static agxRender::Color MediumTurquoise()
Definition: Color.h:273
static agxRender::Color DarkGray()
Definition: Color.h:244
static agxRender::Color SteelBlue()
Definition: Color.h:281
static agxRender::Color RoyalBlue()
Definition: Color.h:284
float & a()
Definition: Color.h:94
static agxRender::Color Lime()
Definition: Color.h:247
static agxRender::Color DarkBlue()
Definition: Color.h:203
static agxRender::Color LightSkyBlue()
Definition: Color.h:241
static agxRender::Color PapayaWhip()
Definition: Color.h:183
static agxRender::Color LightGoldenrod()
Definition: Color.h:195
static agxRender::Color DarkKhaki()
Definition: Color.h:172
static agxRender::Color Thistle()
Definition: Color.h:238
static agxRender::Color Purple()
Definition: Color.h:213
static agxRender::Color WhiteSmoke()
Definition: Color.h:260
static agxRender::Color Chartreuse()
Definition: Color.h:258
static agxRender::Color LightSlateBlue()
Definition: Color.h:189
static agxRender::Color Lavender()
Definition: Color.h:252
static agxRender::Color DarkGreen()
Definition: Color.h:294
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:35
Templated vector class.
Definition: agx/Vector.h:53
Namespace containing classes for handling debug rendering of collision geometries,...
Definition: Constraint.h:36
agx::Vector< Color > ColorVector
Definition: Color.h:314
AGXPHYSICS_EXPORT float convertRoughnessToShininess(float roughness)
Converts PBR Roughness to legacy Phong Shininess (specular exponent).
AGXPHYSICS_EXPORT float convertShininessToRoughness(float shininess)
Converts legacy Phong Shininess (specular exponent) to PBR Roughness.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint64_t UInt64
Definition: Integer.h:33
Vec3T< Real64 > Vec3d
Definition: agx/Vec3.h:40
double Real
Definition: Real.h:41
Vec4T< Real > Vec4
Definition: Vec4.h:25
Vec4T< Real64 > Vec4d
Definition: Vec4.h:27
Vec3T< Real32 > Vec3f
Definition: agx/Vec3.h:39