Add ModelTree::getModelAt

This commit is contained in:
Ryan Huffman 2014-07-09 04:14:47 -07:00
parent 874b542c0c
commit ade1903595
2 changed files with 6 additions and 0 deletions

View file

@ -108,6 +108,11 @@ bool FindAndUpdateModelOperator::PostRecursion(OctreeElement* element) {
return !_found; // if we haven't yet found it, keep looking
}
ModelTreeElement* ModelTree::getModelAt(float x, float y, float z, float s) const {
return static_cast<ModelTreeElement*>(getOctreeElementAt(x, y, z, s));
}
// TODO: improve this to not use multiple recursions
void ModelTree::storeModel(const ModelItem& model, const SharedNodePointer& senderNode) {
// First, look for the existing model in the tree..

View file

@ -36,6 +36,7 @@ public:
/// Type safe version of getRoot()
ModelTreeElement* getRoot() { return static_cast<ModelTreeElement*>(_rootElement); }
ModelTreeElement* getModelAt(float x, float y, float z, float s) const;
// These methods will allow the OctreeServer to send your tree inbound edit packets of your
// own definition. Implement these to allow your octree based server to support editing