I’ve recently started into JMonkeyEngine after being with LibGdx for a while, reading the book JMonkey, a Practical Guide. Throughout the book, there were some concepts that I didn’t fully understand(mostly mathematical) but I dismissed it as I didn’t necessarily need to know how something worked to use it. However, now that I’m learning about terrain I am very confused on how the code below works:
waterProcessor.setPlane(new Plane(Vector3f.UNIT_Y, waterLocation.dot(Vector3f.UNIT_Y);
The book’s explanation is incredibly short and all I know right now is that I’m somehow giving a constant and a normal or so(I have no idea what that is). Am I even expected to know what this does, or simply write it every time? Apologies if this is in the wrong section. I’ve read the JavaDoc for it and it said it took in a normal and a constant, I am confused about what those are and what they have to do with water reflection. With other terms, I had a somewhat vauge understanding, but I have little idea about what this means. If anyone could point me in the right direction, or if I even need to know why that works, many thanks.