vsg 1.1.3
VulkanSceneGraph library
Loading...
Searching...
No Matches
FindDynamicObjects.h
1#pragma once
2
3/* <editor-fold desc="MIT License">
4
5Copyright(c) 2024 Robert Osfield
6
7Permission 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
9The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
11THE 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/core/ConstVisitor.h>
16#include <vsg/core/Inherit.h>
17
18#include <stack>
19
20namespace vsg
21{
22
24 class VSG_DECLSPEC FindDynamicObjects : public Inherit<ConstVisitor, FindDynamicObjects>
25 {
26 public:
27 std::set<const Object*> dynamicObjects;
28
29 inline void tag(const Object* object)
30 {
31 dynamicObjects.insert(object);
32 }
33
34 inline bool tagged(const Object* object)
35 {
36 return dynamicObjects.count(object) != 0;
37 }
38
39 protected:
40 void apply(const Object& object) override;
41 void apply(const Data& data) override;
42 void apply(const AnimationGroup& ag) override;
43 void apply(const Animation& animation) override;
44 void apply(const AnimationSampler& sampler) override;
45 void apply(const TransformSampler& sampler) override;
46 void apply(const MorphSampler& sampler) override;
47 void apply(const JointSampler& sampler) override;
48 void apply(const BufferInfo& info) override;
49 void apply(const Image& image) override;
50 void apply(const ImageView& imageView) override;
51 void apply(const ImageInfo& info) override;
52 void apply(const DescriptorBuffer& db) override;
53 void apply(const DescriptorImage& di) override;
54 void apply(const BindIndexBuffer& bib) override;
55 void apply(const BindVertexBuffers& bvb) override;
56 void apply(const VertexDraw& vd) override;
57 void apply(const VertexIndexDraw& vid) override;
58 void apply(const Geometry& geom) override;
59 };
60 VSG_type_name(FindDynamicObjects);
61
62} // namespace vsg
AnimationGroup node provides a list of child nodes and a list of animations to animate them.
Definition AnimationGroup.h:24
Animation class that controls a single animation made up of one more samplers.
Definition Animation.h:44
Base class for animation samplers that sample animation data and set associated scene graph objects.
Definition Animation.h:24
BindIndexBuffer command encapsulates vkCmdBindIndexBuffer call and associated settings.
Definition BindIndexBuffer.h:28
BindVertexBuffers command encapsulates vkCmdBindVertexBuffers call and associated settings.
Definition BindVertexBuffers.h:25
BufferInfo encapsulates the settings that map to VkDescriptorBufferInfo.
Definition BufferInfo.h:27
Definition Data.h:110
Definition DescriptorBuffer.h:24
Definition DescriptorImage.h:24
Find all the objects that should be treated as dynamic (their values change.)
Definition FindDynamicObjects.h:25
Definition Geometry.h:30
Image class encapsulates VkImage and VkImageCreateInfo settings used to set it up.
Definition Image.h:25
ImageInfo class provides the VkDescriptorImageInfo settings used when setting up vsg::/vkDescriptorIm...
Definition ImageInfo.h:23
ImageView class encapsulates VkImageView and VkImageViewCreateInfo settings used to set it up.
Definition ImageView.h:25
Definition Inherit.h:28
Animation sampler for acumulating vsg::Joint hierarchies and assigned accumulated transform matrices ...
Definition JointSampler.h:23
Animation sampler for morphing geometry, implementation not yet completed.
Definition MorphSampler.h:48
Definition Object.h:60
Animation sampler for sampling position, rotation and scale keyframes for setting transforms/joints.
Definition TransformSampler.h:82
Definition VertexDraw.h:25
Definition VertexIndexDraw.h:25