3 #include <SAHKDTreeFactory.h>
50 friend class boost::serialization::access;
59 template <
typename Archive>
60 void serialize(Archive &ar,
unsigned int const version){
61 boost::serialization::void_cast_register<
65 ar &boost::serialization::base_object<SAHKDTreeFactory>(*
this);
108 vector<Primitive *> &primitives
130 vector<Primitive *> &primitives,
132 vector<Primitive *> &primitives,
137 size_t const lossCases,
138 vector<size_t> &cForward,
139 vector<size_t> &cBackward
Class providing building methods for k-dimensional trees with a fast strategy to approximate Surface ...
Definition: FastSAHKDTreeFactory.h:42
void _clone(KDTreeFactory *kdtf) const override
Assign attributes from FastSAHKDTreeFactory to its clone.
Definition: FastSAHKDTreeFactory.cpp:23
double co
Cost-weight for testing an object for intersection.
Definition: SAHKDTreeFactory.h:181
virtual double findSplitPositionByFastSAHRecipe(KDTreeNode *node, vector< Primitive * > &primitives, std::function< void(vector< Primitive * > &primitives, int const splitAxis, double const minp, double const deltap, size_t const lossNodes, size_t const lossCases, vector< size_t > &cForward, vector< size_t > &cBackward)> f_recount) const
The recipe for finding split position by Fast-SAH algorithm. It is meant to be used by the FastSAHKDT...
Definition: FastSAHKDTreeFactory.cpp:77
void serialize(Archive &ar, unsigned int const version)
Serialize a fast surface area heuristic KDTree factory to a stream of bytes.
Definition: FastSAHKDTreeFactory.h:60
double ci
Cost-weight for traversing interior nodes.
Definition: SAHKDTreeFactory.h:171
size_t lossNodes
How many loss nodes must be computed when optimizing the loss function to determine the best split p...
Definition: SAHKDTreeFactory.h:166
KDTreeFactory * clone() const override
Definition: FastSAHKDTreeFactory.cpp:15
FastSAHKDTreeFactory(size_t const lossNodes=32, double const ci=1, double const cl=1, double const co=1)
Fast surface area heuristic KDTree factory default constructor.
Definition: FastSAHKDTreeFactory.cpp:5
double findSplitPositionBySAH(KDTreeNode *node, vector< Primitive * > &primitives) const override
Find the best split position using an min-max like approximation for the loss function of Surface Are...
Definition: FastSAHKDTreeFactory.cpp:29
double cl
Cost-weight for traversing leaf nodes.
Definition: SAHKDTreeFactory.h:176
Class that must be extended by any class which provides factory methods for k-dimensional trees....
Definition: KDTreeFactory.h:22
Class representing a KDTree node.
Definition: KDTreeNode.h:9
Class providing building methods for k-dimensional trees with surface area heuristic (SAH)
Definition: SAHKDTreeFactory.h:126
double co
Cost-weight for testing an object for intersection.
Definition: SAHKDTreeFactory.h:181
double ci
Cost-weight for traversing interior nodes.
Definition: SAHKDTreeFactory.h:171
size_t lossNodes
How many loss nodes must be computed when optimizing the loss function to determine the best split p...
Definition: SAHKDTreeFactory.h:166
double cl
Cost-weight for traversing leaf nodes.
Definition: SAHKDTreeFactory.h:176