#include <geometry_local_triangle_frame.h>
Public Types | |
typedef vector3_type_ | vector3_type |
typedef vector3_type::value_type | real_type |
Public Member Functions | |
real_type const & | a () const |
real_type const & | b () const |
real_type const & | h () const |
vector3_type const & | nv0 () const |
vector3_type const & | nv1 () const |
vector3_type const & | nv2 () const |
vector3_type const & | ne0 () const |
vector3_type const & | ne1 () const |
vector3_type const & | ne2 () const |
vector3_type const & | v0 () const |
vector3_type const & | v1 () const |
vector3_type const & | v2 () const |
vector3_type const & | n () const |
vector3_type const & | unit_a () const |
vector3_type const & | unit_h () const |
vector3_type | xform_normal (vector3_type const &n) |
void | init (vector3_type const &p0, vector3_type const &p1, vector3_type const &p2) |
vector3_type | get_local_coord (vector3_type const &p) const |
void | compute_local_normals (vector3_type const &nv0, vector3_type const &nv1, vector3_type const &nv2, vector3_type const &ne0, vector3_type const &ne1, vector3_type const &ne2) |
Protected Attributes | |
vector3_type | m_v0 |
Vertices in CCW order. | |
vector3_type | m_v1 |
vector3_type | m_v2 |
vector3_type | m_n |
Triangle face normal. | |
vector3_type | m_a_vec |
vector3_type | m_b_vec |
vector3_type | m_h_vec |
real_type | m_a_norm_inv |
real_type | m_b_norm |
real_type | m_h_norm_inv |
real_type | m_a |
The value of the triangle extent along the positive direction of the local r-axe. | |
real_type | m_b |
The value of the triangle extent along the negative direction of the local r-axe. | |
real_type | m_h |
The value of the triangle extent along the positive direction of the local s-axe. | |
unsigned int | m_offset |
Cyclic permuation offset, used to match the cyclic of vertices given in wcs to corresponding vertices in local frame. | |
vector3_type | m_nv0 |
Vertex normal of vertex v0 in local frame. | |
vector3_type | m_nv1 |
vector3_type | m_nv2 |
vector3_type | m_ne0 |
Edge normal of edge running between v0 and v1 in local frame. | |
vector3_type | m_ne1 |
vector3_type | m_ne2 |
vector3_type | m_a_unit |
Unit vector of a-vector (m_a_vec). | |
vector3_type | m_h_unit |
Unit vector of h-vector (m_h_vec). |
typedef vector3_type::value_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::real_type |
typedef vector3_type_ OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::vector3_type |
real_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::a | ( | ) | const [inline] |
real_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::b | ( | ) | const [inline] |
void OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::compute_local_normals | ( | vector3_type const & | nv0, | |
vector3_type const & | nv1, | |||
vector3_type const & | nv2, | |||
vector3_type const & | ne0, | |||
vector3_type const & | ne1, | |||
vector3_type const & | ne2 | |||
) | [inline] |
Compute Local Normals. Assumes that the init() method has been invoked prior to calling this method. To access the local normals, use the nv0,nv1,nv2,ne0,ne1,ne2 accessor methods.
Observe that the local face normal is simply the positive z-axis, so there is no need for actual computing it.
nv0 | Vertex normal corresponding to vertex p0 in global frame. | |
nv1 | ||
nv2 | ||
ne0 | Edge normal corresponding to edge running between p0 and p1 in global frame. | |
ne1 | ||
ne2 |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::get_local_coord | ( | vector3_type const & | p | ) | const [inline] |
Get Local Triangle Coordinates. Note initLocalCoordFrame must be invoked prior to invocation of this method.
p | World space Coordinates. | |
u | Upon return this vector contains the local triangle coordinates r,s and t. |
real_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::h | ( | ) | const [inline] |
void OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::init | ( | vector3_type const & | p0, | |
vector3_type const & | p1, | |||
vector3_type const & | p2 | |||
) | [inline] |
p0 | ||
p1 | ||
p2 |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::n | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::ne0 | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::ne1 | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::ne2 | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::nv0 | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::nv1 | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::nv2 | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::unit_a | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::unit_h | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::v0 | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::v1 | ( | ) | const [inline] |
vector3_type const& OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::v2 | ( | ) | const [inline] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::xform_normal | ( | vector3_type const & | n | ) | [inline] |
Transform Normal
n | The normal given in global frame |
real_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_a [protected] |
The value of the triangle extent along the positive direction of the local r-axe.
real_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_a_norm_inv [protected] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_a_unit [protected] |
Unit vector of a-vector (m_a_vec).
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_a_vec [protected] |
real_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_b [protected] |
The value of the triangle extent along the negative direction of the local r-axe.
real_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_b_norm [protected] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_b_vec [protected] |
real_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_h [protected] |
The value of the triangle extent along the positive direction of the local s-axe.
real_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_h_norm_inv [protected] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_h_unit [protected] |
Unit vector of h-vector (m_h_vec).
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_h_vec [protected] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_n [protected] |
Triangle face normal.
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_ne0 [protected] |
Edge normal of edge running between v0 and v1 in local frame.
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_ne1 [protected] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_ne2 [protected] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_nv0 [protected] |
Vertex normal of vertex v0 in local frame.
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_nv1 [protected] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_nv2 [protected] |
unsigned int OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_offset [protected] |
Cyclic permuation offset, used to match the cyclic of vertices given in wcs to corresponding vertices in local frame.
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_v0 [protected] |
Vertices in CCW order.
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_v1 [protected] |
vector3_type OpenTissue::geometry::LocalTriangleFrame< vector3_type_ >::m_v2 [protected] |