vsg  1.1.0
VulkanSceneGraph library
DepthSorted.h
1 #pragma once
2 
3 /* <editor-fold desc="MIT License">
4 
5 Copyright(c) 2018 Robert Osfield
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8 
9 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10 
11 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12 
13 </editor-fold> */
14 
15 #include <vsg/maths/sphere.h>
16 #include <vsg/nodes/Node.h>
17 
18 namespace vsg
19 {
20 
26  class VSG_DECLSPEC DepthSorted : public Inherit<Node, DepthSorted>
27  {
28  public:
29  DepthSorted();
30 
31  DepthSorted(int32_t in_binNumber, const dsphere& in_bound, ref_ptr<Node> in_child);
32 
33  void traverse(Visitor& visitor) override { child->accept(visitor); }
34  void traverse(ConstVisitor& visitor) const override { child->accept(visitor); }
35  void traverse(RecordTraversal& visitor) const override { child->accept(visitor); }
36 
37  void read(Input& input) override;
38  void write(Output& output) const override;
39 
40  int32_t binNumber = 0;
41  dsphere bound;
42  ref_ptr<Node> child;
43 
44  protected:
45  virtual ~DepthSorted();
46  };
47  VSG_type_name(vsg::DepthSorted);
48 
49 } // namespace vsg
Definition: ConstVisitor.h:147
Definition: DepthSorted.h:27
Definition: Inherit.h:28
Definition: Input.h:44
Definition: Output.h:41
RecordTraversal traverses a scene graph doing view frustum culling and invoking state/commands to rec...
Definition: RecordTraversal.h:61
Definition: Visitor.h:147
Definition: ref_ptr.h:22