ECF 1.5
Node.cpp
1#include "../ECF_base.h"
2#include "Node.h"
3#include <iostream>
4
5
6namespace Tree
7{
8
9Node::Node(void)
10{
11 size_ = 1;
12}
13
14
19Node::Node(NodeP node)
20{
21 size_ = node->size_;
22 depth_ = node->depth_;
23 primitive_ = node->primitive_->copyWithNode(node->primitive_);
24}
25
26
31Node::Node(PrimitiveP primitive)
32{
33 primitive_ = primitive->copyWithNode(primitive);
34 size_ = 1;
35}
36
37
38Node::~Node(void)
39{ }
40
41
46void Node::setPrimitive(PrimitiveP primitive)
47{
48 primitive_ = primitive->assignToNode(primitive);
49}
50
51}
void setPrimitive(PrimitiveP primitive)
Set the primitive this node points to (when creating a new tree node). In case of an ephemereal rando...
Definition: Node.cpp:46
PrimitiveP primitive_
pointer to the Primitive belonging to this node
Definition: Node.h:30
uint size_
size of the subtree of this node (including the node)
Definition: Node.h:28
uint depth_
depth of this node
Definition: Node.h:29
Definition: nodes.h:92