AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
TextureAtlasBuilder.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17
18#ifndef AGXOSG_TEXTURE_ATLAS_BUILDER_H
19#define AGXOSG_TEXTURE_ATLAS_BUILDER_H
20
21#include <agx/debug.h>
22#include <agxCollide/Trimesh.h>
23
24#include <agxOSG/export.h>
25
26#include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
27#include <osg/Image>
28#include <osg/Array>
29#include <agx/PopDisableWarnings.h> // End of disabled warnings.
30
31namespace agxOSG
32{
34 {
35 public:
36 virtual osg::ref_ptr<osg::Image> createAtlas(const agxCollide::Trimesh* mesh, osg::Vec2Array& textureCoordinates, agx::Real texelsPerMeter) = 0;
37
39 {
40 public:
41 AtlasCreationFailure(const agxCollide::Trimesh* mesh, const std::string& what);
43 };
44 };
45
46
48 {
49 public:
50 virtual osg::ref_ptr<osg::Image> createAtlas(const agxCollide::Trimesh* mesh, osg::Vec2Array& textureCoordinates, agx::Real texelsPerMeter) override;
51
53 {
54 public:
55 AttemptsExhausted(const agxCollide::Trimesh* mesh, int atlasSizeWidth, int atlasSizeHeight, unsigned attempts);
58 unsigned attempts;
59 };
60 };
61}
62
63#endif
64
#define AGXOSG_EXPORT
Mesh is a common base class for triangle meshes, such as Mesh or HeightField.
Definition Mesh.h:70
Triangle mesh for geometric intersection tests.
Definition Trimesh.h:43
AttemptsExhausted(const agxCollide::Trimesh *mesh, int atlasSizeWidth, int atlasSizeHeight, unsigned attempts)
virtual osg::ref_ptr< osg::Image > createAtlas(const agxCollide::Trimesh *mesh, osg::Vec2Array &textureCoordinates, agx::Real texelsPerMeter) override
AtlasCreationFailure(const agxCollide::Trimesh *mesh, const std::string &what)
virtual osg::ref_ptr< osg::Image > createAtlas(const agxCollide::Trimesh *mesh, osg::Vec2Array &textureCoordinates, agx::Real texelsPerMeter)=0
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
double Real
Definition Real.h:42
std::runtime_error Error
Definition debug.h:50