OpenShot Library | libopenshot
0.3.3
|
Go to the documentation of this file.
14 #ifndef OPENSHOT_TRACKEDOBJECTBASE_H
15 #define OPENSHOT_TRACKEDOBJECTBASE_H
58 std::string
Id()
const {
return id; }
60 void Id(std::string _id) {
id = _id; }
71 virtual std::map<std::string, float>
GetBoxValues(int64_t frame_number)
const { std::map<std::string, float> ret;
return ret; };
73 virtual void AddBox(int64_t _frame_num,
float _cx,
float _cy,
float _width,
float _height,
float _angle) {
return; };
77 virtual std::string
Json()
const = 0;
78 virtual Json::Value
JsonValue()
const = 0;
79 virtual void SetJson(
const std::string value) = 0;
84 virtual Json::Value
PropertiesJSON(int64_t requested_frame)
const = 0;
void ParentClip(ClipBase *clip)
This namespace is the default namespace for all code in the openshot library.
virtual Json::Value PropertiesJSON(int64_t requested_frame) const =0
This abstract class is the base class of all Tracked Objects.
virtual void ScalePoints(double scale)
Scale an object's property.
virtual std::string Json() const =0
Get and Set JSON methods.
Json::Value add_property_choice_json(std::string name, int value, int selected_value) const
Generate JSON choice for a property (dropdown properties)
Header file for the Keyframe class.
virtual void SetJsonValue(const Json::Value root)=0
Load Json::Value into this object.
Keyframe draw_box
Keyframe to determine if a specific box is drawn (or hidden)
std::string Id() const
Get the id of this object.
virtual std::map< std::string, float > GetBoxValues(int64_t frame_number) const
Return the main properties of a TrackedObjectBBox instance - such as position, size and rotation.
Keyframe visible
Keyframe to track if a box is visible in the current frame (read-only)
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
virtual void SetJson(const std::string value)=0
Load JSON string into this object.
ClipBase * ParentClip() const
Get and set the parentClip of this object.
TrackedObjectBase()
Default constructor.
virtual bool ExactlyContains(int64_t frame_number) const
Check if there is data for the exact frame number.
void Id(std::string _id)
Set the id of this object.
virtual Json::Value JsonValue() const =0
Generate Json::Value for this object.
Header file for JSON class.
This abstract class is the base class, used by all clips in libopenshot.
virtual void AddBox(int64_t _frame_num, float _cx, float _cy, float _width, float _height, float _angle)
Add a bounding box to the tracked object's BoxVec map.
virtual ~TrackedObjectBase()=default
Destructor.