载入中...
搜索中...
未找到
HairCards.cpp 文件参考
#include "graphics/HairCards.h"
#include "common/Exception.h"
#include "graphics/Graphics.h"
#include "graphics/HairShader.h"
#include "graphics/Material.h"
#include "graphics/Mesh.h"
#include "graphics/RenderSystem3D.h"
#include "graphics/Shader.h"
#include <cmath>

浏览源代码.

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::graphics
 卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局参数。 数据模型与渲染/交互逻辑见 CardTypes.h。
 
namespace  eve::graphics::hair
 Procedural hair/fur card meshes + material/LOD helpers (no strand simulation).
 

函数

CardMeshData eve::graphics::hair::buildCard (float width=0.12f, float height=0.45f)
 Build a single upright card in local space (origin at root, height along +Y, face +Z).
 
CardMeshData eve::graphics::hair::buildCardsAlongPolyline (const float *pointsXYZ, int pointCount, float width=0.08f)
 Build one card per polyline segment, facing a camera-facing side approximated by world up.
 
CardMeshData eve::graphics::hair::buildCardsFromRoots (const CardRoot *roots, int rootCount)
 Expand root samples into independent cards.
 
void eve::graphics::hair::appendCardMesh (CardMeshData &dst, const CardMeshData &src)
 Append src into dst (vertex/index rebase).
 
Mesh * eve::graphics::hair::uploadCardMesh (Graphics *gfx, const CardMeshData &data)
 Upload card arrays as a Graphics-owned Mesh.
 
Mesh * eve::graphics::hair::newCardMesh (Graphics *gfx, float width=0.12f, float height=0.45f)
 Convenience: single card mesh.
 
void eve::graphics::hair::applyCardDefaults (Material &mat)
 Apply transparent hair-card surface defaults (double-sided, no depth write/shadows). Does not create or assign a shader.
 
Material * eve::graphics::hair::makeCardMaterial (Graphics *gfx, Texture *albedo=nullptr, Shader *hairShader=nullptr)
 Create a Material configured for hair cards and optionally bind the hair shader + albedo.
 
void eve::graphics::hair::configureCardLod (Renderable3D *renderable, Mesh *nearCards, Mesh *farProxy, float switchDistance)
 Wire near/far geometric LOD on a renderable (index 0 = cards, index 1 = proxy).