Tulip
5.7.4
Large graphs analysis and drawing
AroundTexturedSphere.h
1
/**
2
*
3
* This file is part of Tulip (https://tulip.labri.fr)
4
*
5
* Authors: David Auber and the Tulip development Team
6
* from LaBRI, University of Bordeaux
7
*
8
* Tulip is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU Lesser General Public License
10
* as published by the Free Software Foundation, either version 3
11
* of the License, or (at your option) any later version.
12
*
13
* Tulip is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
* See the GNU General Public License for more details.
17
*
18
*/
19
///@cond DOXYGEN_HIDDEN
20
21
#include <tulip/Glyph.h>
22
23
namespace
tlp
{
24
25
struct
BoundingBox;
26
27
/** \addtogroup glyph */
28
/*@{*/
29
/// A 3D glyph.
30
/**
31
* This glyph draws a sphere using the "viewColor" node property value.
32
* and apply a texture around it
33
*/
34
class
TLP_GL_SCOPE AroundTexturedSphere :
public
NoShaderGlyph {
35
const
std::string textureFile;
36
const
unsigned
char
alpha;
37
38
public
:
39
AroundTexturedSphere(
const
tlp::PluginContext
*context =
nullptr
,
40
const
std::string &aroundTextureFile =
""
,
unsigned
char
alphaVal = 255)
41
: NoShaderGlyph(context), textureFile(aroundTextureFile), alpha(alphaVal) {}
42
void
getIncludeBoundingBox(BoundingBox &boundingBox, node)
override
;
43
void
draw(node n,
float
)
override
;
44
static
void
drawGlyph(
const
Color &glyphColor,
const
Size &glyphSize,
const
std::string &texture,
45
const
std::string &texturePath,
const
std::string &aroundTextureFile,
46
unsigned
char
alpha = 255);
47
};
48
}
// end of namespace tlp
49
50
///@endcond
tlp::PluginContext
Contains runtime parameters for a plugin.
Definition:
PluginContext.h:42
tlp
Definition:
AbstractProperty.h:34
library
tulip-ogl
include
tulip
AroundTexturedSphere.h
Generated on Fri Mar 22 2024 13:48:59 for Tulip by
1.9.1