CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
OdGiMapperItemEntry Class Referenceabstract

#include <GiMapperItem.h>

Inheritance diagram for OdGiMapperItemEntry:
OdRxObject

Classes

struct  MapInputTriangle
 
struct  MapOutputCoords
 

Public Types

enum  MappingIteratorType { kShellMapIt = 0 , kTriListMapIt , kPolyIt }
 

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGiMapperItemEntry)
 
virtual const OdGiMappermapper () const =0
 
virtual void setMapper (const OdGiMapper &pMapper, const OdGiMapper &pInheritMapper)=0
 
virtual void setMapper (const OdGiMapper &pMapper, const OdGiMapper &pInheritMapper, const OdGeMatrix3d &tm)=0
 
virtual void setMapper (const OdGiMapper &pMaterialMapper)=0
 
virtual void setMapper (const OdGiMapper &pMaterialMapper, const OdGeMatrix3d &tm)=0
 
virtual const OdGeMatrix3dinputTransform () const =0
 
virtual void setInputTransform (const OdGeMatrix3d &tm)=0
 
virtual const OdGeMatrix3ddeviceTransform () const =0
 
virtual void setDeviceTransform (const OdGeMatrix3d &dtm)=0
 
virtual const OdGeMatrix3dmodelTransform () const =0
 
virtual void setModelTransform (const OdGeMatrix3d &mtm)=0
 
virtual const OdGeMatrix3dobjectTransform () const =0
 
virtual void setObjectTransform (const OdGeMatrix3d &otm)=0
 
virtual const OdGeMatrix3doutputTransform () const =0
 
virtual void setOutputTransform (const OdGeMatrix3d &tm)=0
 
virtual void recomputeTransformations ()=0
 
virtual void mapCoords (const MapInputTriangle &trg, MapOutputCoords &uv) const =0
 
virtual void mapCoords (const OdGePoint3d *trg, OdGePoint2d *uv) const =0
 
virtual void mapCoords (const double *trg, double *uv) const =0
 
virtual void mapCoords (const MapInputTriangle &trg, const OdGeVector3d &normal, MapOutputCoords &uv) const =0
 
virtual void mapCoords (const OdGePoint3d *trg, const OdGeVector3d &normal, OdGePoint2d *uv) const =0
 
virtual void mapCoords (const double *trg, const double *normal, double *uv) const =0
 
virtual void mapCoords (OdUInt32 nVerts, const OdGePoint3d *pVerts, OdGePoint2d *pUV, OdUInt32 nList=0, const OdInt32 *pIds=NULL, MappingIteratorType mapIt=kTriListMapIt, const OdGeVector3d *pNormal=NULL, const OdGeVector3d *pFaceNormals=NULL, const OdGeVector3d *pVertNormals=NULL, OdGiOrientationType oType=kOdGiNoOrientation)=0
 
virtual void mapPredefinedCoords (const OdGePoint3d *pInUVW, OdGePoint2d *pOutUV, OdUInt32 nPoints) const =0
 
virtual bool isEntityMapper () const =0
 
virtual bool isObjectMatrixNeed () const =0
 
virtual bool isModelMatrixNeed () const =0
 
virtual bool isDependsFromObjectMatrix () const =0
 
virtual bool isVertexTransformRequired () const =0
 
virtual void setVertexTransform (OdInt32 nCount, const OdGePoint3d *pPoints)=0
 
virtual void setVertexTransform (const OdGeExtents3d &exts)=0
 
virtual void setObjectTransform (OdInt32 nCount, const OdGePoint3d *pPoints)=0
 
virtual void setObjectTransform (const OdGeExtents3d &exts)=0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

Material mapper item entry for separate texture channel.

See also
TD_Gi

<group OdGi_Classes>

Definition at line 51 of file GiMapperItem.h.

Member Enumeration Documentation

◆ MappingIteratorType

Enumerator
kShellMapIt 

Shell-style iterator.

kTriListMapIt 

Triangles list { { 0, 1, 2 }, { 1, 2, 3 } }.

kPolyIt 

Simple list of indices (probably shell/mesh face, polygon or unstructured data) kTriListMapIt makes subdividing of vertices without indices on triangles. Set kShellMapIt or kPolyIt if input data doesn't stored as triangles list.

Definition at line 231 of file GiMapperItem.h.

Member Function Documentation

◆ deviceTransform()

virtual const OdGeMatrix3d & OdGiMapperItemEntry::deviceTransform ( ) const
pure virtual

Retrieves input vertices device transformation matrix.

Returns
inside the transformation matrix represented by the OdGeMatrix3d instance.
Remarks
This is a device-dependent optional transformation matrix.

◆ inputTransform()

virtual const OdGeMatrix3d & OdGiMapperItemEntry::inputTransform ( ) const
pure virtual

Retrieves input vertices transformation matrix.

Returns
input vertices inside the transformation matrix represented by the OdGeMatrix3d instance.

◆ isDependsFromObjectMatrix()

virtual bool OdGiMapperItemEntry::isDependsFromObjectMatrix ( ) const
pure virtual

Checks whether a model matrix is needed for this mapper.

Returns
true if mapper requires object or vertex transform.

◆ isEntityMapper()

virtual bool OdGiMapperItemEntry::isEntityMapper ( ) const
pure virtual

Checks whether entity mapper is enabled.

Returns
true if entity mapper is specified, false otherwise.

◆ isModelMatrixNeed()

virtual bool OdGiMapperItemEntry::isModelMatrixNeed ( ) const
pure virtual

Checks whether a model matrix is needed for this mapper.

Returns
true if mapper needs a model matrix, false otherwise.

◆ isObjectMatrixNeed()

virtual bool OdGiMapperItemEntry::isObjectMatrixNeed ( ) const
pure virtual

Return true if mapper needs object matrix.

◆ isVertexTransformRequired()

virtual bool OdGiMapperItemEntry::isVertexTransformRequired ( ) const
pure virtual

Checks whether mapper requires a vertex transform. A vertex transform is required in case if mapper has automatic transform mode == kObject.

Returns
true if mapper requires vertex transform, false otherwise.

◆ mapCoords() [1/7]

virtual void OdGiMapperItemEntry::mapCoords ( const double *  trg,
const double *  normal,
double *  uv 
) const
pure virtual

Calculates texture coordinates for input triangle.

Parameters
trg[in] Input triangle coordinates (X, Y, Z).
normal[in] Input triangle normal (X, Y, Z).
uv[out] Output texture coordinates (U, V).

◆ mapCoords() [2/7]

virtual void OdGiMapperItemEntry::mapCoords ( const double *  trg,
double *  uv 
) const
pure virtual

Calculates texture coordinates for input triangle.

Parameters
trg[in] Input triangle coordinates (X, Y, Z).
uv[out] Output texture coordinates (U, V).

◆ mapCoords() [3/7]

virtual void OdGiMapperItemEntry::mapCoords ( const MapInputTriangle trg,
const OdGeVector3d normal,
MapOutputCoords uv 
) const
pure virtual

Calculates texture coordinates for input triangle.

Parameters
trg[in] Input triangle coordinates (X, Y, Z).
normal[in] Input triangle normal (X, Y, Z).
uv[out] Output texture coordinates (U, V).

◆ mapCoords() [4/7]

virtual void OdGiMapperItemEntry::mapCoords ( const MapInputTriangle trg,
MapOutputCoords uv 
) const
pure virtual

Calculates texture coordinates for input triangle.

Parameters
trg[in] Input triangle coordinates (X, Y, Z).
uv[out] Output texture coordinates (U, V).

◆ mapCoords() [5/7]

virtual void OdGiMapperItemEntry::mapCoords ( const OdGePoint3d trg,
const OdGeVector3d normal,
OdGePoint2d uv 
) const
pure virtual

Calculates texture coordinates for input triangle.

Parameters
trg[in] Input triangle coordinates (X, Y, Z).
normal[in] Input triangle normal (X, Y, Z).
uv[out] Output texture coordinates (U, V).

◆ mapCoords() [6/7]

virtual void OdGiMapperItemEntry::mapCoords ( const OdGePoint3d trg,
OdGePoint2d uv 
) const
pure virtual

Calculate texture coordinates for input triangle.

Parameters
trg[in] Input triangle coordinates (X, Y, Z).
uv[out] Output texture coordinates (U, V).

◆ mapCoords() [7/7]

virtual void OdGiMapperItemEntry::mapCoords ( OdUInt32  nVerts,
const OdGePoint3d pVerts,
OdGePoint2d pUV,
OdUInt32  nList = 0,
const OdInt32 pIds = NULL,
MappingIteratorType  mapIt = kTriListMapIt,
const OdGeVector3d pNormal = NULL,
const OdGeVector3d pFaceNormals = NULL,
const OdGeVector3d pVertNormals = NULL,
OdGiOrientationType  oType = kOdGiNoOrientation 
)
pure virtual

Calculates texture coordinates for input shellmeshpolygon vertices.

Parameters
nVerts[in] Count of input vertices.
pVerts[in] Array of input vertices (should be equal to vertices count).
pUV[out] Output array of texture coordinates (should be equal to vertices count).
nList[in] Count of indices in indices array (include face sizes for shell-style arrays).
pIds[in] Vertex indices array.
mapIt[in] Type of indices iterator.
pNormal[in] Optional normal (if already precalculated and doesn't specified in face/vertex data).
pFaceNormals[in] Optional face normals array (have greater priority than optional normal).
pVertNormals[in] Optional vertex normals array (have greater priority than optional face normals).
oType[in] Used for calculation of normal if doesn't specified.

◆ mapper()

virtual const OdGiMapper & OdGiMapperItemEntry::mapper ( ) const
pure virtual

Retrieves a mapper (return result mapper combination for pMapper and pInheritMapper).

Returns
mapper as OdGiMapper instance.
See also
<link setMapper, setMapper>

◆ mapPredefinedCoords()

virtual void OdGiMapperItemEntry::mapPredefinedCoords ( const OdGePoint3d pInUVW,
OdGePoint2d pOutUV,
OdUInt32  nPoints 
) const
pure virtual

Recalculates predefined texture coordinates using current material transformation.

Parameters
pInUVW[in] Input array of texture coordinates.
pOutUV[out] Output array of transformed texture coordinates.
nPoints[in] Count of input and output texture coordinates.

◆ modelTransform()

virtual const OdGeMatrix3d & OdGiMapperItemEntry::modelTransform ( ) const
pure virtual

Retrieves model transformation matrix (used only for kModel mappers).

Returns
model transformation matrix as OdGeMatrix3d instance.

◆ objectTransform()

virtual const OdGeMatrix3d & OdGiMapperItemEntry::objectTransform ( ) const
pure virtual

Retrieves object transformation matrix (used only for kObject mappers).

Returns
object transformation matrix as OdGeMatrix3d instance.

◆ ODRX_DECLARE_MEMBERS()

OdGiMapperItemEntry::ODRX_DECLARE_MEMBERS ( OdGiMapperItemEntry  )

◆ outputTransform()

virtual const OdGeMatrix3d & OdGiMapperItemEntry::outputTransform ( ) const
pure virtual

Retrieves output texture coordinates transformation matrix.

Returns
output texture coordinates transformation matrix as OdGeMatrix3d instance.

◆ recomputeTransformations()

virtual void OdGiMapperItemEntry::recomputeTransformations ( )
pure virtual

Recomputes transformation matrices.

Remarks
Must be called after mapper or model transforms set.
See also
setMapper, setModelTransform

◆ setDeviceTransform()

virtual void OdGiMapperItemEntry::setDeviceTransform ( const OdGeMatrix3d dtm)
pure virtual

Sets input vertices device transformation matrix.

Parameters
dtm[in] Input device vertices inside the transform matrix.
Remarks
This is a device-dependent optional transformation matrix.

◆ setInputTransform()

virtual void OdGiMapperItemEntry::setInputTransform ( const OdGeMatrix3d tm)
pure virtual

Sets input vertices transformation matrix.

Parameters
tm[in] Input vertices inside the transform matrix.

◆ setMapper() [1/4]

virtual void OdGiMapperItemEntry::setMapper ( const OdGiMapper pMapper,
const OdGiMapper pInheritMapper 
)
pure virtual

Sets mapper combination.

Parameters
pMapper[in] Entity mapper.
pInheritMapper[in] Material (default) mapper.

◆ setMapper() [2/4]

virtual void OdGiMapperItemEntry::setMapper ( const OdGiMapper pMapper,
const OdGiMapper pInheritMapper,
const OdGeMatrix3d tm 
)
pure virtual

Sets mapper combination and object/model matrix.

Parameters
pMapper[in] Entity mapper.
pInheritMapper[in] Material (default) mapper.
tm[in] Model or object matrix.

◆ setMapper() [3/4]

virtual void OdGiMapperItemEntry::setMapper ( const OdGiMapper pMaterialMapper)
pure virtual

Sets mapper for material (entity mapper not specified).

Parameters
pMaterialMapper[in] Material mapper.

◆ setMapper() [4/4]

virtual void OdGiMapperItemEntry::setMapper ( const OdGiMapper pMaterialMapper,
const OdGeMatrix3d tm 
)
pure virtual

Sets mapper for material and object/model matrix.

Parameters
pMaterialMapper[in] Material mapper.
tm[in] Model or object matrix.

◆ setModelTransform()

virtual void OdGiMapperItemEntry::setModelTransform ( const OdGeMatrix3d mtm)
pure virtual

Sets model transformation matrix (used only for kModel mappers).

Parameters
mtm[in] Model transform vertices inside the transform matrix.

◆ setObjectTransform() [1/3]

virtual void OdGiMapperItemEntry::setObjectTransform ( const OdGeExtents3d exts)
pure virtual

Sets object transform from extents.

Parameters
exts[in] Extents that defines object transform matrix.

◆ setObjectTransform() [2/3]

virtual void OdGiMapperItemEntry::setObjectTransform ( const OdGeMatrix3d otm)
pure virtual

Sets object transformation matrix (used only for kObject mappers).

Parameters
otm[in] Object transform vertices inside the transform matrix.

◆ setObjectTransform() [3/3]

virtual void OdGiMapperItemEntry::setObjectTransform ( OdInt32  nCount,
const OdGePoint3d pPoints 
)
pure virtual

Sets vertex transform from points array.

Parameters
nCount[in] Number of points.
pPoints[in] Pointer to the array of points.

◆ setOutputTransform()

virtual void OdGiMapperItemEntry::setOutputTransform ( const OdGeMatrix3d tm)
pure virtual

Sets output texture coordinates transformation matrix.

Parameters
tm[in] Output transform vertices inside the transform matrix.

◆ setVertexTransform() [1/2]

virtual void OdGiMapperItemEntry::setVertexTransform ( const OdGeExtents3d exts)
pure virtual

Sets vertex transform from object extents.

Parameters
exts[in] Extents that defines vertex transform matrix.

◆ setVertexTransform() [2/2]

virtual void OdGiMapperItemEntry::setVertexTransform ( OdInt32  nCount,
const OdGePoint3d pPoints 
)
pure virtual

Sets vertex transform from points array.

Parameters
nCount[in] Number of points.
pPoints[in] Pointer to the array of points.

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