![]() |
Botcraft 1.21.10
|
#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) | |
Vector3 (const ProtocolCraft::LpVec3 &v) | |
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 15 of file Vector3.hpp.
|
inline |
Definition at line 17 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 24 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 31 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 39 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 48 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 55 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 63 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 211 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 195 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 260 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 99 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 111 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 84 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 171 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 163 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 121 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 74 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 139 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 131 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 116 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 79 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 155 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 147 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 126 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 89 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 187 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 179 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 94 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 220 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 240 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
|
inline |
Definition at line 279 of file Vector3.hpp.
References Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, and Botcraft::Vector3< T >::z.
Referenced by Botcraft::Entity::Serialize(), and Botcraft::FallingBlockEntity::Serialize().
|
inline |
Definition at line 204 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 268 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 284 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 273 of file Vector3.hpp.
T Botcraft::Vector3< T >::x |
Definition at line 70 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(), Botcraft::Vector3< T >::Vector3(), and Botcraft::Renderer::RenderingManager::WaitForRenderingUpdate().
T Botcraft::Vector3< T >::y |
Definition at line 71 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(), Botcraft::Vector3< T >::Vector3(), and Botcraft::Vector3< T >::Vector3().
T Botcraft::Vector3< T >::z |
Definition at line 72 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(), Botcraft::Vector3< T >::Vector3(), and Botcraft::Renderer::RenderingManager::WaitForRenderingUpdate().