Files
2025-12-15 23:22:33 +08:00

51 lines
1.8 KiB
C++

/***********************************************************************************************************************
*
* Copyright (c) 2010 - 2025 by Tech Soft 3D, Inc.
* The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., and considered a trade secret
* as defined under civil and criminal statutes. Tech Soft 3D shall pursue its civil and criminal remedies in the event
* of unauthorized use or misappropriation of its trade secrets. Use of this information by anyone other than authorized
* employees of Tech Soft 3D, Inc. is granted only under a written non-disclosure agreement, expressly prescribing the
* scope and manner of such use.
*
***********************************************************************************************************************/
#ifndef PART_H
#define PART_H
#include <tuple>
#include <vector>
#include <glm/mat4x4.hpp>
#include "entity.h"
namespace he
{
namespace structure
{
using Context = std::tuple<const A3DMiscCascadedAttributes*, A3DMiscCascadedAttributesData, std::vector<glm::mat4>>;
class Part : public Entity
{
A3DAsmPartDefinition* entity = nullptr;
std::vector<Context> contexts;
public:
Part(A3DAsmPartDefinition* part, const A3DMiscCascadedAttributes* attributes, const glm::mat4& parentPosition);
~Part() = default;
Part(const Part& other);
Part& operator=(const Part& other);
Part(Part&& other) noexcept;
Part& operator=(Part&& other) noexcept;
public:
bool isSame(const A3DAsmPartDefinition* part_def, const A3DMiscCascadedAttributes* graphics, glm::mat4&& position);
const A3DAsmPartDefinition* get_entity() const;
void ri_list(std::vector<A3DRiRepresentationItem*>& ri_list) const;
const std::vector<Context>& get_contexts() const;
std::vector<Context>& grab_contexts();
};
}
}
#endif // PART_H