Browse Source

Defaulting to the tight culling frustum in the Camera's plane getter, and documenting that they are expressed in camera space.

David Piuva 6 months ago
parent
commit
7e2b1303aa
1 changed files with 5 additions and 2 deletions
  1. 5 2
      Source/DFPSR/implementation/render/Camera.h

+ 5 - 2
Source/DFPSR/implementation/render/Camera.h

@@ -187,10 +187,13 @@ public:
 	inline ProjectedPoint worldToScreen(const FVector3D &worldSpace) const {
 		return this->cameraToScreen(this->worldToCamera(worldSpace));
 	}
-	inline int getFrustumPlaneCount(bool clipping) const {
+	// Get the number of planes in the clipping or culling frustum.
+	inline int getFrustumPlaneCount(bool clipping = false) const {
 		return clipping ? this->clipFrustum.getPlaneCount() : this->cullFrustum.getPlaneCount();
 	}
-	inline FPlane3D getFrustumPlane(int sideIndex, bool clipping) const {
+	// Get a certain plane from the clipping or culling frustum.
+	//   The plane is expressed in camera space.
+	inline FPlane3D getFrustumPlane(int sideIndex, bool clipping = false) const {
 		return clipping ? this->clipFrustum.getPlane(sideIndex) : this->cullFrustum.getPlane(sideIndex);
 	}
 	// Returns 0 iff the model inside of the bound can clearly not be visible, 1 if it intersects with the view frustum, or 2 if fully in view.