3#include "game/field/BoxColManager.hh"
4#include "game/field/RailInterpolator.hh"
5#include "game/field/obj/ObjectId.hh"
7#include "game/render/DrawMdl.hh"
9#include "game/system/map/MapdataGeoObj.hh"
11#include <egg/core/BitFlag.hh>
12#include <egg/math/Matrix.hh>
31 virtual void init() {}
32 virtual void calc() {}
33 virtual void calcModel();
34 virtual void load() = 0;
35 [[nodiscard]]
virtual const char *getResources()
const;
36 virtual void loadGraphics();
37 virtual void loadAnims() {}
38 virtual void createCollision() = 0;
39 virtual void loadRail();
40 virtual void calcCollisionTransform() = 0;
42 [[nodiscard]]
virtual const char *getName()
const;
45 [[nodiscard]]
virtual u32 loadFlags()
const {
50 [[nodiscard]]
virtual const char *getKclName()
const;
53 virtual void resize(f32 radius, f32 maxSpeed) {
54 m_boxColUnit->resize(radius, maxSpeed);
58 virtual void disableCollision()
const {
63 virtual void enableCollision()
const {
68 [[nodiscard]]
virtual const EGG::Vector3f &getPosition()
const {
73 [[nodiscard]]
virtual f32 getCollisionRadius()
const {
78 [[nodiscard]]
virtual ObjectId id()
const {
87 m_flags.
setBit(eFlags::Position);
92 m_flags.
setBit(eFlags::Scale);
97 m_flags.
setBit(eFlags::Matrix);
106 void calcTransform();
107 void linkAnims(
const std::span<const char *> &names,
const std::span<Render::AnmType> types);
124 return v0 + (v1 - v0) * t;
Represents a binary resource file which contains object models, textures, and animations.
static EGG::Vector3f RotateXZByYaw(f32 angle, const EGG::Vector3f &v)
Rotates a vector around the Y-axis and returns the XZ-plane portion of the vector.
static f32 CheckPointAgainstLineSegment(const EGG::Vector3f &point, const EGG::Vector3f &a, const EGG::Vector3f &b)
Calculates on what side of line segment ab point lies.
@ Intangible
Ignore collision with the unit.
Wrapper around an integral type with an enum corresponding to its bits.
constexpr TBitFlag< T, E > & resetBit(Es... es)
Resets the corresponding bits for the provided enum values.
constexpr TBitFlag< T, E > & setBit(Es... es)
Sets the corresponding bits for the provided enum values.
A representation of the boundaries of an entity that has dynamic collision.