19#ifndef HEADER_RUBBER_BAND_HPP
20#define HEADER_RUBBER_BAND_HPP
22#include "utils/no_copy.hpp"
23#include "utils/vec3.hpp"
30 class SPDynamicDrawCall;
68 std::shared_ptr<SP::SPDynamicDrawCall>
m_dy_dc;
70 irr::scene::IMeshSceneNode* m_node;
85 void updateGraphics(
float dt);
88 uint8_t get8BitState()
const;
89 void set8BitState(uint8_t bit_state);
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
Definition: plunger.hpp:39
This class is used together with the pluger to display a rubber band from the shooting kart to the pl...
Definition: rubber_band.hpp:49
std::shared_ptr< SP::SPDynamicDrawCall > m_dy_dc
The dynamic draw call of the rubber band.
Definition: rubber_band.hpp:68
Vec3 m_hit_position
If rubber band is attached to track, the coordinates.
Definition: rubber_band.hpp:59
void updatePosition()
Updates the position of the rubber band.
Definition: rubber_band.cpp:144
void checkForHit(const Vec3 &k, const Vec3 &p)
Uses a raycast to see if anything has hit the rubber band.
Definition: rubber_band.cpp:314
Plunger * m_plunger
The plunger the rubber band is attached to.
Definition: rubber_band.hpp:61
void update(int ticks)
Updates the rubber band.
Definition: rubber_band.cpp:251
AbstractKart * m_owner
The kart who shot this plunger.
Definition: rubber_band.hpp:63
void hit(AbstractKart *kart_hit, const Vec3 *track_xyz=NULL)
The plunger hit a kart or the track.
Definition: rubber_band.cpp:352
Vec3 m_end_position
Stores the end of the rubber band (i.e.
Definition: rubber_band.hpp:76
RubberBandTo
Definition: rubber_band.hpp:52
@ RB_TO_TRACK
Rubber band is attached to track.
Definition: rubber_band.hpp:55
@ RB_TO_KART
Rubber band is attached to a kart hit.
Definition: rubber_band.hpp:54
@ RB_TO_PLUNGER
Rubber band is attached to plunger.
Definition: rubber_band.hpp:53
AbstractKart * m_hit_kart
The kart a plunger might have hit.
Definition: rubber_band.hpp:73
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35