88 TriMesh::FaceHandle fh =
mesh()->face_handle(_targetIdx);
90 TriMesh::FaceVertexIter fv_it =
mesh()->fv_begin(fh);
104 TriMesh::Scalar t,u,v;
106 hitpointNew = _start + t * _dir;
114 TriMesh::EdgeHandle eh =
mesh()->edge_handle(_targetIdx);
117 TriMesh::HalfedgeHandle heh =
mesh()->halfedge_handle(eh,0);
120 TriMesh::VertexHandle vhbegin =
mesh()->to_vertex_handle(heh);
121 TriMesh::VertexHandle vhend =
mesh()->from_vertex_handle(heh);
136 TriMesh::VertexHandle vh =
mesh()->vertex_handle(_targetIdx);
TriMesh * mesh()
return a pointer to the mesh
PickTarget
What target to use for picking.
picks faces (should be implemented for all nodes)
Type for a MeshObject containing a triangle mesh.
picks verices (may not be implemented for all nodes)
bool triangleIntersection(const Vec &_o, const Vec &_dir, const Vec &_v0, const Vec &_v1, const Vec &_v2, typename Vec::value_type &_t, typename Vec::value_type &_u, typename Vec::value_type &_v)
Intersect a ray and a triangle.
picks edges (may not be implemented for all nodes)
virtual ~TriMeshObject()
destructor
TriMeshObject(const TriMeshObject &_object)
copy constructor
ACG::Vec3d refinePick(ACG::SceneGraph::PickTarget _pickTarget, const ACG::Vec3d _hitPoint, const ACG::Vec3d _start, const ACG::Vec3d _dir, const unsigned int _targetIdx)
Refine picking on triangle meshes.
Vec::value_type distPointLineSquared(const Vec &_p, const Vec &_v0, const Vec &_v1, Vec *_min_v)
squared distance from point _p to line segment (_v0,_v1)