载入中...
搜索中...
未找到
SpriteStack.cpp 文件参考
#include "spritestack/SpriteStack.h"
#include "common/Exception.h"
#include "common/ECS.h"
#include "graphics/ClipSpace.h"
#include "graphics/Graphics.h"
#include "graphics/Mesh.h"
#include "graphics/RenderSystem3D.h"
#include "graphics/Shader.h"
#include "graphics/Texture.h"
#include "image/ImageData.h"
#include "model3d/ModelData.h"
#include "spritestack/shaders/sprite_stack_frag_spv.inc"
#include "spritestack/shaders/sprite_stack_vert_spv.inc"
#include <algorithm>
#include <cmath>
#include <cstring>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <memory>
#include <simplesquirrel/simplesquirrel.hpp>
#include <string>
#include <utility>
#include <vector>

浏览源代码.

命名空间

namespace  eve
 
namespace  eve::spritestack
 

函数

std::vector< image::ImageData * > eve::spritestack::sliceMeshToLayers (const SliceInput &input, const SliceOptions &options)
 Slice a triangle mesh into layerCount RGBA8 layer images (caller owns the returned ImageData). Classic sprite stacking: vertical "bread slices" along the chosen axis, later rendered as camera-facing billboards.
 
std::vector< image::ImageData * > eve::spritestack::sliceModelToLayers (model3d::ModelData *model, const SliceOptions &options)
 Slice every mesh of a decoded model (assimp scene) with the same options.
 
std::vector< image::ImageData * > eve::spritestack::slicePrimitiveToLayers (const std::string &kind, const SliceOptions &options)
 Build a procedural CPU mesh ("box" | "cylinder" | "sphere" | "cone") and slice it — a self-contained asset-free path for tests / demos.
 
 eve::spritestack::Module_IMPL (SpriteStack, new SpriteStack())
 

变量说明

◆ color

image::ImageData::Colorf color {1.f, 1.f, 1.f, 1.f}

在文件 SpriteStack.cpp51 行定义.

被这些函数引用 eve::graphics::Batcher::addRect(), eve::graphics::Batcher::addRectRotated(), eve::graphics::Batcher::addTexturedRect(), eve::graphics::Batcher::addTexturedRectRotated(), eve::graphics::GlobalIllumination::applyFromScene(), eve::graphics::vulkan::Graphics::clear(), eve::graphics::webgpu::OffscreenCanvas::clear(), eve::graphics::webgpu::Graphics::clear(), eve::physics::DebugDraw::DrawCircle(), eve::physics::DebugDraw::DrawPolygon(), eve::physics::DebugDraw::DrawSegment(), eve::physics::DebugDraw::DrawSolidCircle(), eve::physics::DebugDraw::DrawSolidPolygon(), eve::graphics::vulkan::Graphics::drawSolidRect(), eve::graphics::webgpu::Graphics::drawSolidRect(), eve::graphics::vulkan::Graphics::drawSolidRectRotated(), eve::graphics::webgpu::Graphics::drawSolidRectRotated(), eve::graphics::vulkan::Graphics::drawTexturedRect(), eve::graphics::webgpu::Graphics::drawTexturedRect(), eve::graphics::vulkan::Graphics::drawTexturedRectLitUV(), eve::graphics::webgpu::Graphics::drawTexturedRectLitUV(), eve::graphics::vulkan::Graphics::drawTexturedRectShader(), eve::graphics::webgpu::Graphics::drawTexturedRectShader(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderDepth(), eve::graphics::webgpu::Graphics::drawTexturedRectShaderDepth(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUV(), eve::graphics::webgpu::Graphics::drawTexturedRectShaderUV(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUVRotated(), eve::graphics::webgpu::Graphics::drawTexturedRectShaderUVRotated(), eve::graphics::vulkan::Graphics::drawTexturedRectUV(), eve::graphics::webgpu::Graphics::drawTexturedRectUV(), eve::housegen::HouseLayout::instantiate(), eve::graphics::Graphics::print(), eve::card::printCentered(), eve::spritestack::SpriteStackBatch::render(), eve::image::ImageData::rotate(), eve::graphics::vulkan::Graphics::setMesh3DLight() , 以及 eve::graphics::webgpu::Graphics::setMesh3DLight().

◆ d

int d = 0

在文件 SpriteStack.cpp39 行定义.

被这些函数引用 eve::ui::UI::addTextWrapped(), eve::sceneloader::SceneLoader::applyTreeDiff(), eve::math::Math::approach(), eve::dialogue::DataValue::array(), eve::json::Value::asInt(), eve::b64_decode(), eve::ui::UI::beginFlex(), eve::dialogue::DataValue::boolean(), eve::graphics::buildClusteredLighting(), eve::ui::button(), eve::data::ByteData::ByteData(), eve::data::ByteData::ByteData(), eve::data::ByteData::ByteData(), eve::ui::checkbox(), eve::ui::child(), eve::card::Hand::clear(), eve::ui::collapsingHeader(), eve::scene::Scene::collectFrustumIdsAt(), eve::ui::combo(), eve::graphics::Mesh::computeBounds(), eve::tensor::TF::concat4(), eve::tensor::TF::constantScalar(), eve::procgen::CloudField::coverageAt(), eve::card::Deck::createDeck(), eve::graphics::Water::createPlane(), eve::graphics::Waterfall::createSheet(), eve::sceneloader::SceneLoader::diff(), eve::sceneloader::SceneLoader::diffTree(), eve::graphics::vulkan::Graphics::drawMeshGBuffer(), eve::graphics::webgpu::Graphics::drawMeshGBuffer(), eve::graphics::vulkan::Graphics::drawMeshGBufferAlpha(), eve::graphics::vulkan::Graphics::drawMeshShader(), eve::graphics::webgpu::Graphics::drawMeshShader(), eve::graphics::webgpu::Graphics::drawMeshShadow(), eve::graphics::vulkan::Graphics::drawMeshShadowAlpha(), eve::graphics::webgpu::Graphics::drawVoxelFaceInstances(), eve::tensor::kernels::embedding(), eve::voxel::faceDirName(), eve::voxel::faceNormal(), eve::tensor::TF::fill1(), eve::tensor::TF::fill2(), eve::tensor::TF::fill3(), eve::tensor::TF::fill4(), eve::procgen::fillDensityField(), eve::tensor::TF::flatten(), eve::ui::flex(), eve::editor::Brush::floodFill(), eve::voxel::Frustum::fromViewProjColumnMajor(), eve::procgen::generateRockMesh(), eve::animation::SpineSkeleton::getBoneWorldMatrix(), eve::card::Card::getCardDefinitionAttack(), eve::card::Card::getCardDefinitionCost(), eve::card::Card::getCardDefinitionHealth(), eve::card::Card::getCardDefinitionKind(), eve::card::Card::getCardDefinitionName(), eve::card::Card::getCardDefinitionTintB(), eve::card::Card::getCardDefinitionTintG(), eve::card::Card::getCardDefinitionTintR(), eve::voxel::VoxelWorld::getCubeTypeTex(), eve::scene::group(), eve::ui::group(), eve::ui::image(), eve::ui::imageButton(), eve::animation::AnimImporter::importEva(), eve::network::NetReader::init(), eve::tensor::Func::input1(), eve::tensor::Func::input2(), eve::tensor::Func::input3(), eve::tensor::Func::input4(), eve::tensor::Func::input5(), eve::tensor::Func::input6(), eve::ui::inputText(), eve::dialogue::DataValue::integer(), eve::sceneloader::SceneLoader::load(), eve::sceneloader::SceneLoader::loadAsync(), eve::network::NetReader::NetReader(), eve::network::NetReader::NetReader(), eve::data::DataModule::newByteData(), eve::data::DataModule::newByteData(), eve::card::Card::newCard(), eve::card::Card::newDeck(), eve::graphics::AmbientOcclusion::newLinearDepthTexture(), eve::graphics::Volumetric::newLinearDepthTexture(), eve::scene::node(), eve::building::PlacementSystem::normalizeRotation(), eve::dialogue::DataValue::number(), eve::dialogue::DataValue::object(), eve::network::NetHost::onDatagram(), eve::tensor::TF::ones1(), eve::tensor::TF::ones2(), eve::tensor::TF::ones3(), eve::tensor::TF::ones4(), eve::tensor::TF::ones5(), eve::tensor::TF::ones6(), eve::image::ImageData::paste(), eve::sceneloader::SceneLoader::pollAsync(), eve::sceneloader::SceneLoader::prewarmAsync(), eve::ui::progress(), eve::network::TcpSocket::queueSend(), eve::scene::rayAABB(), eve::math::Math::raycastBox(), eve::math::Math::raycastRect2(), eve::sceneloader::SceneLoader::reload(), eve::graphics::RenderSystem3D::render(), eve::graphics::vulkan::Graphics::renderEntityIdMask(), eve::tensor::TF::reshape1(), eve::tensor::Tensor::reshape2(), eve::tensor::TF::reshape2(), eve::tensor::Tensor::reshape3(), eve::tensor::TF::reshape3(), eve::tensor::Tensor::reshape4(), eve::tensor::TF::reshape4(), eve::tensor::Tensor::reshape5(), eve::tensor::TF::reshape5(), eve::tensor::Tensor::reshape6(), eve::tensor::TF::reshape6(), eve::map::Fov::Impl::resize(), eve::ui::sameLine(), eve::procgen::TerrainSampler::sample(), eve::graphics::Camera3D::screenToRay(), eve::graphics::Camera2D::screenToWorldX(), eve::graphics::Camera2D::screenToWorldY(), eve::ui::scrollList(), eve::tensor::kernels::sdpa(), eve::virtualgeometry::selectClusters(), eve::ui::separator(), eve::graphics::Camera2D::setAmbient(), eve::graphics::Camera3D::setAmbient(), eve::graphics::Light2D::setColor(), eve::graphics::Light3D::setColor(), eve::graphics::Light3D::setDirection(), eve::graphics::RenderSystem3D::setDirectionalLight(), eve::ui::EditorHost::setEditorValue(), eve::graphics::Camera3D::setEye(), eve::graphics::GlobalIllumination::setLightDirection(), eve::graphics::Volumetric::setLightDirection(), eve::graphics::vulkan::Graphics::setMesh3DLight(), eve::graphics::vulkan::Graphics::setMesh3DLighting(), eve::graphics::Camera2D::setPosition(), eve::graphics::Light3D::setPosition(), eve::graphics::Camera3D::setTarget(), eve::graphics::Light2D::setType(), eve::graphics::Light3D::setType(), eve::graphics::Camera3D::setUp(), eve::ui::slider(), eve::card::Hand::slotTransform(), eve::ui::spacer(), eve::dialogue::DataValue::string(), eve::tensor::Tensor::Tensor(), eve::tensor::Tensor::Tensor(), eve::tensor::Tensor::Tensor(), eve::tensor::Tensor::Tensor(), eve::tensor::Tensor::Tensor(), eve::tensor::Tensor::Tensor(), eve::graphics::texBombHash22(), eve::ui::text(), eve::camera::CameraController::update(), eve::card::Hand::update(), eve::housegen::HouseLayout::validate(), eve::scene::validateUniqueIds(), eve::ui::viewport(), eve::ui::window(), eve::ui::WidgetDesc::withFlexDirection(), eve::grid::worldToCell(), eve::graphics::Camera2D::worldToScreenX(), eve::graphics::Camera2D::worldToScreenY(), eve::network::NetWriter::writeBytes(), eve::tensor::TF::zeros1(), eve::tensor::TF::zeros2(), eve::tensor::TF::zeros3(), eve::tensor::TF::zeros4(), eve::tensor::TF::zeros5() , 以及 eve::tensor::TF::zeros6().

◆ depth

float depth[3] {}

在文件 SpriteStack.cpp50 行定义.

◆ px

glm::vec2 px[3] {}

在文件 SpriteStack.cpp49 行定义.

◆ u

int u = 0

在文件 SpriteStack.cpp37 行定义.

◆ v

int v = 0

在文件 SpriteStack.cpp38 行定义.

被这些函数引用 eve::voxel::CubeTypeRegistry::add(), eve::particles::ParticleCurve::add(), eve::particles::ParticleEmitter::addRotationCurvePoint(), eve::particles::ParticleEmitter::addSizeCurvePoint(), eve::particles::ParticleEmitter::addVelocityCurvePoint(), eve::procgen::MeshBuild::addVertex(), eve::camera::CameraController::addView(), eve::particles::applyConfigDocument(), eve::tensor::kernels::argmax(), eve::dialogue::DataValue::array(), eve::json::Value::asDouble(), eve::b64_decode(), eve::graphics::vulkan::Graphics::bakeMeshMorph(), eve::math::Math::bilinear(), eve::StateValue::boolean(), eve::dialogue::DataValue::boolean(), eve::dialogue::Dialogue::VarValue::boolean(), eve::virtualgeometry::VirtualGeometryBuilder::build(), eve::graphics::buildClusteredLighting(), eve::map::Fov::buildMaskTextureSlice(), eve::animation::clampf(), eve::tensor::kernels::concat(), eve::graphics::Graphics::consumeFrameHad3D(), eve::animation::AnimLattice::deformNormals(), eve::animation::AnimLattice::deformPositions(), eve::thread::Channel::demand(), eve::tensor::q::dequantValue(), eve::rx::Observable< T >::distinctUntilChanged(), eve::tensor::Func::emitSdpa(), eve::dialogue::Dialogue::evalCondition(), eve::network::NetReader::f32(), eve::network::NetReader::f64(), eve::voxel::Chunk::faceAOPackedData(), eve::voxel::Chunk::facePackedData(), eve::map::TileLayer::fill(), eve::procgen::fillHeightField(), eve::rx::Observable< T >::filter(), eve::rx::Observable< T >::first(), eve::tensor::q::floatToEfm(), eve::tensor::q::fp4E2M1ToF32(), eve::tensor::q::fp8E4M3ToF32(), eve::housegen::HouseLayout::fromJson(), eve::animation::AnimSkin::fromModel(), eve::procgen::generateHexPlanetMesh(), eve::dev::SceneInspect::generateViews(), eve::building::PlacementWorld::getAnyOccupant(), eve::procgen::Params::getFloat(), eve::graphics::AmbientOcclusion::getFloat(), eve::graphics::AntiAliasing::getFloat(), eve::graphics::GlobalIllumination::getFloat(), eve::graphics::Outline::getFloat(), eve::graphics::ScreenSpaceReflection::getFloat(), eve::graphics::Volumetric::getFloat(), eve::stylize::StylePass::getFloat(), eve::scene::SceneNodeRef::getForward(), eve::procgen::Params::getInt(), eve::scene::SceneNodeRef::getRight(), eve::scene::SceneNodeRef::getUp(), eve::dialogue::Dialogue::getVarBool(), eve::dialogue::Dialogue::getVarFloat(), eve::dialogue::Dialogue::getVarInt(), eve::dialogue::Dialogue::getVarString(), eve::tensor::gpuReduce(), eve::procgen::grayscaleImage(), eve::network::NetReader::i8(), eve::animation::AnimImporter::importEva(), eve::StateValue::integer(), eve::dialogue::DataValue::integer(), eve::dialogue::Dialogue::VarValue::integer(), eve::tensor::kernels::layernorm(), eve::rx::Value::makeBool(), eve::rx::Value::makeFloat(), eve::event::Variant::makeInt(), eve::rx::Value::makeInt(), eve::event::Variant::makePtr(), eve::rx::Value::makePtr(), eve::event::Variant::makeString(), eve::rx::Value::makeString(), eve::rx::Observable< T >::map(), eve::voxel::GreedyMesher::meshFace(), eve::graphics::vulkan::Graphics::newMeshCylinder(), eve::graphics::webgpu::Graphics::newMeshCylinder(), eve::graphics::vulkan::Graphics::newMeshFromArrays(), eve::graphics::vulkan::Graphics::newMeshFromAssimp(), eve::graphics::webgpu::Graphics::newMeshFromAssimp(), eve::graphics::vulkan::Graphics::newMeshSphere(), eve::graphics::webgpu::Graphics::newMeshSphere(), eve::demo::Demo::newPlanetTexture(), eve::rx::Observer< T >::next(), eve::math::Vec2::normalized(), eve::math::Vec3::normalized(), eve::StateValue::number(), eve::dialogue::DataValue::number(), eve::dialogue::Dialogue::VarValue::number(), eve::dialogue::DataValue::object(), eve::network::UdpLink::onDatagram(), eve::rx::Subject< T >::onNext(), eve::rx::BehaviorSubject< T >::onNext(), eve::rx::ReplaySubject< T >::onNext(), eve::gpgpu::packScriptEntityFloats(), eve::graphics::parallaxOffsetUV(), eve::thread::Channel::pop(), eve::StateValue::pushBack(), ssq::detail::pushValue(), eve::cmdline::detail::put16(), eve::cmdline::detail::put32(), eve::tensor::q::quantize(), eve::procgen::randomSeedValue(), eve::gpgpu::VulkanGpuBuffer::readFloat32(), eve::gpgpu::WebGpuGpuBuffer::readFloat32(), eve::tensor::kernels::reduceAxis(), eve::housegen::HouseComponentLibrary::registerComponent(), eve::map::Fov::removeRevealer(), eve::rpg::restoreRpgState(), eve::animation::AnimStateMachine::restoreState(), eve::dialogue::Dialogue::restoreState(), eve::dev::Snapshot::restoreState(), eve::graphics::grass::sampleHalton(), eve::graphics::grass::samplePoisson(), eve::tensor::kernels::sdpa(), eve::tensor::TF::sdpa(), eve::tensor::TF::sdpaMasked(), eve::graphics::Shader::sendVec2(), eve::graphics::Shader::sendVec3(), eve::graphics::Shader::sendVec4(), eve::StateValue::set(), eve::rx::ReactiveProperty< T >::set(), eve::graphics::Waterfall::setBottomFoam(), eve::virtualgeometry::VirtualGeometryRenderer::setCamera(), eve::dev::SceneInspect::setCameraView(), eve::procgen::CloudShadow::setCloudAltitude(), eve::procgen::CloudField::setCoverage(), eve::procgen::CloudField::setDetail(), eve::graphics::Water::setEdgeFalloff(), eve::ui::EditorHost::setEditorValue(), eve::particles::ParticleEmitter::setFlipbook(), eve::graphics::Waterfall::setFlowSpeed(), eve::graphics::Waterfall::setFoamAmount(), eve::weather::Weather::setFogDensity(), eve::network::HttpRequest::setHeader(), eve::weather::Weather::setIntensity(), eve::graphics::Volumetric::setLightScreenUV(), eve::graphics::ScreenSpaceReflection::setMaxDistance(), eve::graphics::ScreenSpaceReflection::setMaxSteps(), eve::inventory::Bag::setMaxVolume(), eve::procgen::CloudField::setOctaves(), eve::StateValue::setPath(), eve::graphics::Water::setReflectionIntensity(), eve::graphics::Waterfall::setReflectionIntensity(), eve::graphics::Water::setRippleAmplitude(), eve::graphics::Water::setRippleCount(), eve::graphics::Water::setRippleInterval(), eve::procgen::CloudField::setSeamless(), eve::procgen::CloudField::setSoftness(), eve::graphics::ScreenSpaceReflection::setStepLength(), eve::graphics::Waterfall::setStreakCount(), eve::graphics::Waterfall::setStreakScale(), eve::graphics::ScreenSpaceReflection::setStrength(), eve::procgen::CloudShadow::setStrength(), eve::graphics::Water::setSunIntensity(), eve::graphics::Waterfall::setSunIntensity(), eve::weather::Weather::setSunIntensity(), eve::graphics::ScreenSpaceReflection::setThickness(), eve::graphics::Waterfall::setTopFoam(), eve::graphics::Waterfall::setTurbulence(), eve::rx::BehaviorSubject< T >::setValue(), eve::dialogue::Dialogue::setVar(), eve::scene::SceneHost::setVisible(), eve::scene::SceneNodeRef::setVisible(), eve::ui::UIHost::setVisible(), eve::audio::Audio::setVolume(), eve::audio::Source::setVolume(), eve::procgen::CloudField::setWarp(), eve::graphics::Water::setWaveAmplitude(), eve::graphics::Water::setWaveScale(), eve::graphics::Water::setWaveSpeed(), eve::weather::Weather::setWindSpeed(), eve::procgen::CloudField::setWorldScale(), eve::animation::AnimSkin::skinPositions(), eve::rx::Observable< T >::skip(), eve::spritestack::sliceModelToLayers(), eve::tensor::kernels::softmax(), eve::ui::EditorHost::status(), eve::StateValue::string(), eve::dialogue::DataValue::string(), eve::dialogue::Dialogue::VarValue::string(), eve::rx::ReplaySubject< T >::subscribe(), eve::thread::Channel::supply(), eve::buildingfx::BuildingFx::sync(), eve::rx::Observable< T >::take(), eve::graphics::vulkan::OffscreenCanvas::takePendingClear(), eve::rx::Observable< T >::takeUntil(), eve::graphics::texCellBombSampleUV(), eve::housegen::HouseLayout::toJson(), eve::graphics::Batcher::toNDC(), eve::math::Mat4::transformPoint2(), eve::math::Mat4::transformVec3(), eve::network::NetReader::u8(), eve::gpgpu::unpackScriptEntityFloats(), eve::ui::EditorHost::unregisterVM(), eve::graphics::vulkan::Graphics::updateMeshVertices(), eve::inventory::InventorySystem::usedVolume(), eve::ui::WidgetDesc::withChecked(), eve::scene::NodeDesc::withId(), eve::ui::WidgetDesc::withId(), eve::scene::NodeDesc::withKey(), eve::ui::WidgetDesc::withKey(), eve::scene::NodeDesc::withLayer(), eve::scene::NodeDesc::withName(), eve::ui::WidgetDesc::withOpen(), eve::scene::NodeDesc::withSpace(), eve::scene::NodeDesc::withTag(), eve::scene::NodeDesc::withTags(), eve::ui::WidgetDesc::withText(), eve::ui::WidgetDesc::withValue(), eve::ui::WidgetDesc::withValueText(), eve::scene::NodeDesc::withVisible(), eve::ui::WidgetDesc::withVisible(), eve::network::NetWriter::writeBool(), eve::network::NetWriter::writeF32(), eve::network::NetWriter::writeF64(), eve::network::NetWriter::writeI16(), eve::network::NetWriter::writeI32(), eve::network::NetWriter::writeI64(), eve::network::NetWriter::writeI8(), eve::network::NetWriter::writeU16(), eve::network::NetWriter::writeU32(), eve::network::NetWriter::writeU64() , 以及 eve::network::NetWriter::writeU8().