Skip to content

Commit

Permalink
document animmodel::addpart/parts
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Dec 5, 2024
1 parent 8b5fa1c commit 1d1bfe6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/engine/model/animmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -644,13 +644,20 @@ class animmodel : public model
bool calcanim(int animpart, int anim, int basetime, int basetime2, dynent *d, int interp, animinfo &info, int &animinterptime) const;
};

std::vector<part *> parts;
std::vector<part *> parts; //vector of part objects heap-allocated by skelmodel::addpart or part::addpart

//ordinary methods
~animmodel();
animmodel(const animmodel& a) = delete;
animmodel &operator=(const animmodel &a) = delete;

/**
* @brief Creates a heap-allocated part object.
*
* This must be `delete`'d or it will cause a memory leak.
*
* @return a reference to the newly created part
*/
part &addpart();
/**
* @brief Sets up a transformation matrix based on this model's rotation, translation, and scale
Expand Down

0 comments on commit 1d1bfe6

Please sign in to comment.