Skip to content

Commit

Permalink
Tweak igroupnode.h header
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Mar 29, 2017
1 parent b78a1d0 commit 35091a3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions include/igroupnode.h
@@ -1,19 +1,21 @@
#ifndef IGROUPNODE_H_
#define IGROUPNODE_H_
#pragma once

#include "inode.h"

namespace scene {
namespace scene
{

/** greebo: This is used to identify group entities right before
* and after map save/load.
*
* It provides methods to add/substract the origin to/from
* their child primitives.
*/
class GroupNode {
class GroupNode
{
public:
virtual ~GroupNode() {}

/** greebo: This is called right before saving
* to move the child brushes of the Doom3Group
* according to its origin.
Expand All @@ -27,10 +29,9 @@ typedef std::shared_ptr<GroupNode> GroupNodePtr;

/** greebo: Cast a node onto a GroupNode pointer
*
* @returns: NULL, if failed, the pointer to the class otherwise.
* @returns: an empty pointer on failure, the pointer to the class otherwise.
*/
inline scene::GroupNodePtr Node_getGroupNode(scene::INodePtr node) {
inline scene::GroupNodePtr Node_getGroupNode(const scene::INodePtr& node)
{
return std::dynamic_pointer_cast<scene::GroupNode>(node);
}

#endif /*IGROUPNODE_H_*/

0 comments on commit 35091a3

Please sign in to comment.