SuperTuxKart
Public Types | Public Member Functions | Private Attributes | List of all members
UserPointer Class Reference

A UserPointer is stored as a user pointer in all bullet bodies. More...

#include <user_pointer.hpp>

Public Types

enum  UserPointerType {
  UP_UNDEF, UP_KART, UP_FLYABLE, UP_TRACK,
  UP_PHYSICAL_OBJECT, UP_ANIMATION
}
 List of all possibles STK objects that are represented in the physics. More...
 

Public Member Functions

bool is (UserPointerType t) const
 
TriangleMeshgetPointerTriangleMesh () const
 
MoveablegetPointerMoveable () const
 
FlyablegetPointerFlyable () const
 
AbstractKartgetPointerKart () const
 
PhysicalObjectgetPointerPhysicalObject () const
 
ThreeDAnimationgetPointerAnimation () const
 
void set (PhysicalObject *p)
 
void set (AbstractKart *p)
 
void set (Flyable *p)
 
void set (TriangleMesh *p)
 
void set (ThreeDAnimation *p)
 
void zero ()
 

Private Attributes

void * m_pointer
 
UserPointerType m_user_pointer_type
 

Detailed Description

A UserPointer is stored as a user pointer in all bullet bodies.

This allows easily finding the appropriate STK object for a bullet body.

Member Enumeration Documentation

◆ UserPointerType

List of all possibles STK objects that are represented in the physics.


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