Added support of far camera to stk, updated final camera handling of track exporter.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4775 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
05cd009ed1
commit
9a767dcdbe
@ -131,6 +131,7 @@ void Camera::setupCamera()
|
||||
} // switch
|
||||
m_camera->setFOV(m_fov);
|
||||
m_camera->setAspectRatio(m_aspect);
|
||||
m_camera->setFarValue(World::getWorld()->getTrack()->getCameraFar());
|
||||
} // setupCamera
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -72,6 +72,7 @@ Track::Track(std::string filename)
|
||||
m_all_meshes.clear();
|
||||
m_has_final_camera = false;
|
||||
m_is_arena = false;
|
||||
m_camera_far = 1000.0f;
|
||||
m_quad_graph = NULL;
|
||||
m_animation_manager = NULL;
|
||||
m_check_manager = NULL;
|
||||
@ -719,6 +720,10 @@ void Track::loadTrackModel(unsigned int mode_id)
|
||||
node->get("h", &h);
|
||||
m_start_heading.push_back(h);
|
||||
}
|
||||
else if(name=="camera")
|
||||
{
|
||||
node->get("far", &m_camera_far);
|
||||
}
|
||||
else if(name=="animations")
|
||||
{
|
||||
m_animation_manager = new AnimationManager(*this, *node);
|
||||
|
@ -89,6 +89,8 @@ private:
|
||||
/** The version of this track. A certain STK version will only support
|
||||
* certain track versions. */
|
||||
int m_version;
|
||||
/** Far value for cameras for this track. */
|
||||
float m_camera_far;
|
||||
|
||||
/** The graph used to connect the quads. */
|
||||
QuadGraph *m_quad_graph;
|
||||
@ -267,6 +269,9 @@ public:
|
||||
/** Sets the current ambient color for a kart with index k. */
|
||||
void setAmbientColor(const video::SColor &color,
|
||||
unsigned int k);
|
||||
/** Returns the far value for cameras. */
|
||||
float getCameraFar() const { return m_camera_far; }
|
||||
|
||||
/** Get the number of start positions defined in the scene file. */
|
||||
unsigned int getNumberOfStartPositions() const
|
||||
{ return m_start_positions.size(); }
|
||||
|
Loading…
Reference in New Issue
Block a user