SuperTuxKart
Loading...
Searching...
No Matches
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.
 
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.
 

Public Attributes

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

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.

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