- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes

# TargetLocation Class Reference

Search for all occurrences

## Detailed Description

This class holds information about a reference point on the target mesh.

This class contains all the information which normally contained by a SurfacePoint class, but it extends it with some more. This class is filled by the layout node when it finds a reference point on the target mesh and would like the map extractor node to process this location, i.e. find the related source point, and calculate data values for it.

Definition at line 430 of file MapExtractorInterface.h.

`#include <MapExtractorInterface.h>`

Inheritance diagram for TargetLocation:
[legend]

List of all members.

## Public Member Functions
| TargetLocation (void)
| TargetLocation (class mudbox::Mesh *pMesh, unsigned int iVertexIndex, unsigned int iFaceIndex)
void | Fill (class mudbox::Mesh *pMesh, unsigned int iFaceIndex, float fFaceU, float fFaceV, float fDiameter=1.0f)
| Fill the structure with raw data.
void | FillUsingUV (class mudbox::Mesh *pMesh, unsigned int iFaceIndex, float fU, float fV, mudbox::SurfaceSmoother *pSS=NULL, float fDiameter=1.0f)
| This function fills the structure base on UV values.
void | FillNSided (class mudbox::Mesh *pMesh, unsigned int iFaceIndex, const mudbox::Vector &vPosition, float fDiameter=1.0f)
| This function fills the structure with a point on a polygon with arbitrary number of corners.
mudbox::Base | TangentBase (void) const
| Returns the tangent base at the surface point in local space.
## Public Attributes
float | m_fDiameter
| This data member is an approximation of the influence area on the target mesh, i.e.
int | m_aLayoutData [16]
| This data member is a general area, where the layout can store some information about the reference point, which later will be used by the utilizer class.
unsigned int | m_iReferenceFaceIndex
| Sometimes it is necessary to use two different locations on the target mesh, one as a reference point, and one for the rest of the calculation.
float | m_fReferenceFaceU
| Sometimes it is necessary to use two different locations on the target mesh, one as a reference point, and one for the rest of the calculation.
float | m_fReferenceFaceV
unsigned int | m_iIndex
| Index of the target location in the queue.
mudbox::Base | m_bTangent

## Constructor & Destructor Documentation

TargetLocation | ( | void |  | ) | `[inline]`

Definition at line 454 of file MapExtractorInterface.h.

    : m_iReferenceFaceIndex( 0xffffffff ) {};

TargetLocation | ( | class mudbox::Mesh * | pMesh,
|  | unsigned int | iVertexIndex,
|  | unsigned int | iFaceIndex
| ) |  | `[inline]`

Definition at line 455 of file MapExtractorInterface.h.

    : SurfacePoint( pMesh, iVertexIndex, iFaceIndex ), m_iReferenceFaceIndex( 0xffffffff ) {};

## Member Function Documentation

void Fill | ( | class mudbox::Mesh * | pMesh,
|  | unsigned int | iFaceIndex,
|  | float | fFaceU,
|  | float | fFaceV,
|  | float | fDiameter = `1.0f`
| ) |  |

Search for all occurrences

Fill the structure with raw data.

Parameters:

  [in] | pMesh | Pointer to the mesh object. This cannot be NULL.
  [in] | iFaceIndex | Index of the face on the surface which contains the surface point.
  [in] | fFaceU | Horizontal coordinate of the point inside the current face. This must be between 0 and 1.
  [in] | fFaceV | Horizontal coordinate of the point inside the current face. This must be between 0 and 1.
  [in] | fDiameter | Diameter of the area which is represented by the reference point. This is an approximation in most cases.

void FillUsingUV | ( | class mudbox::Mesh * | pMesh,
|  | unsigned int | iFaceIndex,
|  | float | fU,
|  | float | fV,
|  | mudbox::SurfaceSmoother * | pSS = `NULL`,
|  | float | fDiameter = `1.0f`
| ) |  |

Search for all occurrences

This function fills the structure base on UV values.

When the layout has the UV value of the point it wants to process, it can use this function to fill the TargetLocation structure.

Parameters:

  [in] | pMesh | Address of the mesh.
  [in] | iFaceIndex | Index of a face which probably contains the given UV values. The function might refine this index and use a different one.
  [in] | fU | U texture coordinate of the point.
  [in] | fV | V texture coordinate of the point.
  [in] | pSS | Address of a SurfaceSmoother node if the function should work based on smoothed texture coordinates, NULL otherwise.
  [in] | fDiameter | Diameter of the area this location represents, in world space.

void FillNSided | ( | class mudbox::Mesh * | pMesh,
|  | unsigned int | iFaceIndex,
|  | const mudbox::Vector & | vPosition,
|  | float | fDiameter = `1.0f`
| ) |  |

Search for all occurrences

This function fills the structure with a point on a polygon with arbitrary number of corners.

This function can be used on meshes with nsided polygons where n is an arbitrary number.

Parameters:

  [in] | pMesh | Address of a triangular mesh representing an nsided surface.
  [in] | iFaceIndex | Index of the first triangle which belongs to the polygon.
  [in] | vPosition | Coordinate of the point in object space.
  [in] | fDiameter | Diameter of the area this location represents, in world space.

mudbox::Base TangentBase | ( | void |  | ) | const `[inline]`

Search for all occurrences

Returns the tangent base at the surface point in local space.

Reimplemented from SurfacePoint.

Definition at line 486 of file MapExtractorInterface.h.

    { return m_bTangent; };

## Member Data Documentation

float m_fDiameter

Search for all occurrences

This data member is an approximation of the influence area on the target mesh, i.e.

the size of the "patch" on the surface which need the data to be calculated for. This data is used for example by the paint layer component to decide how big area to use on the source texture to filter the final color.

Definition at line 436 of file MapExtractorInterface.h.

int m_aLayoutData[16]

Search for all occurrences

This data member is a general area, where the layout can store some information about the reference point, which later will be used by the utilizer class.

For example in traditional texture map extraction the layout can store the coordinates of the texel on the texture, so that the utilizer know where to put the color on the image what represents the texture.

Definition at line 440 of file MapExtractorInterface.h.

unsigned int m_iReferenceFaceIndex

Search for all occurrences

Sometimes it is necessary to use two different locations on the target mesh, one as a reference point, and one for the rest of the calculation.

The reference location is used by the normal map component to calculate the current tangents. This is used for edge bleeding. This data member must hold the index of the reference face, which is the same as the usual face index in most cases.

Definition at line 444 of file MapExtractorInterface.h.

float m_fReferenceFaceU

Search for all occurrences

Sometimes it is necessary to use two different locations on the target mesh, one as a reference point, and one for the rest of the calculation.

The reference location is used by the normal map component to calculate the current tangents. This is used for edge bleeding. These member variables are holding the face coordinates of the reference point, and are the same as the regular face coordinates in most cases.

Definition at line 448 of file MapExtractorInterface.h.

float m_fReferenceFaceV

Search for all occurrences

Definition at line 448 of file MapExtractorInterface.h.

unsigned int m_iIndex

Search for all occurrences

Index of the target location in the queue.

This member variable can be used by the component to see which target-location pair is the current one, if it precalculated the data in a phase event before. This member variable is filled by the map extractor node, the layout node can leave it uninitialized.

Definition at line 452 of file MapExtractorInterface.h.

mudbox::Base m_bTangent

Search for all occurrences

Definition at line 453 of file MapExtractorInterface.h.

The documentation for this class was generated from the following file:

- MapExtractor/MapExtractorInterface.h

TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation
TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation TargetLocation