SuperTuxKart
Classes | Public Member Functions | Private Attributes | List of all members
CachedCharacteristic Class Reference
Inheritance diagram for CachedCharacteristic:
Inheritance graph
[legend]

Classes

struct  SaveValue
 Used to store a value. More...
 

Public Member Functions

 CachedCharacteristic (const AbstractCharacteristic *origin)
 
 CachedCharacteristic (const CachedCharacteristic &characteristics)=delete
 
virtual ~CachedCharacteristic ()
 Deletes all allocated values. More...
 
void updateSource ()
 Fetches all cached values from the original source. More...
 
virtual void copyFrom (const AbstractCharacteristic *other)
 
virtual void process (CharacteristicType type, Value value, bool *is_set) const
 Returns the stored value. More...
 
- Public Member Functions inherited from AbstractCharacteristic
float getSuspensionStiffness () const
 
float getSuspensionRest () const
 
float getSuspensionTravel () const
 
bool getSuspensionExpSpringResponse () const
 
float getSuspensionMaxForce () const
 
float getStabilityRollInfluence () const
 
float getStabilityChassisLinearDamping () const
 
float getStabilityChassisAngularDamping () const
 
float getStabilityDownwardImpulseFactor () const
 
float getStabilityTrackConnectionAccel () const
 
std::vector< float > getStabilityAngularFactor () const
 
float getStabilitySmoothFlyingImpulse () const
 
InterpolationArray getTurnRadius () const
 
float getTurnTimeResetSteer () const
 
InterpolationArray getTurnTimeFullSteer () const
 
float getEnginePower () const
 
float getEngineMaxSpeed () const
 
float getEngineGenericMaxSpeed () const
 
float getEngineBrakeFactor () const
 
float getEngineBrakeTimeIncrease () const
 
float getEngineMaxSpeedReverseRatio () const
 
std::vector< float > getGearSwitchRatio () const
 
std::vector< float > getGearPowerIncrease () const
 
float getMass () const
 
float getWheelsDampingRelaxation () const
 
float getWheelsDampingCompression () const
 
float getJumpAnimationTime () const
 
float getLeanMax () const
 
float getLeanSpeed () const
 
float getAnvilDuration () const
 
float getAnvilWeight () const
 
float getAnvilSpeedFactor () const
 
float getParachuteFriction () const
 
float getParachuteDuration () const
 
float getParachuteDurationOther () const
 
float getParachuteDurationRankMult () const
 
float getParachuteDurationSpeedMult () const
 
float getParachuteLboundFraction () const
 
float getParachuteUboundFraction () const
 
float getParachuteMaxSpeed () const
 
float getFrictionKartFriction () const
 
float getBubblegumDuration () const
 
float getBubblegumSpeedFraction () const
 
float getBubblegumTorque () const
 
float getBubblegumFadeInTime () const
 
float getBubblegumShieldDuration () const
 
float getZipperDuration () const
 
float getZipperForce () const
 
float getZipperSpeedGain () const
 
float getZipperMaxSpeedIncrease () const
 
float getZipperFadeOutTime () const
 
float getSwatterDuration () const
 
float getSwatterDistance () const
 
float getSwatterSquashDuration () const
 
float getSwatterSquashSlowdown () const
 
float getPlungerBandMaxLength () const
 
float getPlungerBandForce () const
 
float getPlungerBandDuration () const
 
float getPlungerBandSpeedIncrease () const
 
float getPlungerBandFadeOutTime () const
 
float getPlungerInFaceTime () const
 
std::vector< float > getStartupTime () const
 
std::vector< float > getStartupBoost () const
 
float getRescueDuration () const
 
float getRescueVertOffset () const
 
float getRescueHeight () const
 
float getExplosionDuration () const
 
float getExplosionRadius () const
 
float getExplosionInvulnerabilityTime () const
 
float getNitroDuration () const
 
float getNitroEngineForce () const
 
float getNitroEngineMult () const
 
float getNitroConsumption () const
 
float getNitroSmallContainer () const
 
float getNitroBigContainer () const
 
float getNitroMaxSpeedIncrease () const
 
float getNitroFadeOutTime () const
 
float getNitroMax () const
 
float getSlipstreamDurationFactor () const
 
float getSlipstreamBaseSpeed () const
 
float getSlipstreamLength () const
 
float getSlipstreamWidth () const
 
float getSlipstreamInnerFactor () const
 
float getSlipstreamMinCollectTime () const
 
float getSlipstreamMaxCollectTime () const
 
float getSlipstreamAddPower () const
 
float getSlipstreamMinSpeed () const
 
float getSlipstreamMaxSpeedIncrease () const
 
float getSlipstreamFadeOutTime () const
 
float getSkidIncrease () const
 
float getSkidDecrease () const
 
float getSkidMax () const
 
float getSkidTimeTillMax () const
 
float getSkidVisual () const
 
float getSkidVisualTime () const
 
float getSkidRevertVisualTime () const
 
float getSkidMinSpeed () const
 
std::vector< float > getSkidTimeTillBonus () const
 
std::vector< float > getSkidBonusSpeed () const
 
std::vector< float > getSkidBonusTime () const
 
std::vector< float > getSkidBonusForce () const
 
float getSkidPhysicalJumpTime () const
 
float getSkidGraphicalJumpTime () const
 
float getSkidPostSkidRotateFactor () const
 
float getSkidReduceTurnMin () const
 
float getSkidReduceTurnMax () const
 
bool getSkidEnabled () const
 

Private Attributes

std::vector< SaveValuem_values
 All values for a characteristic. More...
 
const AbstractCharacteristicm_origin
 The characteristics that hold the original values. More...
 

Additional Inherited Members

- Public Types inherited from AbstractCharacteristic
enum  ValueType { TYPE_FLOAT, TYPE_BOOL, TYPE_FLOAT_VECTOR, TYPE_INTERPOLATION_ARRAY }
 
enum  CharacteristicType {
  SUSPENSION_STIFFNESS, SUSPENSION_REST, SUSPENSION_TRAVEL, SUSPENSION_EXP_SPRING_RESPONSE,
  SUSPENSION_MAX_FORCE, STABILITY_ROLL_INFLUENCE, STABILITY_CHASSIS_LINEAR_DAMPING, STABILITY_CHASSIS_ANGULAR_DAMPING,
  STABILITY_DOWNWARD_IMPULSE_FACTOR, STABILITY_TRACK_CONNECTION_ACCEL, STABILITY_ANGULAR_FACTOR, STABILITY_SMOOTH_FLYING_IMPULSE,
  TURN_RADIUS, TURN_TIME_RESET_STEER, TURN_TIME_FULL_STEER, ENGINE_POWER,
  ENGINE_MAX_SPEED, ENGINE_GENERIC_MAX_SPEED, ENGINE_BRAKE_FACTOR, ENGINE_BRAKE_TIME_INCREASE,
  ENGINE_MAX_SPEED_REVERSE_RATIO, GEAR_SWITCH_RATIO, GEAR_POWER_INCREASE, MASS,
  WHEELS_DAMPING_RELAXATION, WHEELS_DAMPING_COMPRESSION, JUMP_ANIMATION_TIME, LEAN_MAX,
  LEAN_SPEED, ANVIL_DURATION, ANVIL_WEIGHT, ANVIL_SPEED_FACTOR,
  PARACHUTE_FRICTION, PARACHUTE_DURATION, PARACHUTE_DURATION_OTHER, PARACHUTE_DURATION_RANK_MULT,
  PARACHUTE_DURATION_SPEED_MULT, PARACHUTE_LBOUND_FRACTION, PARACHUTE_UBOUND_FRACTION, PARACHUTE_MAX_SPEED,
  FRICTION_KART_FRICTION, BUBBLEGUM_DURATION, BUBBLEGUM_SPEED_FRACTION, BUBBLEGUM_TORQUE,
  BUBBLEGUM_FADE_IN_TIME, BUBBLEGUM_SHIELD_DURATION, ZIPPER_DURATION, ZIPPER_FORCE,
  ZIPPER_SPEED_GAIN, ZIPPER_MAX_SPEED_INCREASE, ZIPPER_FADE_OUT_TIME, SWATTER_DURATION,
  SWATTER_DISTANCE, SWATTER_SQUASH_DURATION, SWATTER_SQUASH_SLOWDOWN, PLUNGER_BAND_MAX_LENGTH,
  PLUNGER_BAND_FORCE, PLUNGER_BAND_DURATION, PLUNGER_BAND_SPEED_INCREASE, PLUNGER_BAND_FADE_OUT_TIME,
  PLUNGER_IN_FACE_TIME, STARTUP_TIME, STARTUP_BOOST, RESCUE_DURATION,
  RESCUE_VERT_OFFSET, RESCUE_HEIGHT, EXPLOSION_DURATION, EXPLOSION_RADIUS,
  EXPLOSION_INVULNERABILITY_TIME, NITRO_DURATION, NITRO_ENGINE_FORCE, NITRO_ENGINE_MULT,
  NITRO_CONSUMPTION, NITRO_SMALL_CONTAINER, NITRO_BIG_CONTAINER, NITRO_MAX_SPEED_INCREASE,
  NITRO_FADE_OUT_TIME, NITRO_MAX, SLIPSTREAM_DURATION_FACTOR, SLIPSTREAM_BASE_SPEED,
  SLIPSTREAM_LENGTH, SLIPSTREAM_WIDTH, SLIPSTREAM_INNER_FACTOR, SLIPSTREAM_MIN_COLLECT_TIME,
  SLIPSTREAM_MAX_COLLECT_TIME, SLIPSTREAM_ADD_POWER, SLIPSTREAM_MIN_SPEED, SLIPSTREAM_MAX_SPEED_INCREASE,
  SLIPSTREAM_FADE_OUT_TIME, SKID_INCREASE, SKID_DECREASE, SKID_MAX,
  SKID_TIME_TILL_MAX, SKID_VISUAL, SKID_VISUAL_TIME, SKID_REVERT_VISUAL_TIME,
  SKID_MIN_SPEED, SKID_TIME_TILL_BONUS, SKID_BONUS_SPEED, SKID_BONUS_TIME,
  SKID_BONUS_FORCE, SKID_PHYSICAL_JUMP_TIME, SKID_GRAPHICAL_JUMP_TIME, SKID_POST_SKID_ROTATE_FACTOR,
  SKID_REDUCE_TURN_MIN, SKID_REDUCE_TURN_MAX, SKID_ENABLED, CHARACTERISTIC_COUNT
}
 
- Static Public Member Functions inherited from AbstractCharacteristic
static ValueType getType (CharacteristicType type)
 Returns the type of a given characteristic. More...
 
static std::string getName (CharacteristicType type)
 Converts the enum value to a string. More...
 

Constructor & Destructor Documentation

◆ ~CachedCharacteristic()

CachedCharacteristic::~CachedCharacteristic ( )
virtual

Deletes all allocated values.

Member Function Documentation

◆ process()

void CachedCharacteristic::process ( CharacteristicType  type,
Value  value,
bool *  is_set 
) const
virtual

Returns the stored value.

Reimplemented from AbstractCharacteristic.

◆ updateSource()

void CachedCharacteristic::updateSource ( )

Fetches all cached values from the original source.

Recompute the values of all characteristics based on the list of source-characteristics.

Member Data Documentation

◆ m_origin

const AbstractCharacteristic* CachedCharacteristic::m_origin
private

The characteristics that hold the original values.

◆ m_values

std::vector<SaveValue> CachedCharacteristic::m_values
private

All values for a characteristic.

A nullptr means it is not set.


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