From d34927f9dab42b7f404d36c3656fb7211c72148a Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 29 Dec 2014 10:50:57 +0800 Subject: [PATCH 1/2] add frustum to release note --- docs/RELEASE_NOTES.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 7dce4fa5e3..ed20b55cb7 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -135,3 +135,17 @@ void AsyncLoadSprite3DTest::asyncLoad_Callback(Sprite3D* sprite, void* param) } ``` +### Frustum culling + +Frustum culling means only the stuff that is inside the frustum is sent to the graphics hardware. It can potentially improve the performance of the application since only the vertices that are part of the visible part of the 3D world are kept on the graphics card memory. + +Frustum culling is a property of camera, it is enabled by default. And you can use the following to enable or disable the frustum culling, + +```c++ +//the first parameter is enable frustum culling or not, the second means that frustum culling using near and far plan or not. +camera->enableFrustumCulling(true, true); +``` + +Note that when you can make sure that all the stuff is inside the frustum you can turn off the frustum culling. + +For more infomation please reffer to the cpptests/CameraTest \ No newline at end of file From 0963b3d86ed9bcac90b35228c83f6e05bfb2322d Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 29 Dec 2014 10:51:16 +0800 Subject: [PATCH 2/2] add comment --- cocos/3d/CCPlane.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos/3d/CCPlane.h b/cocos/3d/CCPlane.h index ad77ec5bb0..b94377250a 100755 --- a/cocos/3d/CCPlane.h +++ b/cocos/3d/CCPlane.h @@ -54,6 +54,10 @@ public: * create plane from normal and a point on plane. */ Plane(const Vec3& normal, const Vec3& point); + + /** + * create a default plan whose normal is (0, 0, 1), and _dist is 0, xoy plan in fact. + */ Plane(); /**