/usr/include/tulip/GlSimpleEntity.h is in libtulip-ogl-dev 3.1.2-2.3ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | //-*-c++-*-
/**
Authors: David Auber, Patrick Mary, Morgan Mathiaut
from the LaBRI Visualization Team
Email : auber@tulip-software.org
Last modification : 13/03/2009
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*/
#ifndef Tulip_GLSIMPLEENTITY_H
#define Tulip_GLSIMPLEENTITY_H
#include <vector>
#include "tulip/GlEntity.h"
#include "tulip/GlSceneVisitor.h"
#include "tulip/Camera.h"
#include "tulip/GlXMLTools.h"
#include <tulip/BoundingBox.h>
namespace tlp {
/**
* Base class for all simple entity (entity who not need GraphInputData
*/
class TLP_GL_SCOPE GlSimpleEntity : public GlEntity {
public:
GlSimpleEntity():visible(true),stencil(0xFFFF),checkByBoundingBoxVisitor(true) {}
/**
* Draw function
*/
virtual void draw(float lod,Camera* camera) = 0;
/**
* Accept visitor function
*/
virtual void acceptVisitor(GlSceneVisitor *visitor) {
visitor->visit(this);
}
/**
* Set if entity is visible
*/
void setVisible(bool visible) {this->visible=visible;}
/**
* Return if entity is visible
*/
bool isVisible() {return visible;}
/**
* Set stencil number of the entity
*/
virtual void setStencil(int stencil) {this->stencil=stencil;}
/**
* Return stencil number of entity
*/
int getStencil() {return stencil;}
/**
* Set if the entity is check by boundingbox visitor
*/
void setCheckByBoundingBoxVisitor(bool check) {checkByBoundingBoxVisitor=check;}
/**
* Return if entity is check by boudingbox visitor
*/
bool isCheckByBoundingBoxVisitor() {return checkByBoundingBoxVisitor;}
/**
* Return the entity boundingbox
*/
virtual BoundingBox getBoundingBox() {return boundingBox;}
/**
* Add a parent to this entity
*/
void addParent(GlLayer *layer) {parents.push_back(layer);}
/**
* virtual fucntion : Translate entity
*/
virtual void translate(const Coord &mouvement){};
/**
* Save the entity in Xml
*/
virtual void getXML(xmlNodePtr rootNode) =0;
/**
* Load entity with Xml
*/
virtual void setWithXML(xmlNodePtr rootNode) =0;
protected:
bool visible;
int stencil;
bool checkByBoundingBoxVisitor;
BoundingBox boundingBox;
std::vector<GlLayer*> parents;
};
}
#endif // Tulip_GLSIMPLEENTITY_H
|