Revision b28f909c
Added by Leszek Koltunski about 2 months ago
src/main/java/org/distorted/objectlib/helpers/ObjectShape.java | ||
---|---|---|
205 | 205 |
} |
206 | 206 |
|
207 | 207 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
208 |
// return surface defined by the face, i.e. a 4-tuple [ (nx,ny,nz), d ] |
|
208 |
// Attention: ATM this can return either (nx,ny,nz) or the negative (-nx,-ny,-nz) |
|
209 |
// (negative if the first three points of the first loop are 'concave' - as for example are the |
|
210 |
// first three points of the 'center' cubit variant of CoinTetrahedron) |
|
209 | 211 |
|
210 | 212 |
public void getFaceNormal(int face, float[] output) |
211 | 213 |
{ |
Also available in: Unified diff
Important fix for the way vectors normal to the surfaces of the faces of the cubits are computed.
Before this was buggy in case of concave faces (CoinTetrahedron, CoinHexahedron, O2) - direction of the normal vector was wrong.