32 #ifndef EdgeUpdateCallback_INCLUDE_ONCE 33 #define EdgeUpdateCallback_INCLUDE_ONCE 51 VL_DEBUG_SET_OBJECT_NAME()
54 EdgeUpdateCallback(
const std::vector<EdgeExtractor::Edge>& edge): mEdges(edge), mShowCreases(false)
56 VL_DEBUG_SET_OBJECT_NAME()
80 for(
unsigned i=0; i<
edges().size(); ++i)
90 insert_edge =
dot(n1, v) *
dot(n2, v) < 0;
94 vert_array->at(i*2+0) =
edges()[i].vertex1();
95 vert_array->at(i*2+1) =
edges()[i].vertex2();
100 vert_array->at(i*2+0) = vert_array->at(i*2+1);
105 const std::vector<EdgeExtractor::Edge>&
edges()
const {
return mEdges; }
106 std::vector<EdgeExtractor::Edge>&
edges() {
return mEdges; }
109 std::vector<EdgeExtractor::Edge> mEdges;
Associates a Renderable object to an Effect and Transform.
const mat4 & viewMatrix() const
Returns the Camera's view matrix (inverse of the modeling matrix).
const Vector3 & normalize(T_Scalar *len=NULL)
Transform * transform()
Returns the Transform bound tho an Actor.
const std::vector< EdgeExtractor::Edge > & edges() const
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
Visualization Library main namespace.
The EdgeUpdateCallback class updates at every frame the edges of an Actor for the purpose of edge-enh...
float dot(float a, float b)
virtual void onActorRenderStarted(Actor *act, real, const Camera *cam, Renderable *renderable, const Shader *, int pass)
Event generated just before an Actor is rendered but after the render states are ready and setup...
T_Scalar getInverse(Matrix4 &dest) const
virtual void onActorDelete(Actor *)
Event notifying that an Actor is being deleted.
An abstract class that represents all the objects that can be rendered.
std::vector< EdgeExtractor::Edge > & edges()
The ActorEventCallback class defines a callback object to react to Actor-related events.
Manages most of the OpenGL rendering states responsible of the final aspect of the rendered objects...
bool showCreases() const
If true only the edges forming the silhouette of an object will be rendered.
void setShowCreases(bool sonly)
If true only the edges forming the silhouette of an object will be rendered.
The ref<> class is used to reference-count an Object.
Matrix4< float > fmat4
A 4x4 matrix using float precision.
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
EdgeUpdateCallback(const std::vector< EdgeExtractor::Edge > &edge)