载入中...
搜索中...
未找到
CardTypes.cpp 文件参考
#include "card/CardTypes.h"
#include <glm/vec2.hpp>
#include "card/CardAttributes.h"
#include "graphics/Font.h"
#include "graphics/Graphics.h"
#include <algorithm>
#include <cmath>
#include <random>

浏览源代码.

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::card
 

函数

const char * eve::card::cardStateName (CardState state)
 状态枚举的字符串名(用于脚本/调试)。
 
CardFlipPose eve::card::evaluateCardFlip (float flipProgress, float liftPeak)
 Evaluate face-down progress into an adapter-facing flip pose.
 
void eve::card::advanceCardFlip (float &flip, float targetFaceDown, float speed, float dt)
 Advance animated flip toward a face-down target with frame-rate-normalized speed.
 
bool eve::card::resolveCardWantFaceUp (bool cardFaceUp, bool handFaceDown, bool handPeek)
 Resolve whether a card should read as face-up under hand faceDown/peek rules.
 
void eve::card::printCentered (graphics::Graphics *gfx, const std::string &text, float cx, float cy, float scale, const glm::vec4 &color)
 渲染辅助(也供 Zone / Deck 复用)。
 
void eve::card::renderCardBack (graphics::Graphics *gfx, float x, float y, float w, float h, float angle, float a)
 绘制牌背。
 
void eve::card::renderCard (graphics::Graphics *gfx, const CardData &card, const LayoutConfig &cfg, bool back)
 绘制单张卡牌(正面或牌背;back 强制牌背,忽略 flip)。
 

变量说明

◆ active

bool active = false

在文件 CardTypes.cpp 第 39 行定义.

◆ cx

float cx = 0.f

在文件 CardTypes.cpp 第 36 行定义.

被这些函数引用 eve::graphics::Batcher::addRectRotated(), eve::graphics::Batcher::addTexturedRectRotated(), eve::procgen::TerrainAsset::bake(), eve::procgen::TerrainMeshStampBuilder::bake(), eve::procgen::road::detail::bakeJunction(), eve::hd2d::TileMap3D::buildMesh(), eve::fluids::ShallowWaterField::buildSurfaceMesh(), eve::procgen::ScalarField3D::carveEllipsoid(), eve::logistics::Logistics::cellDir(), eve::spatial::cellKey2(), eve::spatial::cellKey3(), eve::logistics::Logistics::cellKind(), eve::logistics::Logistics::cellMachine(), eve::grid::cellToDepthY(), eve::grid::cellToWorld(), eve::math::Math::circleRectOverlap(), eve::logistics::Logistics::clearCell(), eve::map::TileRenderSystem::collect(), eve::procgen::road::conformHeightmapToRoadWithReceipt(), eve::animation::constrainRigControl(), eve::fluids::ShallowWaterField::copyNormalToImage(), eve::crowd::CrowdField::costAtCell(), eve::graphics::Water::createProceduralMesh(), eve::voxel::decodedSecondTriangleMatchesNormal(), eve::voxel::decodedWindingMatchesNormal(), eve::voxel::VoxelWorld::deserializeWorld(), eve::graphics::vulkan::Graphics::drawSceneColorDistortionUVRotated(), eve::graphics::vulkan::Graphics::drawSolidRectRotated(), eve::graphics::webgpu::Graphics::drawSolidRectRotated(), eve::graphics::vulkan::Graphics::drawTexturedRectLitUVRotated(), eve::graphics::webgpu::Graphics::drawTexturedRectLitUVRotated(), eve::graphics::Graphics::drawTexturedRectRotatedRGBA(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUVRotated(), eve::graphics::webgpu::Graphics::drawTexturedRectShaderUVRotated(), eve::physics::Fluid2D::emit(), eve::building::PlacementSystem::ensureBuiltins(), eve::map::TileLayer::eraseTerrainRect(), eve::procgen::exportTerrainObjectPoints(), eve::pixelworld::PixelWorld::extractUnsupportedFragments(), eve::map::Pathfinder::findPath(), eve::crowd::Crowd::flowAtCell(), eve::crowd::CrowdField::flowAtCell(), eve::animation::AnimSmrSensorCloud::fromSkeletonDense(), eve::procgen::NoiseField::gabor(), eve::math::Math::gabor2(), eve::procgen::gridgraph::generate(), eve::procgen::generateHexTerrainMesh(), eve::procgen::generateSkyscraperMesh(), eve::crowd::Crowd::getCellCost(), eve::crowd::CrowdField::getCellCost(), eve::voxel::VoxelWorld::getChunk(), eve::voxel::VoxelWorld::getChunk(), eve::voxel::VoxelWorld::getOrCreateChunk(), eve::graphics::vulkan::Graphics::getPixel(), eve::voxel::VoxelWorld::getVisibleChunkCoord(), eve::voxel::VoxelWorld::getVoxel(), eve::voxel::VoxelWorld::hasChunk(), eve::procgen::NoiseField::hexDistance(), eve::procgen::NoiseField::hexValue(), eve::archspace::importCellGrid(), eve::spatial::AABB2::intersectsCircle(), eve::spatial::AABB3::intersectsSphere(), eve::crowd::CrowdField::isBlocked(), eve::crowd::isFlowPointReachable(), eve::crowd::Crowd::isReachable(), eve::crowd::CrowdField::isReachable(), eve::procgen::marchingCubes(), eve::hexmap::HexMap::markChunkDirtyAndNeighbors(), eve::procgen::modifyPointBounds(), eve::graphics::vulkan::Graphics::newMeshCylinder(), eve::image::ImageData::paintCircleUv(), eve::map::TileLayer::paintTerrainRect(), eve::logistics::Logistics::placeBelt(), eve::logistics::Logistics::placeMachine(), eve::logistics::Logistics::placeSink(), eve::logistics::Logistics::placeSource(), eve::voxel_editor::VoxelCatalogEditor::pointerDown(), eve::math::Math::pointInCircle(), eve::math::Math::pointInSphere(), eve::crowd::Crowd::Impl::preparePreferredVelocities(), eve::physics::snapshot_detail::prepareWorld3D(), eve::card::printCentered(), eve::rts::projectCrowdSurface(), eve::spatial::BSPTree2D::queryCircle(), eve::spatial::QuadTree::queryCircle(), eve::spatial::SpatialHash2D::queryCircle(), eve::spatial::SpatialHash2D::queryPoint(), eve::spatial::SpatialHash3D::queryPoint(), eve::spatial::BSPTree3D::querySphere(), eve::spatial::Octree::querySphere(), eve::spatial::SpatialHash3D::querySphere(), eve::math::Math::raycastCircle2(), eve::math::Math::raycastSphere(), eve::voxel::VoxelWorld::removeChunk(), eve::card::renderCard(), eve::crowd::CrowdField::resolvePenetration(), eve::graphics::fog::SceneWind::sample(), eve::procgen::TerrainSampler::sample(), eve::physics::BakedParticlePlayback::sample(), eve::procgen::TerrainStreamingCache::sampleCell(), eve::procgen::detail::sampleEveryday(), eve::math::Math::segmentsIntersect(), eve::voxel::VoxelWorld::selectVisible(), eve::voxel::VoxelWorld::serializeWorld(), eve::crowd::Crowd::setBlocked(), eve::crowd::CrowdField::setBlocked(), eve::crowd::Crowd::setCellCost(), eve::crowd::CrowdField::setCellCost(), eve::hd2d::Sprite3D::setFrameIndex(), eve::physics::jolt::BodyBackend::setMassProperties(), eve::fluids::FluidSimulator::setSdfSphere(), eve::animation_editor::AnimationClipEditor::setSelectedRotation(), eve::voxel::VoxelWorld::setVoxel(), eve::graphics::silPomCoverageSoft(), eve::logistics::Logistics::spawnItem(), eve::weather::SnowField::stampFootprint(), eve::weather::SnowField::stampImpact(), eve::procgen::TerrainStreamingCache::streamAround(), eve::graphics::texCellBombSampleUV(), eve::building::assembly_detail::transformPart(), eve::voxel::VoxelWorld::unloadChunksOutside(), eve::pixelworld::PixelWorld::Impl::wakeAround(), eve::grid::worldToCell(), eve::building::PlacementWorld::worldToCell3DX(), eve::building::PlacementWorld::worldToCell3DY(), eve::building::PlacementWorld::worldToCellX(), eve::building::PlacementWorld::worldToCellY(), eve::math::Math::worley3(), eve::procgen::NoiseField3::worleyF1() , 以及 eve::procgen::NoiseField::worleySmooth().

◆ cy

float cy = 0.f

在文件 CardTypes.cpp 第 37 行定义.

被这些函数引用 eve::graphics::Batcher::addRectRotated(), eve::graphics::Batcher::addTexturedRectRotated(), eve::procgen::TerrainAsset::bake(), eve::procgen::ScalarField3D::carveEllipsoid(), eve::logistics::Logistics::cellDir(), eve::spatial::cellKey2(), eve::spatial::cellKey3(), eve::logistics::Logistics::cellKind(), eve::logistics::Logistics::cellMachine(), eve::grid::cellToDepthY(), eve::grid::cellToWorld(), eve::math::Math::circleRectOverlap(), eve::logistics::Logistics::clearCell(), eve::map::TileRenderSystem::collect(), eve::procgen::road::conformHeightmapToRoadWithReceipt(), eve::animation::constrainRigControl(), eve::crowd::CrowdField::costAtCell(), eve::voxel::decodedSecondTriangleMatchesNormal(), eve::voxel::decodedWindingMatchesNormal(), eve::voxel::VoxelWorld::deserializeWorld(), eve::graphics::vulkan::Graphics::drawSceneColorDistortionUVRotated(), eve::graphics::vulkan::Graphics::drawSolidRectRotated(), eve::graphics::webgpu::Graphics::drawSolidRectRotated(), eve::graphics::vulkan::Graphics::drawTexturedRectLitUVRotated(), eve::graphics::webgpu::Graphics::drawTexturedRectLitUVRotated(), eve::graphics::Graphics::drawTexturedRectRotatedRGBA(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUVRotated(), eve::graphics::webgpu::Graphics::drawTexturedRectShaderUVRotated(), eve::physics::Fluid2D::emit(), eve::building::PlacementSystem::ensureBuiltins(), eve::map::TileLayer::eraseTerrainRect(), eve::pixelworld::PixelWorld::extractUnsupportedFragments(), eve::map::Pathfinder::findPath(), eve::crowd::Crowd::flowAtCell(), eve::crowd::CrowdField::flowAtCell(), eve::animation::AnimSmrSensorCloud::fromSkeletonDense(), eve::procgen::NoiseField::gabor(), eve::math::Math::gabor2(), eve::procgen::gridgraph::generate(), eve::procgen::generateBushMesh(), eve::crowd::Crowd::getCellCost(), eve::crowd::CrowdField::getCellCost(), eve::voxel::VoxelWorld::getChunk(), eve::voxel::VoxelWorld::getChunk(), eve::voxel::VoxelWorld::getOrCreateChunk(), eve::graphics::vulkan::Graphics::getPixel(), eve::voxel::VoxelWorld::getVisibleChunkCoord(), eve::voxel::VoxelWorld::getVoxel(), eve::voxel::VoxelWorld::hasChunk(), eve::procgen::NoiseField::hexDistance(), eve::procgen::NoiseField::hexValue(), eve::spatial::AABB2::intersectsCircle(), eve::spatial::AABB3::intersectsSphere(), eve::crowd::CrowdField::isBlocked(), eve::crowd::isFlowPointReachable(), eve::crowd::Crowd::isReachable(), eve::crowd::CrowdField::isReachable(), eve::procgen::marchingCubes(), eve::procgen::modifyPointBounds(), eve::image::ImageData::paintCircleUv(), eve::map::TileLayer::paintTerrainRect(), eve::logistics::Logistics::placeBelt(), eve::logistics::Logistics::placeMachine(), eve::logistics::Logistics::placeSink(), eve::logistics::Logistics::placeSource(), eve::voxel_editor::VoxelCatalogEditor::pointerDown(), eve::math::Math::pointInCircle(), eve::math::Math::pointInSphere(), eve::crowd::Crowd::Impl::preparePreferredVelocities(), eve::card::printCentered(), eve::rts::projectCrowdSurface(), eve::spatial::BSPTree2D::queryCircle(), eve::spatial::QuadTree::queryCircle(), eve::spatial::SpatialHash2D::queryCircle(), eve::spatial::SpatialHash2D::queryPoint(), eve::spatial::SpatialHash3D::queryPoint(), eve::spatial::BSPTree3D::querySphere(), eve::spatial::Octree::querySphere(), eve::spatial::SpatialHash3D::querySphere(), eve::math::Math::raycastCircle2(), eve::math::Math::raycastSphere(), eve::voxel::VoxelWorld::removeChunk(), eve::card::renderCard(), eve::crowd::CrowdField::resolvePenetration(), eve::procgen::revolveVesselSection(), eve::graphics::fog::SceneWind::sample(), eve::procgen::TerrainSampler::sample(), eve::physics::BakedParticlePlayback::sample(), eve::procgen::TerrainStreamingCache::sampleCell(), eve::procgen::detail::sampleEveryday(), eve::math::Math::segmentsIntersect(), eve::voxel::VoxelWorld::selectVisible(), eve::voxel::VoxelWorld::serializeWorld(), eve::crowd::Crowd::setBlocked(), eve::crowd::CrowdField::setBlocked(), eve::crowd::Crowd::setCellCost(), eve::crowd::CrowdField::setCellCost(), eve::hd2d::Sprite3D::setFrameIndex(), eve::physics::jolt::BodyBackend::setMassProperties(), eve::fluids::FluidSimulator::setSdfSphere(), eve::animation_editor::AnimationClipEditor::setSelectedRotation(), eve::voxel::VoxelWorld::setVoxel(), eve::graphics::silPomCoverageSoft(), eve::logistics::Logistics::spawnItem(), eve::procgen::TerrainStreamingCache::streamAround(), eve::graphics::texCellBombSampleUV(), eve::building::assembly_detail::transformPart(), eve::voxel::VoxelWorld::unloadChunksOutside(), eve::pixelworld::PixelWorld::Impl::wakeAround(), eve::grid::worldToCell(), eve::building::PlacementWorld::worldToCell3DX(), eve::building::PlacementWorld::worldToCell3DY(), eve::building::PlacementWorld::worldToCellX(), eve::building::PlacementWorld::worldToCellY(), eve::math::Math::worley3(), eve::procgen::NoiseField3::worleyF1() , 以及 eve::procgen::NoiseField::worleySmooth().

◆ degrees

float degrees = 0.f

在文件 CardTypes.cpp 第 38 行定义.

被这些函数引用 eve::camera::CameraController::addFovImpulse(), eve::graphics::Batcher::addRectRotated(), eve::graphics::Batcher::addTexturedRectRotated(), eve::lighting_editing::Light3DRuntimeApplier::apply(), eve::procgen::densityFromNormal(), eve::graphics::vulkan::Graphics::drawSceneColorDistortionUVRotated(), eve::graphics::vulkan::Graphics::drawSolidRectRotated(), eve::graphics::webgpu::Graphics::drawSolidRectRotated(), eve::graphics::vulkan::Graphics::drawTexturedRectLitUVRotated(), eve::graphics::webgpu::Graphics::drawTexturedRectLitUVRotated(), eve::graphics::Graphics::drawTexturedRectRotatedRGBA(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUVRotated(), eve::graphics::webgpu::Graphics::drawTexturedRectShaderUVRotated(), eve::camera::exposeCinemaDirectorBindings(), eve::procgen::road::RoadNetwork::makeFan(), eve::camera::CinemaDirector::orbitReveal(), eve::housegen::house_detail::rotate(), eve::procgen::LSystem::setAngle(), eve::animation::SpineSkeleton::setBoneLocalRotation(), eve::camera::CameraController::setCameraRoll(), eve::camera::CameraController::setFov(), eve::physics::Cloth::setMaxFoldAngle(), eve::physics::Cloth3D::setMaxFoldAngle(), eve::physics::DistanceField3D::setMoverSlopeLimit(), eve::physics::World3D::setMoverSlopeLimit(), eve::particles::ParticleEmitter::setRenderAxis(), eve::graphics::Renderable2D::setRotation(), eve::spritestack::SpriteStack2D::setRotation(), eve::editor::TransformGizmo::setSnapRotate(), eve::graphics::Light2D::setSpotAngle(), eve::graphics::Light3D::setSpotAngle(), eve::graphics::Water::setWaveDirectionAngle() , 以及 eve::physics::submitRigidPlayback().