Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
MovableTrack.h
1// trax track library
2// AD 2025
3//
4// "the resolution of all the fruitless searches"
5//
6// Peter Gabriel
7//
8// Copyright (c) 2025 Trend Redaktions- und Verlagsgesellschaft mbH
9// Copyright (c) 2019 Marc-Michael Horstmann
10//
11// Permission is hereby granted to any person obtaining a copy of this software
12// and associated source code (the "Software"), to use, view, and study the
13// Software for personal or internal business purposes, subject to the following
14// conditions:
15//
16// 1. Redistribution, modification, sublicensing, or commercial use of the
17// Software is NOT permitted without prior written consent from the copyright
18// holder.
19//
20// 2. The Software is provided "AS IS", without warranty of any kind, express
21// or implied.
22//
23// 3. All copies of the Software must retain this license notice.
24//
25// For further information, please contact: horstmann.marc@trendverlag.de
26
27#pragma once
28
29#include "trax/Track.h"
30
31namespace trax{
32
33 struct Body;
34
35
37 struct MovableTrack : virtual TrackBuilder{
38
40 static dclspc std::shared_ptr<MovableTrack> Make() noexcept;
41
42
44 virtual void SetBody( std::shared_ptr<const Body> pBody ) noexcept = 0;
45
46
48 virtual std::shared_ptr<const Body> GetBody() const noexcept = 0;
49
50
52 virtual void UpdateTrackPose() = 0;
53
54
56 virtual bool IsMoving() const noexcept = 0;
57 };
58
59}
Home of the Track and TrackBuilder interfaces.
STL namespace.
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
A dynamic object in physical space.
Definition Body.h:44
Track that can get attached to a moving body.
Definition MovableTrack.h:37
virtual std::shared_ptr< const Body > GetBody() const noexcept=0
static dclspc std::shared_ptr< MovableTrack > Make() noexcept
Makes a MovableTrack object.
virtual void SetBody(std::shared_ptr< const Body > pBody) noexcept=0
Sets a body the track is attached to (if any).
virtual bool IsMoving() const noexcept=0
virtual void UpdateTrackPose()=0
Updates the track's position from the moving body.
Interface for making and shaping tracks.
Definition Track.h:831