50 void setDuration(
float seconds);
60 void setWidth(
float pixels);
65 void setColor(
float r,
float g,
float b,
float a = 1.f);
76 void setFade(
bool enable);
81 void setStyle(
const std::string &style);
83 std::string getStyle()
const;
89 void setDrawScale(
float sx,
float sy);
95 void setDrawOffset(
float ox,
float oy);
102 void addPoint(
float x,
float y);
104 void addPoint3(
float x,
float y,
float z);
111 void sampleBone(
const AnimPose *
pose,
int boneIndex,
const std::string &plane =
"xy");
113 void sampleBoneOffset(
const AnimPose *
pose,
int boneIndex,
float ox,
float oy,
float oz,
114 const std::string &plane =
"xy");
122 void update(
float dt);
127 float getPointX(
int index)
const;
129 float getPointY(
int index)
const;
131 float getPointZ(
int index)
const;
133 float getPointAge(
int index)
const;
135 float getPointAlpha(
int index)
const;
141 enum class Style { Line, Points };
144 float x = 0.f,
y = 0.f,
z = 0.f;
148 void pushPoint(
float x,
float y,
float z);
149 void requireIndex(
int index)
const;
150 void projectPlane(
float x,
float y,
float z,
const std::string &plane,
float *outX,
152 float alphaFor(
const Point &
p)
const;
153 void toScreen(
float x,
float y,
float *
sx,
float *
sy)
const;
154 void drawSegment(graphics::Graphics *gfx,
float x0,
float y0,
float x1,
float y1,
float a0,
156 void drawDot(graphics::Graphics *gfx,
float x,
float y,
float alpha)
const;
159 float duration_ = 0.5f;
160 float minDistance_ = 0.f;
162 float colorR_ = 1.f, colorG_ = 0.85f, colorB_ = 0.35f, colorA_ = 1.f;
164 Style style_ = Style::Line;
166 float drawScaleX_ = 1.f;
167 float drawScaleY_ = 1.f;
168 float drawOffsetX_ = 0.f;
169 float drawOffsetY_ = 0.f;
171 std::vector<Point> points_;
173 bool hasLastTick_ =
false;
175 void updateUnchecked(
float dt);
eve::EntitySpatialPose pose
#define EVENGINE_API_WORLD
Common time values and an injectable deterministic simulation clock.
Move-only operation result carrying either a value or Status.
Evaluated local (and optional world) pose for an AnimSkeleton. Script type: AnimPose.
Motion trail / afterimage recorder + 2D trajectory drawer.
float getColorB() const
Returns the color b.
bool getFade() const
Returns the fade.
int getPointCount() const
Returns the point count.
~AnimTrail()=default
Anim trail.
float getDrawScaleY() const
Returns the draw scale y.
float getWidth() const
Returns the width.
float getDrawOffsetX() const
Returns the draw offset x.
AnimTrail & operator=(const AnimTrail &)=delete
float getColorR() const
Returns the color r.
float getDrawOffsetY() const
Returns the draw offset y.
float getDrawScaleX() const
Returns the draw scale x.
float getMinDistance() const
Returns the min distance.
AnimTrail(const AnimTrail &)=delete
float getColorG() const
Returns the color g.
float getColorA() const
Returns the color a.
float getDuration() const
Returns the duration.
int getCapacity() const
Returns the capacity.
static constexpr StrongUint64 zero() noexcept
Returns the zero value for this strong type.
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
One deterministic fixed-step emitted by SimulationClock.