// Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors. // All rights reserved. // Code licensed under the BSD License. // http://www.anki3d.org/LICENSE #pragma once #include #include #include #include namespace anki { /// @addtogroup resource /// @{ /// CPU Mesh Resource. It contains the geometry packed in CPU buffers. class CpuMeshResource : public ResourceObject { public: /// Default constructor CpuMeshResource(ResourceManager* manager); ~CpuMeshResource(); /// Load from a mesh file ANKI_USE_RESULT Error load(const ResourceFilename& filename, Bool async); ConstWeakArray getPositions() const { return m_positions; } ConstWeakArray getIndices() const { return m_indices; } const PhysicsCollisionShapePtr& getCollisionShape() const { return m_physicsShape; } private: DynamicArray m_positions; DynamicArray m_indices; PhysicsCollisionShapePtr m_physicsShape; }; /// @} } // namespace anki