#include <vector.hpp>
Public Member Functions | |
Vector (float nx, float ny) | |
Vector (const Vector &other) | |
Vector () | |
bool | operator== (const Vector &other) const |
bool | operator!= (const Vector &other) const |
const Vector & | operator= (const Vector &other) |
Vector | operator+ (const Vector &other) const |
Vector | operator- (const Vector &other) const |
Vector | operator * (float s) const |
Vector | operator/ (float s) const |
Vector | operator- () const |
const Vector & | operator+= (const Vector &other) |
const Vector & | operator-= (const Vector &other) |
const Vector & | operator *= (float val) |
const Vector & | operator/= (float val) |
float | operator * (const Vector &other) const |
Scalar product of 2 vectors. | |
float | norm () const |
Vector | unit () const |
Public Attributes | |
float | x |
float | y |
Definition at line 21 of file vector.hpp.
Vector::Vector | ( | float | nx, | |
float | ny | |||
) | [inline] |
Vector::Vector | ( | const Vector & | other | ) | [inline] |
Vector::Vector | ( | ) | [inline] |
Definition at line 30 of file vector.hpp.
Referenced by operator *(), operator+(), operator-(), and operator/().
bool Vector::operator== | ( | const Vector & | other | ) | const [inline] |
bool Vector::operator!= | ( | const Vector & | other | ) | const [inline] |
Vector Vector::operator * | ( | float | s | ) | const [inline] |
Vector Vector::operator/ | ( | float | s | ) | const [inline] |
Vector Vector::operator- | ( | ) | const [inline] |
const Vector& Vector::operator *= | ( | float | val | ) | [inline] |
const Vector& Vector::operator/= | ( | float | val | ) | [inline] |
float Vector::operator * | ( | const Vector & | other | ) | const [inline] |
float Vector::norm | ( | ) | const |
Definition at line 26 of file vector.cpp.
Referenced by WillOWisp::active_update(), GhostTree::active_update(), Explosion::explode(), Sector::handle_collisions(), collision::makePlane(), Rock::ungrab(), unit(), worldmap::WorldMap::update(), and InfoBlock::update().
Vector Vector::unit | ( | ) | const |
Definition at line 21 of file vector.cpp.
References norm().
Referenced by WillOWisp::active_update(), GhostTree::active_update(), Explosion::explode(), and Sector::handle_collisions().
00022 { 00023 return *this / norm(); 00024 }
float Vector::x |
Definition at line 115 of file vector.hpp.
Referenced by Dispenser::activate(), Totem::active_update(), Stalactite::active_update(), SSpiky::active_update(), SpiderMite::active_update(), Plant::active_update(), Owl::active_update(), Jumpy::active_update(), Haywire::active_update(), FlyingSnowBall::active_update(), Flame::active_update(), Dispenser::active_update(), Crystallo::active_update(), AngryStone::active_update(), ButtonGroup::add_button(), ButtonGroup::add_pair_of_buttons(), Player::add_velocity(), AmbientSound::AmbientSound(), Background::Background(), BonusBlock::BonusBlock(), Igel::can_see(), TileMap::change_at(), check_collisions(), Tile::check_movement_unisolid(), worldmap::WorldMap::clamp_camera_position(), Climbable::Climbable(), ParticleSystem_Interactive::collision(), AngryStone::collision_solid(), Snowman::collision_squished(), Snail::collision_squished(), MrTree::collision_squished(), MrIceBlock::collision_squished(), Sector::collision_static_constrains(), Sector::collision_tile_attributes(), Rectf::contains(), ObjectFactory::create(), Door::Door(), Font::draw(), InfoBoxLine::draw(), TileMap::draw(), SkullTile::draw(), Player::draw(), ParticleSystem::draw(), InfoBlock::draw(), Background::draw(), Menu::draw(), ButtonGroup::draw(), Button::draw(), DrawingContext::draw_center_text(), Font::draw_chars(), SDLRenderer::draw_filled_rect(), SDLLightmap::draw_filled_rect(), GLRenderer::draw_filled_rect(), GLLightmap::draw_filled_rect(), Background::draw_image(), GLRenderer::draw_inverse_ellipse(), Menu::draw_item(), SDLRenderer::draw_surface(), SDLLightmap::draw_surface(), GLRenderer::draw_surface(), GLLightmap::draw_surface(), DrawingContext::draw_surface(), SDLRenderer::draw_surface_part(), SDLLightmap::draw_surface_part(), GLRenderer::draw_surface_part(), GLLightmap::draw_surface_part(), DrawingContext::draw_surface_part(), Yeti::drop_stalactite(), Climbable::event(), Menu::event(), ButtonGroup::event(), Button::event(), DartTrap::fire(), Sector::fix_old_tiles(), Flame::Flame(), FloatingText::FloatingText(), IceCrusher::found_victim(), Ispy::free_line_of_sight(), get_anchor_pos(), worldmap::WorldMap::get_camera_pos_for_tux(), get_hit_normal(), Rectf::get_left(), SDLLightmap::get_light(), GLLightmap::get_light(), DrawingContext::get_light(), Rectf::get_middle(), TileMap::get_movement(), worldmap::WorldMap::get_next_tile(), worldmap::Tux::get_pos(), TextObject::get_pos_x(), ScriptedObject::get_pos_x(), AmbientSound::get_pos_x(), Rectf::get_right(), TileMap::get_tile_id_at(), Rectf::get_width(), SkyDive::grab(), Sector::handle_collisions(), Player::handle_input(), InfoBlock::InfoBlock(), collision::intersects(), Ispy::intersects_line(), Owl::is_above_player(), BadGuy::is_offscreen(), Camera::keep_in_bounds(), Kugelblitz::Kugelblitz(), Dispenser::launch_badguy(), worldmap::LevelTile::LevelTile(), Ispy::line_intersects_line(), worldmap::WorldMap::load_state(), TitleScreen::make_tux_jump(), collision::makePlane(), Climbable::may_climb(), Menu::Menu(), CaptainSnowball::might_climb(), BadGuy::might_fall(), MovingSprite::MovingSprite(), norm(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), Sector::parse_old_format(), Particles::Particles(), worldmap::WorldMap::path_ok(), SoundManager::play(), Player::position_grabbed_object(), Path::read(), collision::rectangle_aatriangle(), Rectf::Rectf(), Camera::reset(), EndSequenceWalkRight::running(), EndSequenceWalkLeft::running(), worldmap::WorldMap::save_state(), ScriptTrigger::ScriptTrigger(), SecretAreaTrigger::SecretAreaTrigger(), SequenceTrigger::SequenceTrigger(), Player::set_bonus(), SoundManager::set_listener_position(), SoundManager::set_listener_velocity(), AmbientSound::set_pos(), Menu::set_pos(), OpenALSoundSource::set_position(), collision::set_rectangle_rectangle_constraints(), Camera::set_scrolling(), Toad::set_state(), Physic::set_velocity(), OpenALSoundSource::set_velocity(), Rectf::set_width(), Camera::shake(), Zeekling::should_we_dive(), ShrinkFade::ShrinkFade(), worldmap::SpawnPoint::SpawnPoint(), SpawnPoint::SpawnPoint(), worldmap::SpecialTile::SpecialTile(), Spotlight::Spotlight(), WeakBlock::spreadHit(), worldmap::SpriteChange::SpriteChange(), Block::start_bounce(), Switch::Switch(), worldmap::Teleporter::Teleporter(), Mole::throw_rock(), worldmap::WorldMap::tile_data_at(), Kugelblitz::try_activate(), BadGuy::try_activate(), BonusBlock::try_open(), worldmap::WorldMap::update(), Wind::update(), SpriteParticle::update(), ScriptedObject::update(), RainParticleSystem::update(), Player::update(), Particles::update(), MagicBlock::update(), CometParticleSystem::update(), Bullet::update(), AmbientSound::update(), Camera::update_scroll_normal(), and Wind::Wind().
float Vector::y |
Definition at line 115 of file vector.hpp.
Referenced by Sector::activate(), Zeekling::active_update(), Totem::active_update(), Stalactite::active_update(), SSpiky::active_update(), Plant::active_update(), Owl::active_update(), Jumpy::active_update(), FlyingSnowBall::active_update(), Flame::active_update(), AngryStone::active_update(), ButtonGroup::add_button(), ButtonGroup::add_pair_of_buttons(), Player::add_velocity(), AmbientSound::AmbientSound(), Background::Background(), BonusBlock::BonusBlock(), Igel::can_see(), TileMap::change_at(), check_collisions(), Tile::check_movement_unisolid(), worldmap::WorldMap::clamp_camera_position(), Climbable::Climbable(), InvisibleBlock::collides(), PneumaticPlatform::collision(), ParticleSystem_Interactive::collision(), BicyclePlatform::collision(), Dispenser::collision(), BadGuy::collision(), Kugelblitz::collision_player(), WalkingBadguy::collision_solid(), AngryStone::collision_solid(), Snowman::collision_squished(), MrTree::collision_squished(), Sector::collision_static_constrains(), Fish::collision_tile(), Sector::collision_tile_attributes(), Rectf::contains(), ObjectFactory::create(), Door::Door(), Font::draw(), InfoBoxLine::draw(), TileMap::draw(), Player::draw(), ParticleSystem::draw(), Background::draw(), Menu::draw(), ButtonGroup::draw(), Button::draw(), DrawingContext::draw_center_text(), Font::draw_chars(), SDLRenderer::draw_filled_rect(), SDLLightmap::draw_filled_rect(), GLRenderer::draw_filled_rect(), GLLightmap::draw_filled_rect(), Background::draw_image(), GLRenderer::draw_inverse_ellipse(), Menu::draw_item(), SDLRenderer::draw_surface(), SDLLightmap::draw_surface(), GLRenderer::draw_surface(), GLLightmap::draw_surface(), DrawingContext::draw_surface(), SDLRenderer::draw_surface_part(), SDLLightmap::draw_surface_part(), GLRenderer::draw_surface_part(), GLLightmap::draw_surface_part(), DrawingContext::draw_surface_part(), Climbable::event(), Menu::event(), ButtonGroup::event(), Button::event(), DartTrap::fire(), Flame::Flame(), IceCrusher::found_victim(), Ispy::free_line_of_sight(), get_anchor_pos(), Rectf::get_bottom(), worldmap::WorldMap::get_camera_pos_for_tux(), Rectf::get_height(), get_hit_normal(), SDLLightmap::get_light(), GLLightmap::get_light(), DrawingContext::get_light(), Rectf::get_middle(), TileMap::get_movement(), worldmap::WorldMap::get_next_tile(), worldmap::Tux::get_pos(), TextObject::get_pos_y(), ScriptedObject::get_pos_y(), AmbientSound::get_pos_y(), TileMap::get_tile_id_at(), Rectf::get_top(), Sector::handle_collisions(), Player::handle_input(), InfoBlock::InfoBlock(), Sector::inside(), collision::intersects(), Ispy::intersects_line(), Owl::is_above_player(), BadGuy::is_offscreen(), Camera::keep_in_bounds(), worldmap::LevelTile::LevelTile(), Ispy::line_intersects_line(), worldmap::WorldMap::load_state(), collision::makePlane(), Climbable::may_climb(), Menu::Menu(), CaptainSnowball::might_climb(), BadGuy::might_fall(), Player::move(), MovingSprite::MovingSprite(), norm(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), Sector::parse_old_format(), Particles::Particles(), worldmap::WorldMap::path_ok(), SoundManager::play(), PneumaticPlatform::PneumaticPlatform(), Player::position_grabbed_object(), Path::read(), collision::rectangle_aatriangle(), Rectf::Rectf(), Camera::reset(), worldmap::WorldMap::save_state(), ScriptTrigger::ScriptTrigger(), SecretAreaTrigger::SecretAreaTrigger(), SequenceTrigger::SequenceTrigger(), Player::set_bonus(), Rectf::set_height(), SoundManager::set_listener_position(), SoundManager::set_listener_velocity(), AmbientSound::set_pos(), Menu::set_pos(), OpenALSoundSource::set_position(), collision::set_rectangle_rectangle_constraints(), Camera::set_scrolling(), Physic::set_velocity(), OpenALSoundSource::set_velocity(), Camera::shake(), Zeekling::should_we_dive(), ShrinkFade::ShrinkFade(), worldmap::SpawnPoint::SpawnPoint(), SpawnPoint::SpawnPoint(), worldmap::SpecialTile::SpecialTile(), Spotlight::Spotlight(), WeakBlock::spreadHit(), worldmap::SpriteChange::SpriteChange(), Block::start_bounce(), Switch::Switch(), Totem::synchronize_with(), worldmap::Teleporter::Teleporter(), Mole::throw_rock(), worldmap::WorldMap::tile_data_at(), FlipLevelTransformer::transform_badguy(), FlipLevelTransformer::transform_moving_object(), FlipLevelTransformer::transform_sector(), FlipLevelTransformer::transform_spawnpoint(), FlipLevelTransformer::transform_tilemap(), Kugelblitz::try_activate(), worldmap::WorldMap::update(), Wind::update(), SpriteParticle::update(), SmokeCloud::update(), ScriptedObject::update(), RainParticleSystem::update(), Player::update(), Particles::update(), MagicBlock::update(), InfoBlock::update(), IceCrusher::update(), FloatingText::update(), FallingCoin::update(), CometParticleSystem::update(), Bullet::update(), BouncyCoin::update(), Block::update(), AmbientSound::update(), Menu::update(), Camera::update_scroll_normal(), and Wind::Wind().