2016-01-02 21:14:14 +01:00
|
|
|
/* Copyright (C) 2016 Wildfire Games.
|
2009-04-18 19:00:33 +02:00
|
|
|
* This file is part of 0 A.D.
|
|
|
|
*
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2006-04-24 01:14:18 +02:00
|
|
|
#include "precompiled.h"
|
2015-12-30 22:16:35 +01:00
|
|
|
|
|
|
|
#include "CinemaPath.h"
|
|
|
|
|
2006-04-24 01:14:18 +02:00
|
|
|
#include <sstream>
|
2016-01-02 21:14:14 +01:00
|
|
|
#include <string>
|
2015-12-30 22:16:35 +01:00
|
|
|
|
2016-01-02 21:14:14 +01:00
|
|
|
#include "Camera.h"
|
2016-01-03 13:41:04 +01:00
|
|
|
#include "CinemaManager.h"
|
2006-04-24 01:14:18 +02:00
|
|
|
#include "GameView.h"
|
2016-01-03 13:41:04 +01:00
|
|
|
#include "gui/CGUI.h"
|
|
|
|
#include "gui/GUIManager.h"
|
|
|
|
#include "gui/IGUIObject.h"
|
2016-01-02 21:14:14 +01:00
|
|
|
#include "lib/ogl.h"
|
2006-06-02 04:10:27 +02:00
|
|
|
#include "maths/MathUtil.h"
|
2016-01-02 21:14:14 +01:00
|
|
|
#include "maths/Quaternion.h"
|
2006-06-02 04:10:27 +02:00
|
|
|
#include "maths/Vector3D.h"
|
|
|
|
#include "maths/Vector4D.h"
|
2016-01-03 13:41:04 +01:00
|
|
|
#include "ps/CLogger.h"
|
2016-01-02 21:14:14 +01:00
|
|
|
#include "ps/CStr.h"
|
|
|
|
#include "ps/Game.h"
|
2016-01-03 13:41:04 +01:00
|
|
|
#include "renderer/Renderer.h"
|
2016-01-02 21:14:14 +01:00
|
|
|
|
2006-04-24 01:14:18 +02:00
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
CCinemaPath::CCinemaPath(const CCinemaData& data, const TNSpline& spline, const TNSpline& targetSpline)
|
|
|
|
: CCinemaData(data), TNSpline(spline), m_TargetSpline(targetSpline), m_TimeElapsed(0.f)
|
|
|
|
{
|
2007-02-27 03:14:18 +01:00
|
|
|
m_TimeElapsed = 0;
|
2016-04-04 22:31:18 +02:00
|
|
|
|
|
|
|
// Calculate curves by nodes
|
2007-02-27 03:14:18 +01:00
|
|
|
BuildSpline();
|
2016-04-04 22:31:18 +02:00
|
|
|
m_TargetSpline.BuildSpline();
|
2007-02-27 03:14:18 +01:00
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
if (m_Orientation == L"target")
|
2007-02-27 03:14:18 +01:00
|
|
|
{
|
2016-01-03 13:41:04 +01:00
|
|
|
m_LookAtTarget = true;
|
|
|
|
ENSURE(!m_TargetSpline.GetAllNodes().empty());
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set distortion mode and style
|
|
|
|
if (data.m_Mode == L"ease_in")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistModePtr = &CCinemaPath::EaseIn;
|
2016-01-03 13:41:04 +01:00
|
|
|
else if (data.m_Mode == L"ease_out")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistModePtr = &CCinemaPath::EaseOut;
|
2016-01-03 13:41:04 +01:00
|
|
|
else if (data.m_Mode == L"ease_inout")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistModePtr = &CCinemaPath::EaseInOut;
|
2016-01-03 13:41:04 +01:00
|
|
|
else if (data.m_Mode == L"ease_outin")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistModePtr = &CCinemaPath::EaseOutIn;
|
2016-01-03 13:41:04 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
LOGWARNING("Cinematic mode not found for '%s'", data.m_Mode.ToUTF8().c_str());
|
|
|
|
DistModePtr = &CCinemaPath::EaseInOut;
|
2007-02-27 03:14:18 +01:00
|
|
|
}
|
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
if (data.m_Style == L"default")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistStylePtr = &CCinemaPath::EaseDefault;
|
2016-01-03 13:41:04 +01:00
|
|
|
else if (data.m_Style == L"growth")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistStylePtr = &CCinemaPath::EaseGrowth;
|
2016-01-03 13:41:04 +01:00
|
|
|
else if (data.m_Style == L"expo")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistStylePtr = &CCinemaPath::EaseExpo;
|
2016-01-03 13:41:04 +01:00
|
|
|
else if (data.m_Style == L"circle")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistStylePtr = &CCinemaPath::EaseCircle;
|
2016-01-03 13:41:04 +01:00
|
|
|
else if (data.m_Style == L"sine")
|
2007-02-27 03:14:18 +01:00
|
|
|
DistStylePtr = &CCinemaPath::EaseSine;
|
2016-01-03 13:41:04 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
LOGWARNING("Cinematic style not found for '%s'", data.m_Style.ToUTF8().c_str());
|
|
|
|
DistStylePtr = &CCinemaPath::EaseDefault;
|
2007-02-27 03:14:18 +01:00
|
|
|
}
|
2006-04-24 01:14:18 +02:00
|
|
|
}
|
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
void CCinemaPath::Draw() const
|
|
|
|
{
|
|
|
|
DrawSpline(*this, CVector4D(0.2f, 0.2f, 1.f, 0.5f), 100, true);
|
2016-04-17 17:43:29 +02:00
|
|
|
DrawNodes(*this, CVector4D(0.5f, 1.0f, 0.f, 0.5f));
|
|
|
|
|
|
|
|
if (!m_LookAtTarget)
|
|
|
|
return;
|
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
DrawSpline(m_TargetSpline, CVector4D(1.0f, 0.2f, 0.2f, 0.5f), 100, true);
|
2016-04-17 17:43:29 +02:00
|
|
|
DrawNodes(m_TargetSpline, CVector4D(1.0f, 0.5f, 0.f, 0.5f));
|
2016-01-03 13:41:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CCinemaPath::DrawSpline(const RNSpline& spline, const CVector4D& RGBA, int smoothness, bool lines) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
2016-01-03 13:41:04 +01:00
|
|
|
if (spline.NodeCount < 2 || DistModePtr == NULL)
|
2006-04-24 01:14:18 +02:00
|
|
|
return;
|
2016-01-03 13:41:04 +01:00
|
|
|
if (spline.NodeCount == 2 && lines)
|
2006-08-22 04:24:44 +02:00
|
|
|
smoothness = 2;
|
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
float start = spline.MaxDistance.ToFloat() / smoothness;
|
2016-01-02 21:14:14 +01:00
|
|
|
float time = 0;
|
|
|
|
|
2012-02-13 15:02:14 +01:00
|
|
|
#if CONFIG2_GLES
|
2016-01-02 21:14:14 +01:00
|
|
|
#warning TODO: do something about CCinemaPath on GLES
|
2012-02-13 15:02:14 +01:00
|
|
|
#else
|
|
|
|
|
2016-01-02 21:14:14 +01:00
|
|
|
glColor4f(RGBA.X, RGBA.Y, RGBA.Z, RGBA.W);
|
|
|
|
if (lines)
|
|
|
|
{
|
2006-08-22 04:24:44 +02:00
|
|
|
glLineWidth(1.8f);
|
|
|
|
glEnable(GL_LINE_SMOOTH);
|
|
|
|
glBegin(GL_LINE_STRIP);
|
|
|
|
|
2016-01-02 21:14:14 +01:00
|
|
|
for (int i = 0; i <= smoothness; ++i)
|
2006-08-22 04:24:44 +02:00
|
|
|
{
|
2016-01-02 21:14:14 +01:00
|
|
|
// Find distorted time
|
2016-01-03 13:41:04 +01:00
|
|
|
time = start*i / spline.MaxDistance.ToFloat();
|
|
|
|
CVector3D tmp = spline.GetPosition(time);
|
2016-01-02 21:14:14 +01:00
|
|
|
glVertex3f(tmp.X, tmp.Y, tmp.Z);
|
2006-08-22 04:24:44 +02:00
|
|
|
}
|
|
|
|
glEnd();
|
|
|
|
glDisable(GL_LINE_SMOOTH);
|
|
|
|
glLineWidth(1.0f);
|
2006-04-24 01:14:18 +02:00
|
|
|
}
|
2006-08-22 04:24:44 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
smoothness /= 2;
|
2016-01-03 13:41:04 +01:00
|
|
|
start = spline.MaxDistance.ToFloat() / smoothness;
|
2006-08-22 04:24:44 +02:00
|
|
|
glEnable(GL_POINT_SMOOTH);
|
|
|
|
glPointSize(3.0f);
|
|
|
|
glBegin(GL_POINTS);
|
|
|
|
|
2016-01-02 21:14:14 +01:00
|
|
|
for (int i = 0; i <= smoothness; ++i)
|
2006-08-22 04:24:44 +02:00
|
|
|
{
|
2016-01-02 21:14:14 +01:00
|
|
|
// Find distorted time
|
2016-01-03 13:41:04 +01:00
|
|
|
time = (this->*DistModePtr)(start*i / spline.MaxDistance.ToFloat());
|
|
|
|
CVector3D tmp = spline.GetPosition(time);
|
2016-01-02 21:14:14 +01:00
|
|
|
glVertex3f(tmp.X, tmp.Y, tmp.Z);
|
2006-08-22 04:24:44 +02:00
|
|
|
}
|
2016-01-02 21:14:14 +01:00
|
|
|
glColor3f(1.0f, 1.0f, 0.0f); // yellow
|
2006-04-24 01:14:18 +02:00
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
for (size_t i = 0; i < spline.GetAllNodes().size(); ++i)
|
|
|
|
glVertex3f(
|
|
|
|
spline.GetAllNodes()[i].Position.X.ToFloat(),
|
|
|
|
spline.GetAllNodes()[i].Position.Y.ToFloat(),
|
|
|
|
spline.GetAllNodes()[i].Position.Z.ToFloat()
|
|
|
|
);
|
2006-08-22 04:24:44 +02:00
|
|
|
|
|
|
|
glEnd();
|
|
|
|
glPointSize(1.0f);
|
|
|
|
glDisable(GL_POINT_SMOOTH);
|
|
|
|
}
|
2012-02-13 15:02:14 +01:00
|
|
|
|
|
|
|
#endif
|
2006-04-24 01:14:18 +02:00
|
|
|
}
|
2012-02-13 15:02:14 +01:00
|
|
|
|
2016-04-17 17:43:29 +02:00
|
|
|
void CCinemaPath::DrawNodes(const RNSpline& spline, const CVector4D& RGBA) const
|
2016-01-03 13:41:04 +01:00
|
|
|
{
|
|
|
|
#if CONFIG2_GLES
|
|
|
|
#warning TODO : do something about CCinemaPath on GLES
|
|
|
|
#else
|
|
|
|
glEnable(GL_POINT_SMOOTH);
|
|
|
|
glPointSize(5.0f);
|
|
|
|
|
|
|
|
glColor4f(RGBA.X, RGBA.Y, RGBA.Z, RGBA.W);
|
|
|
|
glBegin(GL_POINTS);
|
2016-04-17 17:43:29 +02:00
|
|
|
const std::vector<SplineData> nodes = spline.GetAllNodes();
|
|
|
|
for (size_t i = 0; i < nodes.size(); ++i)
|
|
|
|
glVertex3f(nodes[i].Position.X.ToFloat(), nodes[i].Position.Y.ToFloat(), nodes[i].Position.Z.ToFloat());
|
2016-01-03 13:41:04 +01:00
|
|
|
glEnd();
|
|
|
|
|
|
|
|
glPointSize(1.0f);
|
|
|
|
glDisable(GL_POINT_SMOOTH);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2016-04-07 19:47:30 +02:00
|
|
|
CVector3D CCinemaPath::GetNodePosition(const int index) const
|
|
|
|
{
|
|
|
|
return Node[index].Position;
|
|
|
|
}
|
|
|
|
|
|
|
|
fixed CCinemaPath::GetNodeDuration(const int index) const
|
|
|
|
{
|
|
|
|
return Node[index].Distance;
|
|
|
|
}
|
|
|
|
|
|
|
|
fixed CCinemaPath::GetDuration() const
|
|
|
|
{
|
|
|
|
return MaxDistance;
|
|
|
|
}
|
|
|
|
|
|
|
|
float CCinemaPath::GetNodeFraction() const
|
|
|
|
{
|
|
|
|
return (m_TimeElapsed - m_PreviousNodeTime) / Node[m_CurrentNode].Distance.ToFloat();
|
|
|
|
}
|
|
|
|
|
|
|
|
float CCinemaPath::GetElapsedTime() const
|
|
|
|
{
|
|
|
|
return m_TimeElapsed;
|
|
|
|
}
|
|
|
|
|
|
|
|
CStrW CCinemaPath::GetName() const
|
|
|
|
{
|
|
|
|
return m_Name;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CCinemaPath::SetTimescale(fixed scale)
|
|
|
|
{
|
|
|
|
m_Timescale = scale;
|
|
|
|
}
|
|
|
|
|
2007-02-27 03:14:18 +01:00
|
|
|
void CCinemaPath::MoveToPointAt(float t, float nodet, const CVector3D& startRotation)
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
2016-01-03 13:41:04 +01:00
|
|
|
CCamera *camera = g_Game->GetView()->GetCamera();
|
2006-04-24 01:14:18 +02:00
|
|
|
t = (this->*DistModePtr)(t);
|
2016-01-03 13:41:04 +01:00
|
|
|
|
2006-07-06 05:17:44 +02:00
|
|
|
CVector3D pos = GetPosition(t);
|
2016-01-03 13:41:04 +01:00
|
|
|
|
|
|
|
if (m_LookAtTarget)
|
|
|
|
{
|
|
|
|
if (m_TimeElapsed <= m_TargetSpline.MaxDistance.ToFloat())
|
|
|
|
camera->LookAt(pos, m_TargetSpline.GetPosition(m_TimeElapsed / m_TargetSpline.MaxDistance.ToFloat()), CVector3D(0, 1, 0));
|
|
|
|
else
|
|
|
|
camera->LookAt(pos, m_TargetSpline.GetAllNodes().back().Position, CVector3D(0, 1, 0));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
CVector3D nodeRotation = Node[m_CurrentNode + 1].Rotation;
|
|
|
|
CQuaternion start, end;
|
|
|
|
start.FromEulerAngles(DEGTORAD(startRotation.X), DEGTORAD(startRotation.Y), DEGTORAD(startRotation.Z));
|
|
|
|
end.FromEulerAngles(DEGTORAD(nodeRotation.X), DEGTORAD(nodeRotation.Y), DEGTORAD(nodeRotation.Z));
|
|
|
|
start.Slerp(start, end, nodet);
|
|
|
|
|
|
|
|
camera->m_Orientation.SetIdentity();
|
|
|
|
camera->m_Orientation.Rotate(start);
|
|
|
|
camera->m_Orientation.Translate(pos);
|
|
|
|
}
|
|
|
|
camera->UpdateFrustum();
|
2006-04-24 01:14:18 +02:00
|
|
|
}
|
|
|
|
|
2016-01-02 21:14:14 +01:00
|
|
|
// Distortion mode functions
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseIn(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
|
|
|
return (this->*DistStylePtr)(t);
|
|
|
|
}
|
2016-01-02 21:14:14 +01:00
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseOut(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
|
|
|
return 1.0f - EaseIn(1.0f-t);
|
|
|
|
}
|
2016-01-02 21:14:14 +01:00
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseInOut(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
|
|
|
if (t < m_Switch)
|
|
|
|
return EaseIn(1.0f/m_Switch * t) * m_Switch;
|
|
|
|
return EaseOut(1.0f/m_Switch * (t-m_Switch)) * m_Switch + m_Switch;
|
|
|
|
}
|
2016-01-02 21:14:14 +01:00
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseOutIn(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
|
|
|
if (t < m_Switch)
|
|
|
|
return EaseOut(1.0f/m_Switch * t) * m_Switch;
|
|
|
|
return EaseIn(1.0f/m_Switch * (t-m_Switch)) * m_Switch + m_Switch;
|
|
|
|
}
|
|
|
|
|
2016-01-02 21:14:14 +01:00
|
|
|
// Distortion style functions
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseDefault(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
|
|
|
return t;
|
|
|
|
}
|
2016-01-02 21:14:14 +01:00
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseGrowth(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
|
|
|
return pow(t, m_Growth);
|
|
|
|
}
|
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseExpo(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
2016-01-02 21:14:14 +01:00
|
|
|
if (t == 0)
|
2006-04-24 01:14:18 +02:00
|
|
|
return t;
|
2016-01-02 21:14:14 +01:00
|
|
|
return powf(m_Growth, 10*(t-1.0f));
|
2006-04-24 01:14:18 +02:00
|
|
|
}
|
2016-01-02 21:14:14 +01:00
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseCircle(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
2016-01-02 21:14:14 +01:00
|
|
|
t = -(sqrt(1.0f - t*t) - 1.0f);
|
|
|
|
if (m_GrowthCount > 1.0f)
|
|
|
|
{
|
|
|
|
--m_GrowthCount;
|
|
|
|
return (this->*DistStylePtr)(t);
|
|
|
|
}
|
|
|
|
return t;
|
2006-04-24 01:14:18 +02:00
|
|
|
}
|
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
float CCinemaPath::EaseSine(float t) const
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
2016-01-02 21:14:14 +01:00
|
|
|
t = 1.0f - cos(t * (float)M_PI/2);
|
|
|
|
if (m_GrowthCount > 1.0f)
|
|
|
|
{
|
|
|
|
--m_GrowthCount;
|
|
|
|
return (this->*DistStylePtr)(t);
|
|
|
|
}
|
|
|
|
return t;
|
2006-04-24 01:14:18 +02:00
|
|
|
}
|
|
|
|
|
2016-04-07 19:47:30 +02:00
|
|
|
const CCinemaData* CCinemaPath::GetData() const
|
|
|
|
{
|
|
|
|
return CCinemaData::GetData();
|
|
|
|
}
|
|
|
|
|
2007-02-27 03:14:18 +01:00
|
|
|
bool CCinemaPath::Validate()
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
2016-01-03 13:41:04 +01:00
|
|
|
if (m_TimeElapsed > GetDuration().ToFloat() || m_TimeElapsed < 0.0f)
|
2016-01-02 21:14:14 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// Find current node and past "node time"
|
|
|
|
float previousTime = 0.0f, cumulation = 0.0f;
|
|
|
|
|
|
|
|
// Ignore the last node, since it is a blank (node time values are shifted down one from interface)
|
|
|
|
for (size_t i = 0; i < Node.size() - 1; ++i)
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
2016-01-03 13:41:04 +01:00
|
|
|
cumulation += Node[i].Distance.ToFloat();
|
2016-01-02 21:14:14 +01:00
|
|
|
if (m_TimeElapsed <= cumulation)
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
2016-01-02 21:14:14 +01:00
|
|
|
m_PreviousNodeTime = previousTime;
|
|
|
|
m_PreviousRotation = Node[i].Rotation;
|
|
|
|
m_CurrentNode = i; // We're moving toward this next node, so use its rotation
|
|
|
|
return true;
|
2006-07-06 05:17:44 +02:00
|
|
|
}
|
2016-01-03 13:41:04 +01:00
|
|
|
previousTime += Node[i].Distance.ToFloat();
|
2007-02-27 03:14:18 +01:00
|
|
|
}
|
2016-01-03 13:41:04 +01:00
|
|
|
debug_warn("validation of cinema path is wrong\n");
|
2007-02-27 03:14:18 +01:00
|
|
|
return false;
|
2006-08-22 04:24:44 +02:00
|
|
|
}
|
2006-04-24 01:14:18 +02:00
|
|
|
|
2012-06-06 21:37:03 +02:00
|
|
|
bool CCinemaPath::Play(const float deltaRealTime)
|
2006-08-22 04:24:44 +02:00
|
|
|
{
|
2016-01-03 13:41:04 +01:00
|
|
|
m_TimeElapsed += m_Timescale.ToFloat() * deltaRealTime;
|
2006-04-24 01:14:18 +02:00
|
|
|
if (!Validate())
|
|
|
|
return false;
|
2016-01-02 21:14:14 +01:00
|
|
|
|
2016-01-03 13:41:04 +01:00
|
|
|
MoveToPointAt(m_TimeElapsed / GetDuration().ToFloat(), GetNodeFraction(), m_PreviousRotation);
|
2006-04-24 01:14:18 +02:00
|
|
|
return true;
|
2016-04-07 19:47:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CCinemaPath::Empty() const
|
|
|
|
{
|
|
|
|
return Node.empty();
|
|
|
|
}
|
|
|
|
|
2016-04-17 17:43:29 +02:00
|
|
|
void CCinemaPath::Reset()
|
|
|
|
{
|
|
|
|
m_TimeElapsed = 0.0f;
|
|
|
|
}
|
|
|
|
|
2016-04-07 19:47:30 +02:00
|
|
|
fixed CCinemaPath::GetTimescale() const
|
|
|
|
{
|
|
|
|
return m_Timescale;
|
|
|
|
}
|
|
|
|
|
2016-04-17 17:43:29 +02:00
|
|
|
const TNSpline& CCinemaPath::GetTargetSpline() const
|
2016-04-07 19:47:30 +02:00
|
|
|
{
|
|
|
|
return m_TargetSpline;
|
|
|
|
}
|