I am working on making a Game Engine using LWJGL, for it I'm trying to add implementation of ray collisions.
I am going to allow the following bound types, box, sphere, cylinder, capsule, cunvex hull, and triangle mesh.
All my objects in the game extend a class called RenderObject, which is where they setup the rendering for user defined shapes.
I would be able to figure out ray casting if I could figure out how to take the object verticies and create a volumetric mass, like some method of quickly knowing if a point is located inside an object, something along the lines of:
boolean collision = RenderObject.containsPointOfMass(float x, float y, float z);
How would I go about making the object into a volumetric object? Is there anything built in or semi-implemented?
Thanks in advanced.