|
1 | 1 | /* |
2 | | - * Copyright (c) 2009-2021 jMonkeyEngine |
| 2 | + * Copyright (c) 2009-2024 jMonkeyEngine |
3 | 3 | * All rights reserved. |
4 | 4 | * |
5 | 5 | * Redistribution and use in source and binary forms, with or without |
@@ -56,14 +56,6 @@ public class BoundingSphereDebug extends Mesh { |
56 | 56 | protected int radialSamples = 32; |
57 | 57 | protected boolean useEvenSlices; |
58 | 58 | protected boolean interior; |
59 | | - /** |
60 | | - * the distance from the center point each point falls on |
61 | | - */ |
62 | | - public float radius; |
63 | | - |
64 | | - public float getRadius() { |
65 | | - return radius; |
66 | | - } |
67 | 59 |
|
68 | 60 | public BoundingSphereDebug() { |
69 | 61 | setGeometryData(); |
@@ -151,27 +143,23 @@ private void setIndexData() { |
151 | 143 | if (segDone == radialSamples || segDone == radialSamples * 2) { |
152 | 144 | idx++; |
153 | 145 | } |
154 | | - |
155 | 146 | } |
156 | | - |
157 | 147 | } |
158 | | - |
159 | 148 |
|
160 | 149 | /** |
161 | 150 | * Convenience factory method that creates a debug bounding-sphere geometry |
| 151 | + * |
162 | 152 | * @param assetManager the assetManager |
163 | 153 | * @return the bounding sphere debug geometry. |
164 | 154 | */ |
165 | 155 | public static Geometry createDebugSphere(AssetManager assetManager) { |
166 | | - BoundingSphereDebug b = new BoundingSphereDebug(); |
167 | | - Geometry geom = new Geometry("BoundingDebug", b); |
168 | | - |
| 156 | + BoundingSphereDebug mesh = new BoundingSphereDebug(); |
| 157 | + Geometry geom = new Geometry("BoundingDebug", mesh); |
169 | 158 | Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); |
170 | 159 | mat.setBoolean("VertexColor", true); |
171 | 160 | mat.getAdditionalRenderState().setWireframe(true); |
172 | | - |
173 | 161 | geom.setMaterial(mat); |
174 | 162 | return geom; |
175 | | - |
176 | 163 | } |
| 164 | + |
177 | 165 | } |
0 commit comments