mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-06-05 11:24:17 +03:00
// implemented start and end time code
This commit is contained in:
parent
ccb708b8d3
commit
cf85781059
@ -36,6 +36,26 @@ namespace
|
|||||||
static Standard_GUID aGlobalFPSID("C7E7AF70-2FB3-40FD-BD38-CC79D9343D7A");
|
static Standard_GUID aGlobalFPSID("C7E7AF70-2FB3-40FD-BD38-CC79D9343D7A");
|
||||||
return aGlobalFPSID;
|
return aGlobalFPSID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetStartTimeCodeGUID
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
const Standard_GUID& GetStartTimeCodeGUID()
|
||||||
|
{
|
||||||
|
static Standard_GUID aStartTimeCodeGUID("379BC1C5-E9DA-4B57-9938-B2612158722A");
|
||||||
|
return aStartTimeCodeGUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetEndTimeCodeGUID
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
const Standard_GUID& GetEndTimeCodeGUID()
|
||||||
|
{
|
||||||
|
static Standard_GUID aEndTimeCodeGUID("EF5305A3-961D-48AE-9A78-AC744A110A26");
|
||||||
|
return aEndTimeCodeGUID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -147,6 +167,66 @@ void XCAFDoc_AnimationTool::SetGlobalFPS(const double theFPS) const
|
|||||||
TDataStd_Real::Set(BaseLabel(), GetGlobalFPSGUID(), theFPS);
|
TDataStd_Real::Set(BaseLabel(), GetGlobalFPSGUID(), theFPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetStartTimeCode
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool XCAFDoc_AnimationTool::GetStartTimeCode(double& theCode) const
|
||||||
|
{
|
||||||
|
Handle(TDataStd_Real) aCodeAttr;
|
||||||
|
if (BaseLabel().FindAttribute(GetStartTimeCodeGUID(), aCodeAttr))
|
||||||
|
{
|
||||||
|
theCode = aCodeAttr->Get();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : SetStartTimeCode
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void XCAFDoc_AnimationTool::SetStartTimeCode(const double theCode) const
|
||||||
|
{
|
||||||
|
Handle(TDataStd_Real) aCodeAttr;
|
||||||
|
if (BaseLabel().FindAttribute(GetStartTimeCodeGUID(), aCodeAttr))
|
||||||
|
{
|
||||||
|
aCodeAttr->Set(theCode);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TDataStd_Real::Set(BaseLabel(), GetStartTimeCodeGUID(), theCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetEndTimeCode
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool XCAFDoc_AnimationTool::GetEndTimeCode(double& theCode) const
|
||||||
|
{
|
||||||
|
Handle(TDataStd_Real) aCodeAttr;
|
||||||
|
if (BaseLabel().FindAttribute(GetEndTimeCodeGUID(), aCodeAttr))
|
||||||
|
{
|
||||||
|
theCode = aCodeAttr->Get();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : SetEndTimeCode
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void XCAFDoc_AnimationTool::SetEndTimeCode(const double theCode) const
|
||||||
|
{
|
||||||
|
Handle(TDataStd_Real) aCodeAttr;
|
||||||
|
if (BaseLabel().FindAttribute(GetEndTimeCodeGUID(), aCodeAttr))
|
||||||
|
{
|
||||||
|
aCodeAttr->Set(theCode);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TDataStd_Real::Set(BaseLabel(), GetEndTimeCodeGUID(), theCode);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GetAnimationLabels
|
//function : GetAnimationLabels
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -64,6 +64,18 @@ public:
|
|||||||
//!
|
//!
|
||||||
Standard_EXPORT void SetGlobalFPS(const double theFPS) const;
|
Standard_EXPORT void SetGlobalFPS(const double theFPS) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
Standard_EXPORT bool GetStartTimeCode(double& theCode) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
Standard_EXPORT void SetStartTimeCode(const double theCode) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
Standard_EXPORT bool GetEndTimeCode(double& theCode) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
Standard_EXPORT void SetEndTimeCode(const double theCode) const;
|
||||||
|
|
||||||
//! Returns a sequence of Animation labels currently stored
|
//! Returns a sequence of Animation labels currently stored
|
||||||
//! in the Animation table.
|
//! in the Animation table.
|
||||||
Standard_EXPORT void GetAnimationLabels(TDF_LabelSequence& theLabels) const;
|
Standard_EXPORT void GetAnimationLabels(TDF_LabelSequence& theLabels) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user