SuperTuxKart
Public Types | Public Member Functions | Public Attributes | List of all members
CameraEnd::EndCameraInformation Class Reference

A class that stores information about the different end cameras which can be specified in the scene.xml file. More...

Public Types

enum  EndCameraType { EC_STATIC_FOLLOW_KART, EC_AHEAD_OF_KART }
 The camera type: EC_STATIC_FOLLOW_KART A static camera that always points at the kart. More...
 

Public Member Functions

bool readXML (const XMLNode &node)
 Reads end camera information from XML. More...
 
bool isReached (const Vec3 &xyz)
 Returns true if the specified position is close enough to this camera, so that this camera should become the next end camera. More...
 

Public Attributes

EndCameraType m_type
 
Vec3 m_position
 Position of the end camera. More...
 
float m_distance2
 Distance to kart by which this camera is activated. More...
 

Detailed Description

A class that stores information about the different end cameras which can be specified in the scene.xml file.

Member Enumeration Documentation

◆ EndCameraType

The camera type: EC_STATIC_FOLLOW_KART A static camera that always points at the kart.

EC_AHEAD_OF_KART A camera that flies ahead of the kart always pointing at the kart.

Member Function Documentation

◆ isReached()

bool CameraEnd::EndCameraInformation::isReached ( const Vec3 xyz)
inline

Returns true if the specified position is close enough to this camera, so that this camera should become the next end camera.

Parameters
xyzPosition to test for distance.
Returns
True if xyz is close enough to this camera.

◆ readXML()

bool CameraEnd::EndCameraInformation::readXML ( const XMLNode node)
inline

Reads end camera information from XML.

Returns false if an error occurred.

Parameters
nodeXML Node with the end camera information.

Member Data Documentation

◆ m_distance2

float CameraEnd::EndCameraInformation::m_distance2

Distance to kart by which this camera is activated.

◆ m_position

Vec3 CameraEnd::EndCameraInformation::m_position

Position of the end camera.


The documentation for this class was generated from the following file: