Translation Scale

Detailed Description

Functions

Float CalculateTranslationScale (const UnitScaleData *src, const UnitScaleData *dst)
 
Float CalculateTranslationScale (BaseDocument *sdoc, BaseDocument *ddoc)
 
maxon::Result< BaseList2D * > NbmFindOrCreateCorrespondingBaseList (maxon::NimbusInterface *nbm, const maxon::CString &nodePath)
 
maxon::Result< void > NbmPortToDescID (maxon::NimbusInterface *nbm, const maxon::GraphNode &node, const maxon::GraphNode &port, DescID &result)
 

Function Documentation

◆ CalculateTranslationScale() [1/2]

Float CalculateTranslationScale ( const UnitScaleData src,
const UnitScaleData dst 
)

Calculates the scale between src and dst unit scale data.

Parameters
[in]srcThe source unit scale data.
[in]dstThe destination unit scale data.
Returns
The scale between src and dst.

◆ CalculateTranslationScale() [2/2]

Float CalculateTranslationScale ( BaseDocument sdoc,
BaseDocument ddoc 
)

Calculates the scale between sdoc and ddoc documents.

Parameters
[in]sdocThe source document.
[in]ddocThe destination document.
Returns
The scale between sdoc and ddoc.

◆ NbmFindOrCreateCorrespondingBaseList()

maxon::Result<BaseList2D*> NbmFindOrCreateCorrespondingBaseList ( maxon::NimbusInterface *  nbm,
const maxon::CString nodePath 
)

Returns the corresponding BaseList element for a GraphNode. This function creates a new one if not already present.

Parameters
[in]nbmThe nimbus class reference.
[in]nodePathAbsolute Path to the Node.
Returns
BaseList2D element. The return value can be nullptr in case no element can be created for the given path, e.g. if it is invalid of refers to an inner node.

◆ NbmPortToDescID()

maxon::Result<void> NbmPortToDescID ( maxon::NimbusInterface *  nbm,
const maxon::GraphNode node,
const maxon::GraphNode port,
DescID result 
)

Calculates the DescID for a given port.

Parameters
[in]nbmThe nimbus class reference.
[in]nodeThe node that owns the port.
[in]portThe port.
[out]resultThe description ID of the port.
Returns
OK on success. If no description representation exists an error will be returned.