change: change code style to Linux style except indent.
This commit is contained in:
@@ -20,54 +20,59 @@
|
||||
|
||||
#include "timetarget.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
TimeTargetObject::TimeTargetObject() :
|
||||
time_target_(nullptr),
|
||||
path_index_(0)
|
||||
TimeTargetObject::TimeTargetObject()
|
||||
: time_target_(nullptr)
|
||||
, path_index_(0)
|
||||
{
|
||||
}
|
||||
|
||||
ViewerOutput *TimeTargetObject::GetTimeTarget() const
|
||||
{
|
||||
return time_target_;
|
||||
return time_target_;
|
||||
}
|
||||
|
||||
void TimeTargetObject::SetTimeTarget(ViewerOutput *target)
|
||||
{
|
||||
if (time_target_) {
|
||||
TimeTargetDisconnectEvent(time_target_);
|
||||
}
|
||||
if (time_target_) {
|
||||
TimeTargetDisconnectEvent(time_target_);
|
||||
}
|
||||
|
||||
time_target_ = target;
|
||||
TimeTargetChangedEvent(time_target_);
|
||||
time_target_ = target;
|
||||
TimeTargetChangedEvent(time_target_);
|
||||
|
||||
if (time_target_) {
|
||||
TimeTargetConnectEvent(time_target_);
|
||||
}
|
||||
if (time_target_) {
|
||||
TimeTargetConnectEvent(time_target_);
|
||||
}
|
||||
}
|
||||
|
||||
void TimeTargetObject::SetPathIndex(int index)
|
||||
{
|
||||
path_index_ = index;
|
||||
path_index_ = index;
|
||||
}
|
||||
|
||||
rational TimeTargetObject::GetAdjustedTime(Node* from, Node* to, const rational &r, Node::TransformTimeDirection dir) const
|
||||
rational
|
||||
TimeTargetObject::GetAdjustedTime(Node *from, Node *to, const rational &r,
|
||||
Node::TransformTimeDirection dir) const
|
||||
{
|
||||
if (!from || !to) {
|
||||
return r;
|
||||
}
|
||||
if (!from || !to) {
|
||||
return r;
|
||||
}
|
||||
|
||||
return GetAdjustedTime(from, to, TimeRange(r, r), dir).in();
|
||||
return GetAdjustedTime(from, to, TimeRange(r, r), dir).in();
|
||||
}
|
||||
|
||||
TimeRange TimeTargetObject::GetAdjustedTime(Node* from, Node* to, const TimeRange &r, Node::TransformTimeDirection dir) const
|
||||
TimeRange
|
||||
TimeTargetObject::GetAdjustedTime(Node *from, Node *to, const TimeRange &r,
|
||||
Node::TransformTimeDirection dir) const
|
||||
{
|
||||
if (!from || !to) {
|
||||
return r;
|
||||
}
|
||||
if (!from || !to) {
|
||||
return r;
|
||||
}
|
||||
|
||||
return from->TransformTimeTo(r, to, dir, path_index_);
|
||||
return from->TransformTimeTo(r, to, dir, path_index_);
|
||||
}
|
||||
|
||||
/*int TimeTargetObject::GetNumberOfPathAdjustments(Node* from, NodeParam::Type direction) const
|
||||
|
||||
@@ -23,33 +23,40 @@
|
||||
|
||||
#include "node/output/viewer/viewer.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
class TimeTargetObject
|
||||
namespace olive
|
||||
{
|
||||
|
||||
class TimeTargetObject {
|
||||
public:
|
||||
TimeTargetObject();
|
||||
TimeTargetObject();
|
||||
|
||||
ViewerOutput* GetTimeTarget() const;
|
||||
void SetTimeTarget(ViewerOutput* target);
|
||||
ViewerOutput *GetTimeTarget() const;
|
||||
void SetTimeTarget(ViewerOutput *target);
|
||||
|
||||
void SetPathIndex(int index);
|
||||
void SetPathIndex(int index);
|
||||
|
||||
rational GetAdjustedTime(Node* from, Node* to, const rational& r, Node::TransformTimeDirection dir) const;
|
||||
TimeRange GetAdjustedTime(Node* from, Node* to, const TimeRange& r, Node::TransformTimeDirection dir) const;
|
||||
rational GetAdjustedTime(Node *from, Node *to, const rational &r,
|
||||
Node::TransformTimeDirection dir) const;
|
||||
TimeRange GetAdjustedTime(Node *from, Node *to, const TimeRange &r,
|
||||
Node::TransformTimeDirection dir) const;
|
||||
|
||||
//int GetNumberOfPathAdjustments(Node* from, NodeParam::Type direction) const;
|
||||
//int GetNumberOfPathAdjustments(Node* from, NodeParam::Type direction) const;
|
||||
|
||||
protected:
|
||||
virtual void TimeTargetDisconnectEvent(ViewerOutput *){}
|
||||
virtual void TimeTargetChangedEvent(ViewerOutput *){}
|
||||
virtual void TimeTargetConnectEvent(ViewerOutput *){}
|
||||
virtual void TimeTargetDisconnectEvent(ViewerOutput *)
|
||||
{
|
||||
}
|
||||
virtual void TimeTargetChangedEvent(ViewerOutput *)
|
||||
{
|
||||
}
|
||||
virtual void TimeTargetConnectEvent(ViewerOutput *)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
ViewerOutput* time_target_;
|
||||
|
||||
int path_index_;
|
||||
ViewerOutput *time_target_;
|
||||
|
||||
int path_index_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user