-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Use KX_GameObject directly instead of KX_CullingNode.
KX_CullingNode is not interesting as is goal was just to offer a pointer to the game object using it and the SG_CullingNode API. This class can be replaced by KX_GameObject in KX_CullingHandler which still get the culling node, but this time only SG_CullingNode.
- Loading branch information
1 parent
d45086e
commit 5577969
Showing
12 changed files
with
61 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
#ifndef __KX_CULLING_HANDLER_H__ | ||
#define __KX_CULLING_HANDLER_H__ | ||
|
||
#include "KX_CullingNode.h" | ||
#include "SG_Frustum.h" | ||
#include <vector> | ||
|
||
class KX_GameObject; | ||
|
||
class KX_CullingHandler | ||
{ | ||
private: | ||
/// List of all nodes to render after the culling pass. | ||
KX_CullingNodeList& m_activeNodes; | ||
/// List of all objects to render after the culling pass. | ||
std::vector<KX_GameObject *>& m_activeObjects; | ||
/// The camera frustum data. | ||
const SG_Frustum& m_frustum; | ||
|
||
public: | ||
KX_CullingHandler(KX_CullingNodeList& nodes, const SG_Frustum& frustum); | ||
KX_CullingHandler(std::vector<KX_GameObject *>& objects, const SG_Frustum& frustum); | ||
~KX_CullingHandler() = default; | ||
|
||
/** Process the culling of a new node, if the culling succeeded the | ||
* node is added in m_activeNodes. | ||
/** Process the culling of a new object, if the culling succeeded the | ||
* object is added in m_activeObjects. | ||
*/ | ||
void Process(KX_CullingNode *node); | ||
void Process(KX_GameObject *object); | ||
}; | ||
|
||
#endif // __KX_CULLING_HANDLER_H__ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.