![]() |
Botcraft 1.21.4
|
#include <Vector3.hpp>
Public Member Functions | |
Vector3 (const T &v=0) | |
Vector3 (const T &x_, const T &y_, const T &z_) | |
Vector3 (const ProtocolCraft::NetworkPosition &position) | |
template<typename U > | |
Vector3 (const Vector3< U > &position) | |
Vector3 (const std::vector< T > &v) | |
Vector3 (const std::array< T, 3 > &v) | |
Vector3 | operator+ (const Vector3 &a) const |
Vector3 | operator- (const Vector3 &a) const |
Vector3 | operator* (const Vector3 &v) const |
Vector3 | operator/ (const Vector3 &v) const |
bool | operator== (const Vector3 &a) const |
bool | operator!= (const Vector3 &a) const |
bool | operator< (const Vector3 &a) const |
Vector3 | operator* (const T d) const |
Vector3 | operator- (const T d) const |
Vector3 | operator+ (const T d) const |
Vector3 | operator/ (const T d) const |
Vector3 & | operator+= (const Vector3 &v) |
Vector3 & | operator+= (const T v) |
Vector3 & | operator-= (const Vector3 &v) |
Vector3 & | operator-= (const T v) |
Vector3 & | operator*= (const Vector3 &v) |
Vector3 & | operator*= (const T v) |
Vector3 & | operator/= (const Vector3 &v) |
Vector3 & | operator/= (const T v) |
double | dot (const Vector3 &v) const |
double | SqrDist (const Vector3 &v) const |
Vector3 | Abs () const |
T & | operator[] (const int i) |
const T & | operator[] (const int i) const |
void | Normalize () |
double | SqrNorm () const |
ProtocolCraft::Json::Value | Serialize () const |
ProtocolCraft::NetworkPosition | ToNetworkPosition () const |
Public Attributes | |
T | x |
T | y |
T | z |
Friends | |
std::ostream & | operator<< (std::ostream &o, const Vector3 &vec) |
Definition at line 12 of file Vector3.hpp.
|
inline |
Definition at line 14 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 21 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 28 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 36 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 43 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 51 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 199 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
Referenced by Botcraft::PhysicsManager::ApplyMovement(), and Botcraft::World::GetColliders().
|
inline |
Definition at line 183 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 248 of file Vector3.hpp.
References Botcraft::Vector3< T >::SqrNorm(), Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
Referenced by Botcraft::PhysicsManager::ApplyInputs(), Botcraft::World::GetFlow(), Botcraft::GoToImpl(), and Botcraft::LocalPlayer::LookAt().
|
inline |
Definition at line 87 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 99 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 72 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 159 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 151 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 109 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 62 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 127 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 119 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 104 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 67 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 143 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 135 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 114 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 77 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 175 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 167 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 92 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 82 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 208 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 228 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 267 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
Referenced by Botcraft::Entity::Serialize(), Botcraft::DolphinEntity::Serialize(), Botcraft::TurtleEntity::Serialize(), and Botcraft::FallingBlockEntity::Serialize().
|
inline |
Definition at line 192 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
Referenced by Botcraft::DigImpl(), Botcraft::Blockstate::GetClosestPoint(), Botcraft::World::GetSupportingBlockPos(), Botcraft::InteractEntityImpl(), Botcraft::InteractWithBlockImpl(), Botcraft::Move(), and Botcraft::PlaceBlockImpl().
|
inline |
Definition at line 256 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
Referenced by Botcraft::PhysicsManager::ApplyInputs(), Botcraft::PhysicsManager::ApplyMovement(), Botcraft::PhysicsManager::FluidPhysics(), and Botcraft::Vector3< T >::Normalize().
|
inline |
Definition at line 272 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
Referenced by Botcraft::DigImpl(), Botcraft::InteractWithBlockImpl(), and Botcraft::PlaceBlockImpl().
|
friend |
Definition at line 261 of file Vector3.hpp.
T Botcraft::Vector3< T >::x |
Definition at line 58 of file Vector3.hpp.
Referenced by Botcraft::Vector3< T >::Abs(), Botcraft::Renderer::WorldRenderer::AddFace(), Botcraft::AdjustPosSpeed(), Botcraft::PhysicsManager::ApplyInputs(), Botcraft::PhysicsManager::ApplyMovement(), Botcraft::Chunk::BlockCoordsToChunkCoords(), Botcraft::PhysicsManager::CheckInsideBlocks(), Botcraft::AABB::Collide(), Botcraft::PhysicsManager::CollideBoundingBox(), Botcraft::DigImpl(), Botcraft::Renderer::WorldRenderer::DistanceToCamera(), Botcraft::Vector3< T >::dot(), Botcraft::FindPath(), Botcraft::PhysicsManager::FluidPhysics(), Botcraft::World::GetBiome(), Botcraft::Chunk::GetBlock(), Botcraft::World::GetBlockEntityData(), Botcraft::World::GetBlockImpl(), Botcraft::Chunk::GetBlockLight(), Botcraft::World::GetBlockLight(), Botcraft::Entity::GetColliderImpl(), Botcraft::PlayerEntity::GetColliderImpl(), Botcraft::World::GetColliders(), Botcraft::World::GetFlow(), Botcraft::Blockstate::GetHorizontalOffsetAtPos(), Botcraft::Chunk::GetSkyLight(), Botcraft::World::GetSkyLight(), Botcraft::Entity::GetSpeedX(), Botcraft::World::GetSupportingBlockPos(), Botcraft::AABB::GetVolume(), Botcraft::Entity::GetX(), Botcraft::GoTo(), Botcraft::GoToBlackboard(), Botcraft::GoToImpl(), Botcraft::Renderer::RenderingManager::Handle(), Botcraft::EntityManager::Handle(), Botcraft::EntityManager::Handle(), Botcraft::PhysicsManager::Handle(), Botcraft::Entity::InitializeFaces(), Botcraft::World::IsFree(), Botcraft::Chunk::IsInsideChunk(), Botcraft::World::IsLoaded(), Botcraft::Chunk::LoadChunkData(), Botcraft::LocalPlayer::LookAt(), Botcraft::ModelModificationFromJson(), Botcraft::Move(), Botcraft::Vector3< T >::Normalize(), Botcraft::Vector3< T >::operator!=(), std::hash< Botcraft::Vector3< T > >::operator()(), Botcraft::Vector3< T >::operator*(), Botcraft::Vector3< T >::operator*(), Botcraft::Vector3< T >::operator*=(), Botcraft::Vector3< T >::operator*=(), Botcraft::Vector3< T >::operator+(), Botcraft::Vector3< T >::operator+(), Botcraft::Vector3< T >::operator+=(), Botcraft::Vector3< T >::operator+=(), Botcraft::Vector3< T >::operator-(), Botcraft::Vector3< T >::operator-(), Botcraft::Vector3< T >::operator-=(), Botcraft::Vector3< T >::operator-=(), Botcraft::Vector3< T >::operator/(), Botcraft::Vector3< T >::operator/(), Botcraft::Vector3< T >::operator/=(), Botcraft::Vector3< T >::operator/=(), Botcraft::Vector3< T >::operator<(), Botcraft::Vector3< T >::operator==(), Botcraft::Vector3< T >::operator[](), Botcraft::Vector3< T >::operator[](), Botcraft::World::Raycast(), Botcraft::Renderer::WorldRenderer::RenderFaces(), Botcraft::Renderer::RenderingManager::Run(), Botcraft::Vector3< T >::Serialize(), Botcraft::Chunk::SetBlock(), Botcraft::World::SetBlockEntityData(), Botcraft::World::SetBlockImpl(), Botcraft::World::SetBlockLight(), Botcraft::Chunk::SetBlockLight(), Botcraft::Entity::SetPosition(), Botcraft::World::SetSkyLight(), Botcraft::Chunk::SetSkyLight(), Botcraft::Entity::SetSpeedX(), Botcraft::LocalPlayer::SetX(), Botcraft::Entity::SetX(), Botcraft::Vector3< T >::SqrDist(), Botcraft::Vector3< T >::SqrNorm(), Botcraft::Vector3< T >::ToNetworkPosition(), Botcraft::World::UpdateChunk(), Botcraft::Renderer::WorldRenderer::UpdateChunk(), Botcraft::World::UpdateChunkLight(), Botcraft::Chunk::UpdateNeighbour(), Botcraft::LocalPlayer::UpdateVectors(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), and Botcraft::Renderer::RenderingManager::WaitForRenderingUpdate().
T Botcraft::Vector3< T >::y |
Definition at line 59 of file Vector3.hpp.
Referenced by Botcraft::Vector3< T >::Abs(), Botcraft::Renderer::WorldRenderer::AddFace(), Botcraft::PhysicsManager::ApplyInputs(), Botcraft::PhysicsManager::ApplyMovement(), Botcraft::PhysicsManager::CheckInsideBlocks(), Botcraft::AABB::Collide(), Botcraft::DigImpl(), Botcraft::Renderer::WorldRenderer::DistanceToCamera(), Botcraft::Vector3< T >::dot(), Botcraft::FindPath(), Botcraft::PhysicsManager::FluidPhysics(), Botcraft::World::GetBiome(), Botcraft::Chunk::GetBlock(), Botcraft::PhysicsManager::GetBlockBelowAffectingMovement(), Botcraft::World::GetBlockEntityData(), Botcraft::World::GetBlockImpl(), Botcraft::Chunk::GetBlockLight(), Botcraft::World::GetBlockLight(), Botcraft::Entity::GetColliderImpl(), Botcraft::PlayerEntity::GetColliderImpl(), Botcraft::World::GetColliders(), Botcraft::World::GetFlow(), Botcraft::Blockstate::GetHorizontalOffsetAtPos(), Botcraft::Chunk::GetSkyLight(), Botcraft::World::GetSkyLight(), Botcraft::Entity::GetSpeedY(), Botcraft::World::GetSupportingBlockPos(), Botcraft::AABB::GetVolume(), Botcraft::Entity::GetY(), Botcraft::GoTo(), Botcraft::GoToBlackboard(), Botcraft::GoToImpl(), Botcraft::EntityManager::Handle(), Botcraft::EntityManager::Handle(), Botcraft::PhysicsManager::Handle(), Botcraft::Entity::InitializeFaces(), Botcraft::World::IsFree(), Botcraft::Chunk::IsInsideChunk(), Botcraft::Chunk::LoadChunkData(), Botcraft::LocalPlayer::LookAt(), Botcraft::ModelModificationFromJson(), Botcraft::Move(), Botcraft::Vector3< T >::Normalize(), Botcraft::Vector3< T >::operator!=(), std::hash< Botcraft::Vector3< T > >::operator()(), Botcraft::Vector3< T >::operator*(), Botcraft::Vector3< T >::operator*(), Botcraft::Vector3< T >::operator*=(), Botcraft::Vector3< T >::operator*=(), Botcraft::Vector3< T >::operator+(), Botcraft::Vector3< T >::operator+(), Botcraft::Vector3< T >::operator+=(), Botcraft::Vector3< T >::operator+=(), Botcraft::Vector3< T >::operator-(), Botcraft::Vector3< T >::operator-(), Botcraft::Vector3< T >::operator-=(), Botcraft::Vector3< T >::operator-=(), Botcraft::Vector3< T >::operator/(), Botcraft::Vector3< T >::operator/(), Botcraft::Vector3< T >::operator/=(), Botcraft::Vector3< T >::operator/=(), Botcraft::Vector3< T >::operator<(), Botcraft::Vector3< T >::operator==(), Botcraft::Vector3< T >::operator[](), Botcraft::Vector3< T >::operator[](), Botcraft::PathfindingBlockstate::PathfindingBlockstate(), Botcraft::World::Raycast(), Botcraft::Renderer::WorldRenderer::RenderFaces(), Botcraft::Renderer::RenderingManager::Run(), Botcraft::Vector3< T >::Serialize(), Botcraft::Chunk::SetBlock(), Botcraft::World::SetBlockEntityData(), Botcraft::World::SetBlockImpl(), Botcraft::World::SetBlockLight(), Botcraft::Chunk::SetBlockLight(), Botcraft::Entity::SetPosition(), Botcraft::World::SetSkyLight(), Botcraft::Chunk::SetSkyLight(), Botcraft::Entity::SetSpeedY(), Botcraft::LocalPlayer::SetY(), Botcraft::Entity::SetY(), Botcraft::Vector3< T >::SqrDist(), Botcraft::Vector3< T >::SqrNorm(), Botcraft::Vector3< T >::ToNetworkPosition(), Botcraft::World::UpdateChunk(), Botcraft::Renderer::WorldRenderer::UpdateChunk(), Botcraft::World::UpdateChunkLight(), Botcraft::Chunk::UpdateNeighbour(), Botcraft::LocalPlayer::UpdateVectors(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), and Botcraft::Vector3< T >::Vector3().
T Botcraft::Vector3< T >::z |
Definition at line 60 of file Vector3.hpp.
Referenced by Botcraft::Vector3< T >::Abs(), Botcraft::Renderer::WorldRenderer::AddFace(), Botcraft::AdjustPosSpeed(), Botcraft::PhysicsManager::ApplyInputs(), Botcraft::PhysicsManager::ApplyMovement(), Botcraft::Chunk::BlockCoordsToChunkCoords(), Botcraft::PhysicsManager::CheckInsideBlocks(), Botcraft::AABB::Collide(), Botcraft::PhysicsManager::CollideBoundingBox(), Botcraft::DigImpl(), Botcraft::Renderer::WorldRenderer::DistanceToCamera(), Botcraft::Vector3< T >::dot(), Botcraft::FindPath(), Botcraft::PhysicsManager::FluidPhysics(), Botcraft::World::GetBiome(), Botcraft::Chunk::GetBlock(), Botcraft::World::GetBlockEntityData(), Botcraft::World::GetBlockImpl(), Botcraft::Chunk::GetBlockLight(), Botcraft::World::GetBlockLight(), Botcraft::Entity::GetColliderImpl(), Botcraft::PlayerEntity::GetColliderImpl(), Botcraft::World::GetColliders(), Botcraft::World::GetFlow(), Botcraft::Blockstate::GetHorizontalOffsetAtPos(), Botcraft::Chunk::GetSkyLight(), Botcraft::World::GetSkyLight(), Botcraft::Entity::GetSpeedZ(), Botcraft::World::GetSupportingBlockPos(), Botcraft::AABB::GetVolume(), Botcraft::Entity::GetZ(), Botcraft::GoTo(), Botcraft::GoToBlackboard(), Botcraft::GoToImpl(), Botcraft::Renderer::RenderingManager::Handle(), Botcraft::EntityManager::Handle(), Botcraft::EntityManager::Handle(), Botcraft::PhysicsManager::Handle(), Botcraft::Entity::InitializeFaces(), Botcraft::World::IsFree(), Botcraft::Chunk::IsInsideChunk(), Botcraft::World::IsLoaded(), Botcraft::Chunk::LoadChunkData(), Botcraft::LocalPlayer::LookAt(), Botcraft::ModelModificationFromJson(), Botcraft::Move(), Botcraft::Vector3< T >::Normalize(), Botcraft::Vector3< T >::operator!=(), std::hash< Botcraft::Vector3< T > >::operator()(), Botcraft::Vector3< T >::operator*(), Botcraft::Vector3< T >::operator*(), Botcraft::Vector3< T >::operator*=(), Botcraft::Vector3< T >::operator*=(), Botcraft::Vector3< T >::operator+(), Botcraft::Vector3< T >::operator+(), Botcraft::Vector3< T >::operator+=(), Botcraft::Vector3< T >::operator+=(), Botcraft::Vector3< T >::operator-(), Botcraft::Vector3< T >::operator-(), Botcraft::Vector3< T >::operator-=(), Botcraft::Vector3< T >::operator-=(), Botcraft::Vector3< T >::operator/(), Botcraft::Vector3< T >::operator/(), Botcraft::Vector3< T >::operator/=(), Botcraft::Vector3< T >::operator/=(), Botcraft::Vector3< T >::operator<(), Botcraft::Vector3< T >::operator==(), Botcraft::Vector3< T >::operator[](), Botcraft::Vector3< T >::operator[](), Botcraft::World::Raycast(), Botcraft::Renderer::WorldRenderer::RenderFaces(), Botcraft::Renderer::RenderingManager::Run(), Botcraft::Vector3< T >::Serialize(), Botcraft::Chunk::SetBlock(), Botcraft::World::SetBlockEntityData(), Botcraft::World::SetBlockImpl(), Botcraft::World::SetBlockLight(), Botcraft::Chunk::SetBlockLight(), Botcraft::Entity::SetPosition(), Botcraft::World::SetSkyLight(), Botcraft::Chunk::SetSkyLight(), Botcraft::Entity::SetSpeedZ(), Botcraft::LocalPlayer::SetZ(), Botcraft::Entity::SetZ(), Botcraft::Vector3< T >::SqrDist(), Botcraft::Vector3< T >::SqrNorm(), Botcraft::Vector3< T >::ToNetworkPosition(), Botcraft::World::UpdateChunk(), Botcraft::Renderer::WorldRenderer::UpdateChunk(), Botcraft::World::UpdateChunkLight(), Botcraft::Chunk::UpdateNeighbour(), Botcraft::LocalPlayer::UpdateVectors(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), Botcraft::Vector3< T >::Vector3(), and Botcraft::Renderer::RenderingManager::WaitForRenderingUpdate().