32 #ifndef RayIntersector_INCLUDE_ONCE 33 #define RayIntersector_INCLUDE_ONCE 57 VL_DEBUG_SET_OBJECT_NAME()
94 VL_DEBUG_SET_OBJECT_NAME()
95 memset(mTriangle, 0xFF,
sizeof(mTriangle));
118 void setTriangle(
int a,
int b,
int c) { mTriangle[0] = a; mTriangle[1] = b; mTriangle[2] = c; }
140 VL_DEBUG_SET_OBJECT_NAME()
160 const std::vector< ref<RayIntersection> >&
intersections()
const {
return mIntersections; }
182 void intersect(
Actor* act);
187 void intersectTriangle(
const T& a,
const T& b,
const T& c,
int ia,
int ib,
int ic,
Actor*,
Geometry* geom,
DrawCall* prim,
int prim_idx);
Associates a Renderable object to an Effect and Transform.
const int * triangle() const
An int[3] representing the indices of the intersected triangle.
DrawCall * drawCalls()
The intersected DrawCall.
The Ray class defines a ray as an origin and direction using real precision.
A set of planes defining a frustum used for culling purposes (frustum culling).
void setDistance(real dist)
The intersection distance.
int triangleIndex() const
The starting index of the intersected primitive inside drawCalls()
static bool sorter(const ref< RayIntersection > &a, const ref< RayIntersection > &b)
const vec3 & intersectionPoint() const
The intersection point, in world coordinates.
const std::vector< ref< RayIntersection > > & intersections() const
The intersection points detected by the last intersect() call sorted according to their distance (the...
const DrawCall * drawCalls() const
The intersected DrawCall.
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
void setTriangleIndex(int t_idx)
The starting index of the intersected primitive inside drawCalls()
The RayIntersection encapsulates all the information relative to a Ray/Actor intersection.
The Geometry class is a Renderable that implements a polygonal mesh made of polygons, lines and points.
Actor * actor()
The intersected Actor.
Visualization Library main namespace.
void setActor(Actor *a)
The intersected Actor.
void setPrimitives(DrawCall *p)
The intersected DrawCall.
void setRay(const Ray &ray)
The ray in world coordinates to be intersected with the actors()
The base class for all the reference counted objects.
The RayIntersectionGeometry encapsulates all the information relative to a Ray/Actor intersection...
Geometry * geometry()
The intersected Geometry.
void setFrustum(const Frustum &frustum)
The frustum in world coordinates used to cull the objects.
The SceneManager class is the base class for all the scene managers.
const Frustum & frustum() const
The frustum in world coordinates used to cull the objects.
const Ray & ray() const
The ray in world coordinates to be intersected with the actors()
void setIntersectionPoint(const vec3 &v)
The intersection point, in world coordinates.
std::vector< ref< RayIntersection > > mIntersections
#define VLGRAPHICS_EXPORT
ActorCollection * actors()
The Actors against which the intersection test is performed.
Defined as a simple subclass of Collection<Actor>, see Collection for more information.
The base class of DrawArrays, DrawElements, MultiDrawElements and DrawRangeElements.
const Geometry * geometry() const
The intersected Geometry.
void setTriangle(int a, int b, int c)
An int[3] representing the indices of the intersected triangle.
The ref<> class is used to reference-count an Object.
ref< ActorCollection > mActors
const ActorCollection * actors() const
The Actors against which the intersection test is performed.
const Actor * actor() const
The intersected Actor.
real distance() const
The intersection distance.
RayIntersectionGeometry()
The RayIntersector class is used to detect the intersection points between a Ray and a set of Actor[s...
void setGeometry(Geometry *g)
The intersected Geometry.