|
1 | 1 | /* |
2 | | - * Copyright (c) 2009-2021 jMonkeyEngine |
| 2 | + * Copyright (c) 2009-2025 jMonkeyEngine |
3 | 3 | * All rights reserved. |
4 | 4 | * |
5 | 5 | * Redistribution and use in source and binary forms, with or without |
@@ -118,8 +118,7 @@ public SpotLight(Vector3f position, Vector3f direction, ColorRGBA color) { |
118 | 118 | setPosition(position); |
119 | 119 | setDirection(direction); |
120 | 120 | } |
121 | | - |
122 | | - |
| 121 | + |
123 | 122 | /** |
124 | 123 | * Creates a SpotLight at the given position, with the given direction, |
125 | 124 | * the given range and the given color. |
@@ -160,7 +159,6 @@ public SpotLight(Vector3f position, Vector3f direction, float range, ColorRGBA c |
160 | 159 | setDirection(direction); |
161 | 160 | setSpotRange(range); |
162 | 161 | } |
163 | | - |
164 | 162 |
|
165 | 163 | private void computeAngleParameters() { |
166 | 164 | float innerCos = FastMath.cos(spotInnerAngle); |
@@ -458,5 +456,18 @@ public SpotLight clone() { |
458 | 456 | s.position = position.clone(); |
459 | 457 | return s; |
460 | 458 | } |
461 | | -} |
462 | 459 |
|
| 460 | + @Override |
| 461 | + public String toString() { |
| 462 | + return getClass().getSimpleName() |
| 463 | + + "[name=" + name |
| 464 | + + ", direction=" + direction |
| 465 | + + ", position=" + position |
| 466 | + + ", range=" + spotRange |
| 467 | + + ", innerAngle=" + spotInnerAngle |
| 468 | + + ", outerAngle=" + spotOuterAngle |
| 469 | + + ", color=" + color |
| 470 | + + ", enabled=" + enabled |
| 471 | + + "]"; |
| 472 | + } |
| 473 | +} |
0 commit comments