25 #ifndef __I6ENGINE_API_MESHAPPEARANCECOMPONENT_H__
26 #define __I6ENGINE_API_MESHAPPEARANCECOMPONENT_H__
95 void setVisibility(
const bool visible);
104 void setMesh(
const std::string & meshName);
114 void setCustomParameter(uint32_t num,
const Vec4 & value);
132 inline std::string
getMesh()
const {
return _meshName; }
137 void setMaterial(
const std::string & materialName);
142 void playAnimation(
const std::string & anim,
bool looping,
double offsetPercent);
147 void setAnimationSpeed(
double animationSpeed);
152 void stopAnimation();
160 return "MeshAppearance";
163 std::vector<componentOptions> getComponentOptions()
override;
168 void drawBoundingBox(
const Vec3 & colour)
const;
173 void removeBoundingBox()
const;
178 void attachGameObjectToBone(
const api::GOPtr & go,
const std::string & boneName);
183 void detachGameObjectFromBone(
const api::GOPtr & go,
const std::string & boneName);
189 void addAnimationFrameEvent(uint64_t frameTime,
const std::function<
void(
void)> & func)
const;
194 Transform getBoneTransform(
const std::string & name)
const;
199 void setShadowCasting(
bool enabled);
205 std::string _meshName;
216 std::string _material;
220 mutable std::mutex _boneTransformLock;
221 std::map<std::string, Transform> _boneTransforms;
223 void Init()
override;
225 void Finalize()
override;
227 virtual std::pair<AddStrategy, int64_t> howToAdd(
const ComPtr & comp)
const override;
233 void sendUpdateMessage()
const;
235 void updateBoneTransforms(
const std::map<std::string, Transform> & boneTransformMap);
std::string getMesh() const
Gets the GameObject's mesh name.
Implements 4-dimensional vectors.
Class describing a 3d rotation.
#define ISIXE_MODULES_API
std::map< std::string, std::string > attributeMap
Implements 3-dimensional vectors.
Vec3 getPosition() const
returns the position of the mesh
std::string getTemplateName() const override
returns the name this template was registered with
A shared pointer counting references and adds objects being not referenced any more to an internal li...
Tells the engine what model/mesh to use when rendering the GameObject. For creating a MeshAppearanceC...
Handles all light related functionality.
std::pair< Vec3, Quaternion > Transform
bool getVisibility() const
Gets the GameObject's visibility.
Component Base Class. All Components must derive from Component.
i6e::math::i6eVector4 Vec4