Skip to content

Commit 7a3ac31

Browse files
committed
Renamed vsg::CameraAnimation to vsg::CameraAnimationHandler
1 parent cd7b7c8 commit 7a3ac31

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed

include/vsg/all.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,14 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
8585
#include <vsg/animation/Animation.h>
8686
#include <vsg/animation/AnimationGroup.h>
8787
#include <vsg/animation/AnimationManager.h>
88-
#include <vsg/animation/CameraAnimation.h>
88+
#include <vsg/animation/CameraAnimationHandler.h>
8989
#include <vsg/animation/CameraSampler.h>
9090
#include <vsg/animation/FindAnimations.h>
9191
#include <vsg/animation/Joint.h>
9292
#include <vsg/animation/JointSampler.h>
9393
#include <vsg/animation/MorphSampler.h>
9494
#include <vsg/animation/TransformSampler.h>
95+
#include <vsg/animation/time_value.h>
9596

9697
// Lighting header files
9798
#include <vsg/lighting/AmbientLight.h>

include/vsg/animation/CameraAnimation.h renamed to include/vsg/animation/CameraAnimationHandler.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ namespace vsg
2121
{
2222

2323
/// event handler for controlling the playing and recording of camera animation paths
24-
class VSG_DECLSPEC CameraAnimation : public Inherit<Visitor, CameraAnimation>
24+
class VSG_DECLSPEC CameraAnimationHandler : public Inherit<Visitor, CameraAnimationHandler>
2525
{
2626
public:
27-
CameraAnimation();
28-
CameraAnimation(ref_ptr<Object> in_object, ref_ptr<Animation> in_animation, const Path& in_filename = "saved_animation.vsgt", ref_ptr<Options> in_options = {});
29-
explicit CameraAnimation(ref_ptr<Object> in_object, const Path& in_filename = "saved_animation.vsgt", ref_ptr<Options> in_options = {});
27+
CameraAnimationHandler();
28+
CameraAnimationHandler(ref_ptr<Object> in_object, ref_ptr<Animation> in_animation, const Path& in_filename = "saved_animation.vsgt", ref_ptr<Options> in_options = {});
29+
explicit CameraAnimationHandler(ref_ptr<Object> in_object, const Path& in_filename = "saved_animation.vsgt", ref_ptr<Options> in_options = {});
3030

3131
/// object to track/modify
3232
ref_ptr<Object> object;
@@ -62,6 +62,9 @@ namespace vsg
6262

6363
protected:
6464
};
65-
VSG_type_name(vsg::CameraAnimation);
65+
VSG_type_name(vsg::CameraAnimationHandler);
66+
67+
// fallback for naming prior to VulkanSceneGraph-1.1.9.
68+
using CameraAnimation = vsg::CameraAnimationHandler;
6669

6770
} // namespace vsg

src/vsg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ set(SOURCES
199199
animation/Animation.cpp
200200
animation/AnimationGroup.cpp
201201
animation/AnimationManager.cpp
202-
animation/CameraAnimation.cpp
202+
animation/CameraAnimationHandler.cpp
203203
animation/FindAnimations.cpp
204204
animation/Joint.cpp
205205
animation/JointSampler.cpp

src/vsg/animation/CameraAnimation.cpp renamed to src/vsg/animation/CameraAnimationHandler.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
1010
1111
</editor-fold> */
1212

13-
#include <vsg/animation/CameraAnimation.h>
13+
#include <vsg/animation/CameraAnimationHandler.h>
1414
#include <vsg/animation/TransformSampler.h>
1515
#include <vsg/app/Camera.h>
1616
#include <vsg/io/Logger.h>
@@ -23,11 +23,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
2323

2424
using namespace vsg;
2525

26-
CameraAnimation::CameraAnimation()
26+
CameraAnimationHandler::CameraAnimationHandler()
2727
{
2828
}
2929

30-
CameraAnimation::CameraAnimation(ref_ptr<Object> in_object, const Path& in_filename, ref_ptr<Options> in_options) :
30+
CameraAnimationHandler::CameraAnimationHandler(ref_ptr<Object> in_object, const Path& in_filename, ref_ptr<Options> in_options) :
3131
object(in_object),
3232
filename(in_filename),
3333
options(in_options)
@@ -87,7 +87,7 @@ CameraAnimation::CameraAnimation(ref_ptr<Object> in_object, const Path& in_filen
8787
}
8888
}
8989

90-
CameraAnimation::CameraAnimation(ref_ptr<Object> in_object, ref_ptr<Animation> in_animation, const Path& in_filename, ref_ptr<Options> in_options) :
90+
CameraAnimationHandler::CameraAnimationHandler(ref_ptr<Object> in_object, ref_ptr<Animation> in_animation, const Path& in_filename, ref_ptr<Options> in_options) :
9191
object(in_object),
9292
filename(in_filename),
9393
options(in_options),
@@ -107,9 +107,9 @@ CameraAnimation::CameraAnimation(ref_ptr<Object> in_object, ref_ptr<Animation> i
107107
}
108108
}
109109

110-
void CameraAnimation::apply(Camera& camera)
110+
void CameraAnimationHandler::apply(Camera& camera)
111111
{
112-
info("CameraAnimation::apply(Camera& camera) ", cameraSampler);
112+
info("CameraAnimationHandler::apply(Camera& camera) ", cameraSampler);
113113

114114
if (cameraSampler)
115115
{
@@ -127,7 +127,7 @@ void CameraAnimation::apply(Camera& camera)
127127
}
128128
}
129129

130-
void CameraAnimation::apply(MatrixTransform& transform)
130+
void CameraAnimationHandler::apply(MatrixTransform& transform)
131131
{
132132
if (cameraSampler)
133133
{
@@ -143,15 +143,15 @@ void CameraAnimation::apply(MatrixTransform& transform)
143143
}
144144
}
145145

146-
void CameraAnimation::play()
146+
void CameraAnimationHandler::play()
147147
{
148148
if (playing) return;
149149

150150
playing = animation->start(simulationTime);
151151
if (playing) info("Starting playback.");
152152
}
153153

154-
void CameraAnimation::record()
154+
void CameraAnimationHandler::record()
155155
{
156156
if (recording) return;
157157

@@ -181,7 +181,7 @@ void CameraAnimation::record()
181181
}
182182
}
183183

184-
void CameraAnimation::stop()
184+
void CameraAnimationHandler::stop()
185185
{
186186
if (playing)
187187
{
@@ -205,7 +205,7 @@ void CameraAnimation::stop()
205205
}
206206
}
207207

208-
void CameraAnimation::apply(KeyPressEvent& keyPress)
208+
void CameraAnimationHandler::apply(KeyPressEvent& keyPress)
209209
{
210210
if (keyPress.keyModified == togglePlaybackKey)
211211
{
@@ -235,7 +235,7 @@ void CameraAnimation::apply(KeyPressEvent& keyPress)
235235
}
236236
}
237237

238-
void CameraAnimation::apply(FrameEvent& frame)
238+
void CameraAnimationHandler::apply(FrameEvent& frame)
239239
{
240240
simulationTime = frame.frameStamp->simulationTime;
241241

0 commit comments

Comments
 (0)