73 for(
size_t i=0; i<geom->
drawCalls().size(); ++i)
111 T pts[] = { a, b, c, a };
112 for(
int i=0; i<3; ++i)
115 if (
dot(fp-pts[i],bi_norm) < 0)
The ArrayAbstract class defines an abstract interface to conveniently manipulate data stored in a Buf...
Associates a Renderable object to an Effect and Transform.
bool hasNext()
Returns false if the iterator has reached the end of the triangle list.
const Renderable * lod(int lod_index) const
Returns the Renderable object representing the LOD level specifed by lod_index.
const Vector3 & normalize(T_Scalar *len=NULL)
Transform * transform()
Returns the Transform bound tho an Actor.
const vec3 & origin() const
void intersectGeometry(Actor *act, Geometry *geom)
The Ray class defines a ray as an origin and direction using real precision.
const ArrayAbstract * vertexArray() const
Conventional vertex array.
void setDistance(real dist)
The intersection distance.
bool cull(const Sphere &sphere) const
void intersect()
Executes the intersection test.
static bool sorter(const ref< RayIntersection > &a, const ref< RayIntersection > &b)
virtual void extractVisibleActors(ActorCollection &list, const Camera *camera)=0
Extracts all the enabled and visible Actors contained in the ActorTree hierarchy and appends them to ...
const vec3 & direction() const
fvec3 cross(const fvec3 &v1, const fvec3 &v2)
virtual vec3 getAsVec3(size_t vector_index) const =0
Returns a vector from the buffer as a vec3 value.
void setTriangleIndex(int t_idx)
The starting index of the intersected primitive inside drawCalls()
The Geometry class is a Renderable that implements a polygonal mesh made of polygons, lines and points.
Visualization Library main namespace.
float dot(float a, float b)
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()
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)
virtual TriangleIterator triangleIterator() const =0
Returns a TriangleIterator used to iterate through the triangles of a DrawCall.
The RayIntersectionGeometry encapsulates all the information relative to a Ray/Actor intersection...
The SceneManager class is the base class for all the scene managers.
Iterator used to extract the indices of every single triangle of a DrawCall regardless of the primiti...
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
The base class of DrawArrays, DrawElements, MultiDrawElements and DrawRangeElements.
fmat4 mat4
Defined as: 'typedef fmat4 mat4'. See also VL_PIPELINE_PRECISION.
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.
const ActorCollection * actors() const
The Actors against which the intersection test is performed.
Collection< DrawCall > & drawCalls()
Returns the list of DrawCall objects bound to a Geometry.
void setGeometry(Geometry *g)
The intersected Geometry.