Closed rainwoodman closed 4 years ago
Have you been looking for this?
This create a box from 6 planes from positions and directions for planes
You can invert box https://github.com/orangeduck/Corange/blob/3c99c2e25c338b27ee831406aaed0159ec3a77a2/src/cengine.c#L2635
This how plane renderer - translate to triangle
Plane is abstraction you can change direction in the renderer
I hope I haven’t mixed anything up. But wait for Daniel
Thanks. I think this line confirms the directions are pointing outward.
I am not trained in computer geometry. After looking through a few slides online, I realized it is probably the usual convention to have the norm vectors of faces pointing outward.
After looking through a few slides online https://learnopengl.com/Advanced-OpenGL/Face-culling you can change it behavior
I am not trained in CG
me too bro hahaahha =)
You better describe what you want to do. So it will be clearer how to help you. By the way, I also did not study computer graphics and am not a programmer. =) But if you sequentially examine the code from the data structure before the rendering takes place (thanks to the C code this path is linear and explicit), you can understand how and what works, you just need to spend time and are not afraid of the incomprehensible, but just watch how it is implemented =)
Thanks for the link on vertex ordering.
I was using the sphere-box intersection routines for culling simulation boxes against a spherical shell.
Here is the rough idea: the particles in the simulation are organized in boxes; the boxes are tiled to provide full coverage to a sphere. Rendering here means solving an equation, not depositing pixels into an image. For a shell with a finite thickness, many tiled boxes can be culled -- I do not need to solve forthe particles in those culled boxes if I only care about particles in the shell.
Could you clarify if the direction of the planes in a box are pointing outward or inward?
https://github.com/orangeduck/Corange/blob/3c99c2e25c338b27ee831406aaed0159ec3a77a2/include/cengine.h#L564