I am developing a little game using libgdx. It is a 2d top down game with some big maps and many objects on them. So i just want to render things in my view frustum. I have seen
You do not need to do this yourself. If you are using a Stage with a camera it automatically just draw the actors that are inside of the view.
If you want to access the camera from the Stage simply get it from the stage. stage.getCamera()
Here is how you get the frustum from an camera inside of an stage:
Camera cam = this.stage.getCamera();
Frustum f = cam.frustum;
float h = cam.viewportHeight;
float w = cam.viewportWidth;
Matrix4 m = cam.combined; //combind projection matrix
Matrix4 m2= cam.projection;
...
...
From the camera you can get every projection matrix you need an so on...
Inside of an actor you can get the stage and of the stage you can get everything shown above..
actor.getStage().getCamera().frustum;