Interface AnnotationRendererInterface

The AnnotationRendererInterface is the object used to include and display annotations in the 3D view.

The AnnotationRendererInterface is part of the InfiniteEngineInterface and is obtained through InfiniteEngineInterface.getAnnotationRenderer. The AnnotationRendererInterface is created along with the InfiniteEngineInterface, and is contained inside it.

When annotations are retrieved with the AnnotationGetterInterface, and contained in the AnnotationResultInterface, such annotations still need to be parsed (to create triangles, shapes, images, etc...) to be included in the 3D view. The AnnotationRendererInterface parses these annotations and sets the visibility flags of such annotations.

Each annotation can only be added once, trying to add the same annotation view multiple times will fail. You may clone/create an annotation view with DataSessionInterface.createAnnotationView.

Annotations are included in a 3D plane, and grouped together in views : the AnnotationViewInterface.

Annotations are usually defined locally in a geometry frame. For this reason, the AnnotationResultInterface contains the matrix to set when including an annotation view, but this value can also be retrieved with AnnotationViewInterface.getDefaultMatrix. Using an undefined matrix is equivalent to using the default matrix of the annotation view. If AnnotationViewInterface.getDefaultMatrix returns undefined, then a unit matrix is used.

The AnnotationViewInterface contains a Local Matrix (immutable, cannot be changed), the AnnotationViewInterface is included in the AnnotationRendererInterface with an application matrix, such that the resulting transform applied to the annotations contained in the AnnotationViewInterface is a World matrix :

WorldMatrix = ApplicationMatrix x LocalMatrix.

ApplicationMatrix is usually equal to AnnotationViewInterface.getDefaultMatrix.

/** 
* Sample to illustrate the concept of annotation view matrices.
*/
import { tAnnotationViewId, Matrix4, InfiniteEngineInterface, AnnotationRendererInterface } from 'generated_files/documentation/appinfiniteapi';

// retrieved previously
let lAnnotationViewId : tAnnotationViewId;
// created previously
let lInfiniteEngine : InfiniteEngineInterface;
// retrieve the annotation renderer
const lAnnotationRenderer : AnnotationRendererInterface = lInfiniteEngine.getAnnotationRenderer();

// get the local matrix from the annotation view
const lLocalMatrix : Matrix4 = new Matrix4();
lAnnotationRenderer.getViewLocalMatrix(lAnnotationViewId, lLocalMatrix);

// get the application matrix from the annotation view
const lApplicationMatrix : Matrix4 = new Matrix4();
lAnnotationRenderer.getViewApplicationMatrix(lAnnotationViewId, lApplicationMatrix);

// get the world matrix from the annotation view
const lWorldMatrix : Matrix4 = new Matrix4();
lAnnotationRenderer.getViewWorldMatrix(lAnnotationViewId, lWorldMatrix);

// to store the computation of lApplicationMatrix * lLocalMatrix
const lResultingMatrix : Matrix4 = new Matrix4();

// compute res = lApplicationMatrix * lLocalMatrix
lLocalMatrix.multiplyMatrixLeft(lApplicationMatrix, lResultingMatrix);

// make sure the result is ok
const lExpectedResult : boolean = lWorldMatrix.equals(lResultingMatrix);
console.assert(lExpectedResult, 'the two matrices should be equal');

The LocalMatrix is decomposed with 4 vectors : the LocalPlaneX, LocalPlaneY, LocalNormal, and LocalOrigin.
/** 
* Sample to illustrate the concept of annotation local matrix.
*/
import { tAnnotationViewId, Matrix4, InfiniteEngineInterface, AnnotationRendererInterface, Vector3 } from 'generated_files/documentation/appinfiniteapi';

// retrieved previously
let lAnnotationViewId : tAnnotationViewId;
// created previously
let lInfiniteEngine : InfiniteEngineInterface;
// retrieve the annotation renderer
const lAnnotationRenderer : AnnotationRendererInterface = lInfiniteEngine.getAnnotationRenderer();

// get the local matrix from the annotation view
const lLocalMatrix : Matrix4 = new Matrix4();
lAnnotationRenderer.getViewLocalMatrix(lAnnotationViewId, lLocalMatrix);

// get the local vectors
const lLocalPlaneX : Vector3 = new Vector3();
const lLocalPlaneY : Vector3 = new Vector3();
const lLocalPlaneNormal : Vector3 = new Vector3();
const lLocalPlaneOrigin : Vector3 = new Vector3();

lAnnotationRenderer.getViewLocalPlaneXAxis(lAnnotationViewId, lLocalPlaneX);
lAnnotationRenderer.getViewLocalPlaneYAxis(lAnnotationViewId, lLocalPlaneY);
lAnnotationRenderer.getViewLocalPlaneNormal(lAnnotationViewId, lLocalPlaneNormal);
lAnnotationRenderer.getViewLocalPlaneOrigin(lAnnotationViewId, lLocalPlaneOrigin);

// to test the values
const lTestVector : Vector3 = new Vector3();
console.assert(lLocalMatrix.getColumn(0, lTestVector).equals(lLocalPlaneX));
console.assert(lLocalMatrix.getColumn(1, lTestVector).equals(lLocalPlaneY));
console.assert(lLocalMatrix.getColumn(2, lTestVector).equals(lLocalPlaneNormal));
console.assert(lLocalMatrix.getColumn(3, lTestVector).equals(lLocalPlaneOrigin));

The same holds for the WorldMatrix.

Each annotation and annotation view is assigned an id (a number) :

A valid id is a strictly positive number (0 is invalid).

The way annotations are rendered is done through the use of an "OR" combination of bits : the AnnotationInstanceState. Annotations state is set with the bit to set and the mask of bits to change. Annotations are contained in three bucket lists of increasing importance : low, standard and high. Annotations in a more important buckets are rendered on top of annotations in a lower importance bucket, regardless of their depth (AnnotationInstanceState.AIS_DepthPriorityLow, AnnotationInstanceState.AIS_DepthPriorityStd, AnnotationInstanceState.AIS_DepthPriorityHigh).

Say I want to change the visibility bit (only) of an annotation :

/** 
* Sample to illustrate the concept of changing the visibility of 1 annotation.
*/
import { tAnnotationId, InfiniteEngineInterface, AnnotationRendererInterface, AnnotationInstanceState } from 'generated_files/documentation/appinfiniteapi';

// retrieved previously
let lAnnotationId : tAnnotationId;
// created previously
let lInfiniteEngine : InfiniteEngineInterface;
// retrieve the annotation renderer
const lAnnotationRenderer : AnnotationRendererInterface = lInfiniteEngine.getAnnotationRenderer();

// I want to be visible
const lState : number = AnnotationInstanceState.AIS_Visible;
// and change only this bit
const lMask : number = AnnotationInstanceState.AIS_Visible;

// set visible
lAnnotationRenderer.setAnnotationRenderingState(lAnnotationId, lMask, lState);
// set hidden
lAnnotationRenderer.setAnnotationRenderingState(lAnnotationId, lMask, 0);

Say I want to change the visibility bit and the priority of an annotation :
/** 
* Sample to illustrate the concept of changing the visibility and priority of 1 annotation.
*/
import { tAnnotationId, InfiniteEngineInterface, AnnotationRendererInterface, AnnotationInstanceState } from 'generated_files/documentation/appinfiniteapi';

// retrieved previously
let lAnnotationId : tAnnotationId;
// created previously
let lInfiniteEngine : InfiniteEngineInterface;
// retrieve the annotation renderer
const lAnnotationRenderer : AnnotationRendererInterface = lInfiniteEngine.getAnnotationRenderer();

// I want to be visible and standard priority
const lState : number = AnnotationInstanceState.AIS_Visible | AnnotationInstanceState.AIS_DepthPriorityStd;
// and change visibility and depth
const lMask : number = AnnotationInstanceState.AIS_Visible | AnnotationInstanceState.AIS_DepthPriorityMask;

// set visible and standard priority
lAnnotationRenderer.setAnnotationRenderingState(lAnnotationId, lMask, lState);

annotation rendering flags effect
And the full example :
/** 
* Sample to illustrate the displaying of annotations.
*/
import {
AnnotationGetterInterface, AnnotationGetterInterfaceSignal, InfiniteEvent,
AnnotationResultInterface, InfiniteEngineInterface, AnnotationRendererInterface, AnnotationRendererInterfaceSignal,
tAnnotationViewId, AnnotationInstanceState, AnnotationViewParsingResultInterface, AnnotationViewInterface
} from 'generated_files/documentation/appinfiniteapi';

// created previously
let lAnnotationViewGetter : AnnotationGetterInterface;
// created previously
let lInfiniteEngine : InfiniteEngineInterface;
// retrieve the annotation renderer
const lAnnotationRenderer : AnnotationRendererInterface = lInfiniteEngine.getAnnotationRenderer();

// the annotation view id that has just been parsed
let lAnnotationViewId : tAnnotationViewId = -1;

// what to do when an annotation has been downloaded ?
let onAnnotationRetrieved : (pEvent: InfiniteEvent, pCallbackData: Object | undefined) => void;

// what to do when an annotation is ready to be displayed ?
let onAnnotationReady : (pEvent: InfiniteEvent, pCallbackData: Object | undefined) => void;

// connect to signals
lAnnotationViewGetter.addEventListener(AnnotationGetterInterfaceSignal.AnnotationFetchReady, onAnnotationRetrieved);
lAnnotationRenderer.addEventListener(AnnotationRendererInterfaceSignal.AnnotationViewParsed, onAnnotationReady);

// what to do when an annotation has been downloaded ?
onAnnotationRetrieved = (_pEvent: InfiniteEvent, _pCallbackData: Object | undefined) : void =>
{
// the result of the download
const lAnnotationViewsContent : Array<AnnotationResultInterface> | undefined = lAnnotationViewGetter.getAnnotationGroupsResult();
if (!lAnnotationViewsContent || (lAnnotationViewsContent.length === 0))
{
console.log('Weird, annotation is downloaded but no content');
return;
}
if (lAnnotationViewsContent.length > 1)
{
console.log('Only displaying one annotation view at the moment, other annotation views will be discarded');
return;
}
// take the first annotation result, discarding others
const lAnnotationResult : AnnotationResultInterface = lAnnotationViewsContent[0];

// and add the annotation view to be displayed with standard depth
// we want to set the depth and visible state of the annotation
// mask is AnnotationInstanceState.AIS_DepthPriorityMask | AnnotationInstanceState.AIS_Visible
// but we want to be depth std and invisible
// state is AnnotationInstanceState.AIS_DepthPriorityStd | 0 = AnnotationInstanceState.AIS_DepthPriorityStd
const lAnnotationViews : Array<AnnotationViewInterface> = lAnnotationResult.getAnnotationViews();
if(lAnnotationViews.length === 0)
{
console.log('Weird, annotation is downloaded but no result');
return;
}
const lMask : number = AnnotationInstanceState.AIS_DepthPriorityMask | AnnotationInstanceState.AIS_Visible;
const lState : number = AnnotationInstanceState.AIS_DepthPriorityStd;
const lRequestId : number = lAnnotationRenderer.addAnnotationView(lAnnotationViews[0], lAnnotationResult.getGroupMatrix(), lMask, lState);
if (lRequestId < 0)
{
// weird error
console.log('The parsing procedure could not be started');
}
};

// what to do when an annotation is ready to be displayed ?
onAnnotationReady = (pEvent: InfiniteEvent, _pCallbackData: Object | undefined) : void =>
{
// fancy log
console.log('annotation view has finished parsing');

// take the parsing result
const lParsingResult : AnnotationViewParsingResultInterface = pEvent.attachments;
if (lParsingResult.annotationView === undefined)
{
// this is an error
console.log('annotation view parsing has failed ' + JSON.stringify(lParsingResult.error));
return;
}

// store the annotation view id
lAnnotationViewId = lParsingResult.annotationView.getViewId();
const lNbAnnotations : number = lParsingResult.annotationView.getAnnotationsCount();
const lAnnotationStartId : number = lParsingResult.annotationView.getFirstAnnotationId();
// create the list of annotation ids from lParsingResult.annotationIdStart to lParsingResult.annotationIdStart + lParsingResult.nbAnnotations - 1
const lAnnotationIds : number [] = [];
lAnnotationIds.length = lNbAnnotations;
let i : number;
for (i = 0; i < lNbAnnotations; i += 1)
{
lAnnotationIds[i] = lAnnotationStartId + i;
}
// mask for all rendering flags (except priority)
const lMask : number = AnnotationInstanceState.AIS_AppearThroughGeometry | AnnotationInstanceState.AIS_Highlight
| AnnotationInstanceState.AIS_Overprint | AnnotationInstanceState.AIS_Visible;
// state is visible (but we may add AnnotationInstanceState.AIS_AppearThroughGeometry just for fun)
const lState : number = AnnotationInstanceState.AIS_Visible; // | AnnotationInstanceState.AIS_AppearThroughGeometry

lAnnotationRenderer.setAnnotationRenderingState(lAnnotationIds, lMask, lState);
// you should now see the annotation on the next rendering
};

Or asynchronously :
/** 
* Sample to illustrate the asynchronous displaying of annotations.
*/
import {
AnnotationGetterInterface,
AnnotationResultInterface, AnnotationGroupInfoInterface, InfiniteEngineInterface, AnnotationRendererInterface,
tAnnotationViewId, AnnotationInstanceState, AnnotationViewParsingResultInterface, AsyncAnnotationResult, AsyncResultReason,
AnnotationViewInterface,
AsyncAnnotationViewParsingResult
} from 'generated_files/documentation/appinfiniteapi';

// created previously
let lAnnotationViewGetter : AnnotationGetterInterface;
// created previously
let lInfiniteEngine : InfiniteEngineInterface;
// retrieve the annotation renderer
const lAnnotationRenderer : AnnotationRendererInterface = lInfiniteEngine.getAnnotationRenderer();
// the annotation to fetch
let lAnnotationToFetch : AnnotationGroupInfoInterface;

// the annotation view id that has just been parsed
let lAnnotationViewId : tAnnotationViewId = -1;

const displayResult = async () : Promise<void> =>
{
const lAsyncAnnotationResult : AsyncAnnotationResult = await lAnnotationViewGetter.asyncFetchAnnotationGroups(lAnnotationToFetch);

// the result of the download
const lAnnotationViewsContent : Array<AnnotationResultInterface> | undefined = lAsyncAnnotationResult.value;
if (!lAnnotationViewsContent || (lAnnotationViewsContent.length === 0))
{
console.log('Weird, annotation download error');
return;
}
if (lAnnotationViewsContent.length > 1)
{
console.log('Weird, annotation is downloaded but too many results');
return;
}
// take the first annotation result, discarding others
const lAnnotationResult : AnnotationResultInterface = lAnnotationViewsContent[0];

// and add the annotation view to be displayed with standard depth
// we want to set the depth and visible state of the annotation
// mask is AnnotationInstanceState.AIS_DepthPriorityMask | AnnotationInstanceState.AIS_Visible
// but we want to be depth std and invisible
// state is AnnotationInstanceState.AIS_DepthPriorityStd | 0 = AnnotationInstanceState.AIS_DepthPriorityStd
let lMask : number = AnnotationInstanceState.AIS_DepthPriorityMask | AnnotationInstanceState.AIS_Visible;
let lState : number = AnnotationInstanceState.AIS_DepthPriorityStd;
const lAnnotationViews : Array<AnnotationViewInterface> = lAnnotationResult.getAnnotationViews();
if(lAnnotationViews.length === 0)
{
console.log('Weird, annotation is downloaded but no result');
return;
}
const lAnnotationParsingResult : AsyncAnnotationViewParsingResult = await lAnnotationRenderer.asyncAddAnnotationView(lAnnotationViews[0], lAnnotationResult.getGroupMatrix(), lMask, lState);

if (lAnnotationParsingResult.reason !== AsyncResultReason.ARR_Success
|| lAnnotationParsingResult.value === undefined)
{
// weird error
console.log('The parsing procedure could not be started');
return;
}
// fancy log
console.log('annotation view has finished parsing');

// take the parsing result
const lParsingResult : AnnotationViewParsingResultInterface = lAnnotationParsingResult.value;
if (lParsingResult.annotationView === undefined)
{
// this is an error
console.log('annotation view parsing has failed ' + JSON.stringify(lParsingResult.error));
return;
}

// store the annotation view id
lAnnotationViewId = lParsingResult.annotationView.getViewId();
const lNbAnnotations : number = lParsingResult.annotationView.getAnnotationsCount();
const lAnnotationStartId : number = lParsingResult.annotationView.getFirstAnnotationId();
// create the list of annotation ids from lParsingResult.annotationIdStart to lParsingResult.annotationIdStart + lParsingResult.nbAnnotations - 1
const lAnnotationIds : number [] = [];
lAnnotationIds.length = lNbAnnotations;
let i : number;
for (i = 0; i < lNbAnnotations; i += 1)
{
lAnnotationIds[i] = lAnnotationStartId + i;
}
// mask for all rendering flags (except priority)
lMask = AnnotationInstanceState.AIS_AppearThroughGeometry | AnnotationInstanceState.AIS_Highlight
| AnnotationInstanceState.AIS_Overprint | AnnotationInstanceState.AIS_Visible;
// state is visible (but we may add AnnotationInstanceState.AIS_AppearThroughGeometry just for fun)
lState = AnnotationInstanceState.AIS_Visible; // | AnnotationInstanceState.AIS_AppearThroughGeometry

lAnnotationRenderer.setAnnotationRenderingState(lAnnotationIds, lMask, lState);
// you should now see the annotations on the next rendering
};

displayResult();

Please see Annotations for more explanations about annotations.
3D Rendering

interface AnnotationRendererInterface {
    addAnnotationView(pView, pApplicationMatrix, pRenderingMask, pRenderingState): number;
    addEventListener(pType, pListener, pObject): string;
    addEventListener(pType, pListener): string;
    areSignalsBlocked(): boolean;
    asyncAddAnnotationView(pView, pApplicationMatrix, pRenderingMask, pRenderingState): Promise<AsyncAnnotationViewParsingResult>;
    asyncWaitForAnnotationRequests(pRequestIds): Promise<AsyncAnnotationViewParsingResults>;
    blockSignals(pBlock): void;
    computeAnnotationsWorldAABB(pAnnotationIds, pDynamic, pAABB): boolean;
    getAnnotationApplicationMatrix(pAnnotationId, pApplicationMatrix): boolean;
    getAnnotationIds(pAnnotationIds): number;
    getAnnotationLocalMatrix(pAnnotationId, pLocalMatrix): boolean;
    getAnnotationLocalPlaneNormal(pAnnotationId, pLocalPlaneNormal): boolean;
    getAnnotationLocalPlaneOrigin(pAnnotationId, pLocalPlaneOrigin): boolean;
    getAnnotationLocalPlaneXAxis(pAnnotationId, pLocalPlaneXAxis): boolean;
    getAnnotationLocalPlaneYAxis(pAnnotationId, pLocalPlaneYAxis): boolean;
    getAnnotationRenderingState(pAnnotationId): number;
    getAnnotationViewId(pAnnotationId): number;
    getAnnotationWorldAABB(pAnnotationId, pDynamic, pAABB): boolean;
    getAnnotationWorldMatrix(pAnnotationId, pWorldMatrix): boolean;
    getAnnotationWorldPlaneNormal(pAnnotationId, pWorldPlaneNormal): boolean;
    getAnnotationWorldPlaneOrigin(pAnnotationId, pWorldPlaneOrigin): boolean;
    getAnnotationWorldPlaneXAxis(pAnnotationId, pWorldPlaneXAxis): boolean;
    getAnnotationWorldPlaneYAxis(pAnnotationId, pWorldPlaneYAxis): boolean;
    getAnnotationsRenderingState(pAnnotationIds, pAnnotationStates): boolean;
    getViewAnnotationsCount(pViewId): number;
    getViewApplicationMatrix(pViewId, pApplicationMatrix): boolean;
    getViewFirstAnnotationId(pViewId): number;
    getViewIds(pViewIds): number;
    getViewLocalMatrix(pViewId, pLocalMatrix): boolean;
    getViewLocalPlaneNormal(pViewId, pLocalPlaneNormal): boolean;
    getViewLocalPlaneOrigin(pViewId, pLocalPlaneOrigin): boolean;
    getViewLocalPlaneXAxis(pViewId, pLocalPlaneXAxis): boolean;
    getViewLocalPlaneYAxis(pViewId, pLocalPlaneYAxis): boolean;
    getViewWorldAABB(pViewId, pAABB): boolean;
    getViewWorldMatrix(pViewId, pWorldMatrix): boolean;
    getViewWorldPlaneNormal(pViewId, pWorldPlaneNormal): boolean;
    getViewWorldPlaneOrigin(pViewId, pWorldPlaneOrigin): boolean;
    getViewWorldPlaneXAxis(pViewId, pWorldPlaneXAxis): boolean;
    getViewWorldPlaneYAxis(pViewId, pWorldPlaneYAxis): boolean;
    hasEventListener(pType, pListener): boolean;
    hasEventListenerById(pId): boolean;
    isComputingAnnotations(): boolean;
    removeAllAnnotations(): void;
    removeAllEventListeners(): boolean;
    removeAnnotationViews(pViews, pRemovedAnnotations?): number;
    removeEventListener(pType, pListener, pObject): boolean;
    removeEventListener(pType, pListener): boolean;
    removeEventListenerById(pId): boolean;
    setAnnotationRenderingState(pAnnotations, pRenderingMask, pRenderingState): boolean;
    setAnnotationRenderingStateForAll(pRenderingMask, pRenderingState): boolean;
    setViewApplicationMatrix(pViewId, pApplicationMatrix): boolean;
}

Hierarchy (view full)

Methods

  • Asynchronously adds an annotation view with a matrix, and sets the rendering state of the annotations contained within.

    This function is asynchronous, the event AnnotationRendererInterfaceSignal.AnnotationViewParsed will be triggered shortly after with the result of the annotation view parsing.

    If the function succeeds, a non zero value is returned, which is the id of the request, which should match the AnnotationViewParsingResultInterface.requestId of the correspondent signal.

    If the function fails, 0 is returned and no signal will be triggered.

    pApplicationMatrix MUST be a rotation / translation matrix (no scale), there is no check to ensure that the matrix is correct. You will experience some rendering and positioning trouble if pApplicationMatrix is not a rotation / translation matrix.

    An undefined value is equivalent to setting the default matrix of the view (AnnotationViewInterface.getDefaultMatrix). If AnnotationViewInterface.getDefaultMatrix is undefined, then an identity matrix will be set.

    Parameters

    • pView: AnnotationViewInterface
      in
      The annotation view to include.
    • pApplicationMatrix: Matrix4
      in
      The matrix of the annotation view. An undefined value is equivalent to setting the default matrix of the view.
    • pRenderingMask: number
      in
      The mask of the rendering state of all the annotations.
    • pRenderingState: number
      in
      The rendering state of all the annotations.

    Returns number

    A non zero request id of the add procedure, 0 if there is an error.

  • Adds a listener to an event type.

    When an event of the type pType fires, the callback pListener will be called. This function returns a unique string id that may be used in removeEventListenerById to allow simple listener removal. It is possible to add an object that will be included in the callback to avoid creating too many closures. Calling twice addEventListener with the same parameters results in the second call to be ignored, only unique pairs callback / object are allowed, in order to avoid calling multiple times the same thing.

    Parameters

    • pType: string
      in
      The type of the event pListener will be called upon.
    • pListener: tListenerCallback
      in
      The listener function that fires when the given event type occurs.
    • pObject: Object
      in
      The optional object the callback will be called with when the given event fires.

    Returns string

    The id of the inserted callback (actually an UUID).

  • Adds a listener to an event type.

    When an event of the type pType fires, the callback pListener will be called. This function returns a unique string id that may be used in removeEventListenerById to allow simple listener removal.

    Parameters

    • pType: string
      in
      The type of the event pListener will be called upon.
    • pListener: tListenerCallback
      in
      The listener function that fires when the given event type occurs.

    Returns string

    The id of the inserted callback (actually an UUID).

  • Tells if signals sent by the object are blocked or not.

    If signals are blocked, no signal will be emitted nor buffered, such signal will be lost.

    Returns boolean

    true if signals are blocked.

  • Asynchronously adds an annotation view with a matrix, and sets the rendering state of the annotations contained within with a promise.

    A promise is returned.

    pApplicationMatrix MUST be a rotation / translation matrix (no scale), there is no check to ensure that the matrix is correct. You will experience some rendering and positioning trouble if pApplicationMatrix is not a rotation / translation matrix.

    An undefined value is equivalent to setting the default matrix of the view (AnnotationViewInterface.getDefaultMatrix). If AnnotationViewInterface.getDefaultMatrix is undefined, then an identity matrix will be set.

    Parameters

    • pView: AnnotationViewInterface
      in
      The annotation view to include.
    • pApplicationMatrix: Matrix4
      in
      The matrix of the annotation view. An undefined value is equivalent to setting the default matrix of the view.
    • pRenderingMask: number
      in
      The mask of the rendering state of all the annotations.
    • pRenderingState: number
      in
      The rendering state of all the annotations.

    Returns Promise<AsyncAnnotationViewParsingResult>

    A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the parsing result.

  • Asynchronously waits for the given annotation parsing requests to complete.

    A promise is returned.

    Parameters

    • pRequestIds: number[] | Uint32Array
      in
      The annotation request ids to wait for being parsed.

    Returns Promise<AsyncAnnotationViewParsingResults>

    A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains an array of parsing results of pRequestIds.

  • Blocks / Unblocks all signals sent by the object.

    If signals are blocked, no signal will be emitted nor buffered, such signal will be lost.

    Parameters

    • pBlock: boolean
      in
      If set to true, all further signals will be silently discarded.

    Returns void

  • Computes the Axis Aligned Bounding Box (AABB) of the given annotations.

    Please note that the World Plane Origin of the view this annotation belongs to is not necessary contained in such an AABB since the annotation may be set with an offset from the Local Plane Origin (see getAnnotationWorldPlaneOrigin).

    pIsDynamic tells if the AABB should be updated depending on the current camera orientation. Indeed, some annotation(s) may be rendered as a billboard, and thus their bounding box should be a sphere centered on the pivot on the annotation. pIsDynamic has no effect on annotations that are not billboard-ed, the result is the same.

    If pDynamic is true, then the current orientation of billboard-ed annotation is taken into account, if false, a sphere centered on the pivot of the annotation is used to compute the AABB, and the result will always be the same for this annotation.

    Returns true if all annotation ids are correct.

    If the call fails, then pAABB is left unchanged.

    Parameters

    • pAnnotationIds: number[] | Uint32Array
      in
      The annotation ids of the annotations to fetch.
    • pDynamic: boolean
      in
      If true, then billboard-ed annotation AABB is computed with the current camera orientation.
    • pAABB: AABB
      out
      The resulting AABB of the given annotation.

    Returns boolean

    true if pAnnotationIds refers to a valid annotations.

  • Gets the application matrix set for the annotation view that contains this annotation.

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix. This call gets the matrix set by the last call to addAnnotationView or setViewApplicationMatrix for the annotation view this annotation belongs to.

    pApplicationMatrix will be a rotation / translation matrix (no scale).

    Returns true if the application matrix for the view that contains the given annotation id has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pApplicationMatrix is left unchanged.

    This call is equivalent to calling getViewApplicationMatrix(getAnnotationViewId(pAnnotationId), pApplicationMatrix).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pApplicationMatrix: Matrix4
      out
      The application matrix for the view that contains the given annotation id.

    Returns boolean

    true if the application matrix of the given annotation has been retrieved.

  • Gets all the annotation ids handled by this annotation renderer.

    Calling getAnnotationIds(undefined) will return the number of annotations currently handled. Calling getAnnotationIds with an Uint32Array without sufficient length will return -1.

    Returns the number of annotations handled by the annotation renderer, or -1 if pAnnotationIds is a Uint32Array without sufficient memory.

    Parameters

    • pAnnotationIds: number[] | Uint32Array
      out
      The ids of the annotation views.

    Returns number

    The number of annotations handled by the annotation renderer, or -1 if pAnnotationIds is a Uint32Array without sufficient memory.

  • Gets the Local matrix for the annotation view that contains this annotation.

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix. This call gets the immutable Local matrix of the annotation view that contains this annotation, as retrieved with AnnotationViewInterface.getPlaneXAxis, AnnotationViewInterface.getPlaneYAxis, AnnotationViewInterface.getPlaneNormal, AnnotationViewInterface.getPlaneOrigin.

    pLocalMatrix will be a rotation / translation matrix (no scale).

    Returns true if the Local matrix for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pLocalMatrix is left unchanged.

    This call is equivalent to calling getViewLocalMatrix(getAnnotationViewId(pAnnotationId), pLocalMatrix).

    Parameters

    • pAnnotationId: number
      in
      The annotation view id of the annotation to fetch.
    • pLocalMatrix: Matrix4
      out
      The Local matrix for the view that contains the given annotation id.

    Returns boolean

    true if the Local matrix of the given annotation has been retrieved.

  • Gets the normal part of the Local matrix for the annotation view that contains this annotation.

    getAnnotationLocalPlaneNormal(pAnnotationId, pLocalPlaneNormal) is equivalent to getAnnotationLocalMatrix(pAnnotationId, lMatrix), lMatrix.getColumn(2, pLocalPlaneNormal).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the Local Plane Normal for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pLocalPlaneNormal is left unchanged.

    This call is equivalent to calling getViewLocalPlaneNormal(getAnnotationViewId(pAnnotationId), pLocalPlaneNormal).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pLocalPlaneNormal: Vector3
      out
      The Local Plane Normal for the view that contains the given annotation id.

    Returns boolean

    true if the Local Plane Normal of the given annotation has been retrieved.

  • Gets the translation part of the Local matrix for the annotation view that contains this annotation.

    This is therefore the Local Plane Origin. getAnnotationLocalPlaneOrigin(pAnnotationId, pLocalPlaneOrigin) is equivalent to getAnnotationLocalMatrix(pAnnotationId, lMatrix), lMatrix.getColumn(3, pLocalPlaneOrigin).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the Local Plane Origin for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pLocalPlaneOrigin is left unchanged.

    This call is equivalent to calling getViewLocalPlaneOrigin(getAnnotationViewId(pAnnotationId), pLocalPlaneOrigin).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pLocalPlaneOrigin: Vector3
      out
      The Local Plane Origin for the view that contains the given annotation id.

    Returns boolean

    true if the Local Plane Origin of the given annotation has been retrieved.

  • Gets the X Axis direction of the Local matrix for the annotation view that contains this annotation.

    getAnnotationLocalPlaneXAxis(pAnnotationId, pLocalPlaneXAxis) is equivalent to getAnnotationLocalMatrix(pAnnotationId, lMatrix), lMatrix.getColumn(0, pLocalPlaneXAxis).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the Local Plane X Axis direction for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pLocalPlaneXAxis is left unchanged.

    This call is equivalent to calling getViewLocalPlaneXAxis(getAnnotationViewId(pAnnotationId), pLocalPlaneXAxis).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pLocalPlaneXAxis: Vector3
      out
      The Local Plane X Axis direction for the view that contains the given annotation id.

    Returns boolean

    true if the Local Plane X Axis direction of the given annotation has been retrieved.

  • Gets the Y Axis direction of the Local matrix for the annotation view that contains this annotation.

    getAnnotationLocalPlaneYAxis(pAnnotationId, pLocalPlaneYAxis) is equivalent to getAnnotationLocalMatrix(pAnnotationId, lMatrix), lMatrix.getColumn(1, pLocalPlaneYAxis).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the Local Plane Y Axis direction for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pLocalPlaneYAxis is left unchanged.

    This call is equivalent to calling getViewLocalPlaneYAxis(getAnnotationViewId(pAnnotationId), pLocalPlaneYAxis).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pLocalPlaneYAxis: Vector3
      out
      The Local Plane Y Axis direction for the view that contains the given annotation id.

    Returns boolean

    true if the Local Plane Y Axis direction of the given annotation has been retrieved.

  • Gets the rendering state of the given annotation.

    annotation rendering flags effect
    Returns an `OR`ed value of AnnotationInstanceState that reflect the rendering of the given annotation, or AnnotationInstanceState.AIS_Invalid if the given `annotation id` does not exist.

    Parameters

    • pAnnotationId: number
      in
      The id of the annotation to fetch.

    Returns number

    The annotation state of the given annotation, or AnnotationInstanceState.AIS_Invalid if pAnnotationId refers to an invalid or nonexistent annotation id.

  • Gets the annotation view id this annotation belongs to.

    getAnnotationViewId({@link getViewFirstAnnotationId}(pViewId)) should return pViewId.

    Returns the annotation view id of the given annotation, or -1 if pAnnotationId could not be found (i.e. no annotation in the AnnotationRendererInterface has this id).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.

    Returns number

    The annotation view id this annotation belongs to, or -1 if pAnnotationId could not be found.

  • Gets the Axis Aligned Bounding Box (AABB) of the given annotation.

    Please note that the World Plane Origin of the view this annotation belongs to is not necessary contained in such an AABB since the annotation may be set with an offset from the Local Plane Origin (see getAnnotationWorldPlaneOrigin).

    pIsDynamic tells if the AABB should be updated depending on the current camera orientation. Indeed, some annotation(s) may be rendered as a billboard, and thus their bounding box should be a sphere centered on the pivot on the annotation. pIsDynamic has no effect on annotations that are not billboard-ed, the result is the same.

    If pDynamic is true, then the current orientation of billboard-ed annotation is taken into account, if false, a sphere centered on the pivot of the annotation is used to compute the AABB, and the result will always be the same for this annotation.

    Returns true if pAnnotationId refers to a known annotation and pAABB is updated.

    If the call fails, then pAABB is left unchanged.

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pDynamic: boolean
      in
      If true, then billboard-ed annotation AABB is computed with the current camera orientation.
    • pAABB: AABB
      out
      The resulting AABB of the given annotation.

    Returns boolean

    true if pAnnotationId refers to a valid annotation.

  • Gets the computed World matrix for the annotation view that contains this annotation.

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix. This call computes the matrix set by the last call to addAnnotationView or setViewApplicationMatrix with the Local Matrix for the annotation view this annotation belongs to.

    pWorldMatrix will be a rotation / translation matrix (no scale).

    Returns true if the World matrix for the view that contains the given annotation id has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pWorldMatrix is left unchanged.

    This call is equivalent to calling getViewWorldMatrix(getAnnotationViewId(pAnnotationId), pWorldMatrix).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pWorldMatrix: Matrix4
      out
      The World matrix for the view that contains the given annotation id.

    Returns boolean

    true if the World matrix of the given annotation has been retrieved.

  • Gets the normal part of the computed World matrix for the annotation view that contains this annotation.

    getAnnotationWorldPlaneNormal(pAnnotationId, pWorldPlaneNormal) is equivalent to getAnnotationWorldMatrix(pAnnotationId, lMatrix), lMatrix.getColumn(2, pWorldPlaneNormal).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the World Plane Normal for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pWorldPlaneNormal is left unchanged.

    This call is equivalent to calling getViewWorldPlaneNormal(getAnnotationViewId(pAnnotationId), pWorldPlaneNormal).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pWorldPlaneNormal: Vector3
      out
      The World Plane Normal for the view that contains the given annotation id.

    Returns boolean

    true if the World Plane Normal of the given annotation has been retrieved.

  • Gets the translation part of the computed World matrix for the annotation view that contains this annotation.

    This is therefore the World Plane Origin. getAnnotationWorldPlaneOrigin(pAnnotationId, pWorldPlaneOrigin) is equivalent to getAnnotationWorldMatrix(pAnnotationId, lMatrix), lMatrix.getColumn(3, pWorldPlaneOrigin).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the World Plane Origin for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pWorldPlaneOrigin is left unchanged.

    This call is equivalent to calling getViewWorldPlaneOrigin(getAnnotationViewId(pAnnotationId), pWorldPlaneOrigin).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pWorldPlaneOrigin: Vector3
      out
      The World Plane Origin for the view that contains the given annotation id.

    Returns boolean

    true if the World Plane Origin of the given annotation has been retrieved.

  • Gets the X axis direction of the computed World matrix for the annotation view that contains this annotation.

    getAnnotationWorldPlaneXAxis(pAnnotationId, pWorldPlaneXAxis) is equivalent to getAnnotationWorldMatrix(pAnnotationId, lMatrix), lMatrix.getColumn(0, pWorldPlaneXAxis).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the World Plane X axis direction for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pWorldPlaneXAxis is left unchanged.

    This call is equivalent to calling getViewWorldPlaneXAxis(getAnnotationViewId(pAnnotationId), pWorldPlaneXAxis).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pWorldPlaneXAxis: Vector3
      out
      The World Plane X axis direction for the view that contains the given annotation id.

    Returns boolean

    true if the World Plane X axis direction of the given annotation has been retrieved.

  • Gets the Y axis direction of the computed World matrix for the annotation view that contains this annotation.

    getAnnotationWorldPlaneYAxis(pAnnotationId, pWorldPlaneYAxis) is equivalent to getAnnotationWorldMatrix(pAnnotationId, lMatrix), lMatrix.getColumn(1, pWorldPlaneYAxis).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the World Plane Y axis direction for the view that contains this annotation has been retrieved, false if pAnnotationId is invalid or refer to a nonexistent annotation, in this last case, pWorldPlaneYAxis is left unchanged.

    This call is equivalent to calling getViewWorldPlaneYAxis(getAnnotationViewId(pAnnotationId), pWorldPlaneYAxis).

    Parameters

    • pAnnotationId: number
      in
      The annotation id of the annotation to fetch.
    • pWorldPlaneYAxis: Vector3
      out
      The World Plane Y axis direction for the view that contains the given annotation id.

    Returns boolean

    true if the World Plane Y axis direction of the given annotation has been retrieved.

  • Gets the rendering state of the given annotations.

    Stores an ORed value of AnnotationInstanceState that reflect the rendering of the given annotation, or AnnotationInstanceState.AIS_Invalid if the given annotation id does not exist in pAnnotationStates.

    If pAnnotationStates is an Uint32Array and its length is strictly inferior to pAnnotationIds.length, then only pAnnotationStates.length values will be computed (the first pAnnotationStates.length values of pAnnotationIds).

    pAnnotationStates[i] will contain the rendering state of pAnnotationIds[i].

    Parameters

    • pAnnotationIds: number[] | Uint32Array
      in
      The ids of the annotations to fetch.
    • pAnnotationStates: number[] | Uint32Array
      out
      The annotation states of the annotations. Any value equal to AnnotationInstanceState.AIS_Invalid means the annotation state of the given annotation could not be fetched.

    Returns boolean

    trueif the call succeeded, if an error occurred, false is returned.

  • Gets the number of annotations contained within the given annotation view.

    Annotations contained within this annotation view are numbered from (including) getViewFirstAnnotationId(pViewId) to getViewFirstAnnotationId(pViewId) + getViewAnnotationsCount(pViewId) - 1.

    Returns the number of annotations contained within the given annotation view, or -1 if pViewId could not be found.

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.

    Returns number

    The number of annotations contained within the given annotation view, or -1 if pViewId could not be found.

  • Gets the application matrix set for the given annotation view.

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix. This call gets the matrix set by the last call to addAnnotationView or setViewApplicationMatrix for the given annotation view.

    pApplicationMatrix will be a rotation / translation matrix (no scale).

    Returns true if the application matrix for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pApplicationMatrix is left unchanged.

    This call is equivalent to calling getAnnotationApplicationMatrix(getViewFirstAnnotationId(pViewId), pApplicationMatrix).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pApplicationMatrix: Matrix4
      out
      The application matrix for the given view.

    Returns boolean

    true if the application matrix of the given annotation view has been retrieved.

  • Gets the start annotation id of the given annotation view.

    Annotations contained within this annotation view are numbered from (including) getViewFirstAnnotationId(pViewId) to getViewFirstAnnotationId(pViewId) + getViewAnnotationsCount(pViewId) - 1.

    getAnnotationViewId(getViewFirstAnnotationId(pViewId)) should return pViewId.

    Returns the start annotation id of the given annotation view, or -1 if pViewId could not be found.

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.

    Returns number

    The start annotation id of the given annotation view, or -1 if pViewId could not be found.

  • Gets all the annotations view ids handled by this annotation renderer.

    Calling getViewIds(undefined) will return the number of annotation views currently handled. Calling getViewIds with an Uint32Array without sufficient length will return -1.

    Returns the number of annotation views handled by the annotation renderer, or -1 if pViewIds is a Uint32Array without sufficient memory.

    Parameters

    • pViewIds: number[] | Uint32Array
      out
      The ids of the annotation views.

    Returns number

    The number of annotation views handled by the annotation renderer, or -1 if pViewIds is a Uint32Array without sufficient memory.

  • Gets the normal part of the Local matrix for the given annotation view.

    getViewLocalPlaneNormal(pViewId, pLocalPlaneNormal) is equivalent to getViewLocalMatrix(pViewId, lMatrix), lMatrix.getColumn(2, pLocalPlaneNormal).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the Local Plane Normal for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pLocalPlaneNormal is left unchanged.

    This call is equivalent to calling getAnnotationLocalPlaneNormal(getViewFirstAnnotationId(pViewId), pLocalPlaneNormal).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pLocalPlaneNormal: Vector3
      out
      The Local Plane Normal for the given view.

    Returns boolean

    true if the Local Plane Normal of the given annotation view has been retrieved.

  • Gets the translation part of the Local matrix for the given annotation view.

    This is therefore the Local Plane Origin. getViewLocalPlaneOrigin(pViewId, pLocalPlaneOrigin) is equivalent to getViewLocalMatrix(pViewId, lMatrix), lMatrix.getColumn(3, pLocalPlaneOrigin).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the Local Plane Origin for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pLocalPlaneOrigin is left unchanged.

    This call is equivalent to calling getAnnotationLocalPlaneOrigin(getViewFirstAnnotationId(pViewId), pLocalPlaneOrigin).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pLocalPlaneOrigin: Vector3
      out
      The Local Plane Origin for the given view.

    Returns boolean

    true if the Local Plane Origin of the given annotation view has been retrieved.

  • Gets the X Axis direction part of the Local matrix for the given annotation view.

    getViewLocalPlaneXAxis(pViewId, pLocalPlaneXAxis) is equivalent to getViewLocalMatrix(pViewId, lMatrix), lMatrix.getColumn(0, pLocalPlaneXAxis).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the Local Plane X Axis for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pLocalPlaneXAxis is left unchanged.

    This call is equivalent to calling getAnnotationLocalPlaneXAxis(getViewFirstAnnotationId(pViewId), pLocalPlaneXAxis).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pLocalPlaneXAxis: Vector3
      out
      The Local Plane X Axis for the given view.

    Returns boolean

    true if the Local Plane X Axis of the given annotation view has been retrieved.

  • Gets the Y Axis direction part of the Local matrix for the given annotation view.

    getViewLocalPlaneYAxis(pViewId, pLocalPlaneYAxis) is equivalent to getViewLocalMatrix(pViewId, lMatrix), lMatrix.getColumn(1, pLocalPlaneYAxis).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the Local Plane Y Axis for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pLocalPlaneYAxis is left unchanged.

    This call is equivalent to calling getAnnotationLocalPlaneYAxis(getViewFirstAnnotationId(pViewId), pLocalPlaneYAxis).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pLocalPlaneYAxis: Vector3
      out
      The Local Plane Y Axis for the given view.

    Returns boolean

    true if the Local Plane Y Axis of the given annotation view has been retrieved.

  • Gets the Axis Aligned Bounding Box (AABB) of the given annotation view.

    Please note that the World Plane Origin of the view is not necessary contained in such an AABB since all annotations may be set with an offset from the Local Plane Origin (see getViewWorldPlaneOrigin).

    Returns true if pViewId refers to a known annotation view and pAABB is updated. If the call fails, then pAABB is left unchanged.

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pAABB: AABB
      out
      The resulting AABB of the given annotation view.

    Returns boolean

    true if pViewId refers to a valid annotation view.

  • Gets the computed World matrix for the given annotation view.

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix. This call computes the matrix set by the last call to addAnnotationView or setViewApplicationMatrix with the Local Matrix for the given annotation view.

    pWorldMatrix will be a rotation / translation matrix (no scale).

    Returns true if the World matrix for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pWorldMatrix is left unchanged.

    This call is equivalent to calling getAnnotationWorldMatrix(getViewFirstAnnotationId(pViewId), pWorldMatrix).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pWorldMatrix: Matrix4
      out
      The World matrix for the given view.

    Returns boolean

    true if the World matrix of the given annotation view has been retrieved.

  • Gets the normal part of the computed World matrix for the given annotation view.

    getViewWorldPlaneNormal(pViewId, pWorldPlaneNormal) is equivalent to getViewWorldMatrix(pViewId, lMatrix), lMatrix.getColumn(2, pWorldPlaneNormal).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the World Plane Normal for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pWorldPlaneNormal is left unchanged.

    This call is equivalent to calling getAnnotationWorldPlaneNormal(getViewFirstAnnotationId(pViewId), pWorldPlaneNormal).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pWorldPlaneNormal: Vector3
      out
      The World Plane Normal for the given view.

    Returns boolean

    true if the World Plane Normal of the given annotation view has been retrieved.

  • Gets the translation part of the computed World matrix for the given annotation view.

    This is therefore the World Plane Origin. getViewWorldPlaneOrigin(pViewId, pWorldPlaneOrigin) is equivalent to getViewWorldMatrix(pViewId, lMatrix), lMatrix.getColumn(3, pWorldPlaneOrigin).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the World Plane Origin for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pWorldPlaneOrigin is left unchanged.

    This call is equivalent to calling getAnnotationWorldPlaneOrigin(getViewFirstAnnotationId(pViewId), pWorldPlaneOrigin).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pWorldPlaneOrigin: Vector3
      out
      The World Plane Origin for the given view.

    Returns boolean

    true if the World Plane Origin of the given annotation view has been retrieved.

  • Gets the X axis direction of the computed World matrix for the given annotation view.

    getViewWorldPlaneXAxis(pViewId, pWorldPlaneXAxis) is equivalent to getViewWorldMatrix(pViewId, lMatrix), lMatrix.getColumn(0, pWorldPlaneXAxis).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the World Plane X axis direction for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pWorldPlaneXAxis is left unchanged.

    This call is equivalent to calling getAnnotationWorldPlaneXAxis(getViewFirstAnnotationId(pViewId), pWorldPlaneXAxis).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pWorldPlaneXAxis: Vector3
      out
      The World Plane X Axis for the given view.

    Returns boolean

    true if the World Plane X Axis of the given annotation view has been retrieved.

  • Gets the Y axis direction of the computed World matrix for the given annotation view.

    getViewWorldPlaneYAxis(pViewId, pWorldPlaneYAxis) is equivalent to getViewWorldMatrix(pViewId, lMatrix), lMatrix.getColumn(1, pWorldPlaneYAxis).

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix.

    Returns true if the World Plane Y axis direction for the given view has been retrieved, false if pViewId is invalid or refer to a nonexistent annotation view, in this last case, pWorldPlaneYAxis is left unchanged.

    This call is equivalent to calling getAnnotationWorldPlaneYAxis(getViewFirstAnnotationId(pViewId), pWorldPlaneYAxis).

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to fetch.
    • pWorldPlaneYAxis: Vector3
      out
      The World Plane Y Axis for the given view.

    Returns boolean

    true if the World Plane Y Axis of the given annotation view has been retrieved.

  • Tells if the EventDispatcher has such a callback registered for the given event type.

    Parameters

    • pType: string
      in
      The type of the event to test.
    • pListener: tListenerCallback
      in
      The listener function that gets tested.

    Returns boolean

    true if such a listener is installed for the given type of event.

  • Tells if the EventDispatcher has such a callback registered for the given callback id.

    Parameters

    • pId: string
      in
      The id of the callback to test.

    Returns boolean

    true if such a listener is installed for the given callback id.

  • Tells if the AnnotationRendererInterface is computing annotations at the moment.

    This tells if any addAnnotationView has been called but has not finished yet.

    Returns boolean

    true if the AnnotationRendererInterface is computing annotations.

  • Removes the views (i.e. all the annotations of the given views) from being rendered.

    If the input array contains annotation request id, then the parsing for such annotations is cancelled.

    Parameters

    • pViews: number[] | Uint32Array
      in
      The view ids and request ids of the views that will be removed.
    • Optional pRemovedAnnotations: number[]
      out
      The optional annotation ids that have been removed if requested.

    Returns number

    The number of annotation views effectively removed, or -1 if an error occurred.

  • Removes a listener from an event type.

    If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.

    Parameters

    • pType: string
      in
      The type of the listener that gets removed.
    • pListener: tListenerCallback

      The listener function that gets removed.

    • pObject: Object

      The listener object that was used when addEventListener was called.

    Returns boolean

    true if the callback was removed else false.

  • Removes a listener from an event type.

    If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.

    Parameters

    • pType: string
      in
      The type of the listener that gets removed.
    • pListener: tListenerCallback

      The listener function that gets removed.

    Returns boolean

    true if the callback was removed else false.

  • Removes a listener by its id.

    If no such listener is found, then the function returns false and does nothing. You must use the return value of addEventListener to actually remove the listener.

    Parameters

    • pId: string
      in
      The id returned by the call to addEventListener that you want to remove.

    Returns boolean

    true if the callback was removed else false.

  • Sets the rendering state of the given annotations.

    annotation rendering flags effect
    Say I want to change the visibility bit and the priority of an annotation:

    /** 
    * Sample to illustrate the concept of changing the visibility and priority of 1 annotation.
    */
    import { tAnnotationId, InfiniteEngineInterface, AnnotationRendererInterface, AnnotationInstanceState } from 'generated_files/documentation/appinfiniteapi';

    // retrieved previously
    let lAnnotationId : tAnnotationId;
    // created previously
    let lInfiniteEngine : InfiniteEngineInterface;
    // retrieve the annotation renderer
    const lAnnotationRenderer : AnnotationRendererInterface = lInfiniteEngine.getAnnotationRenderer();

    // I want to be visible and standard priority
    const lState : number = AnnotationInstanceState.AIS_Visible | AnnotationInstanceState.AIS_DepthPriorityStd;
    // and change visibility and depth
    const lMask : number = AnnotationInstanceState.AIS_Visible | AnnotationInstanceState.AIS_DepthPriorityMask;

    // set visible and standard priority
    lAnnotationRenderer.setAnnotationRenderingState(lAnnotationId, lMask, lState);

    Returns true if the call was successful (i.e. pAnnotations is of the correct type). This call may return `true` even if nothing is changed (i.e. no matching annotation was found, the state of the annotations is left unchanged, etc ...).

    Parameters

    • pAnnotations: number | number[] | Uint32Array
      in
      The annotation(s) whose state will be updated.
    • pRenderingMask: number
      in
      The mask of the rendering state to update the given annotations.
    • pRenderingState: number
      in
      The new rendering state of the given annotations.

    Returns boolean

    true if the rendering state is correct.

  • Sets the rendering state of all the annotations.

    annotation rendering flags effect
    Say I want to change the visibility bit and the priority of an annotation:
    ```typescript /** * Sample to illustrate the concept of changing the visibility and priority of 1 annotation. */ import { tAnnotationId, InfiniteEngineInterface, AnnotationRendererInterface, AnnotationInstanceState } from 'generated_files/documentation/appinfiniteapi';

    // retrieved previously let lAnnotationId : tAnnotationId; // created previously let lInfiniteEngine : InfiniteEngineInterface; // retrieve the annotation renderer const lAnnotationRenderer : AnnotationRendererInterface = lInfiniteEngine.getAnnotationRenderer();

    // I want to be visible and standard priority const lState : number = AnnotationInstanceState.AIS_Visible | AnnotationInstanceState.AIS_DepthPriorityStd; // and change visibility and depth const lMask : number = AnnotationInstanceState.AIS_Visible | AnnotationInstanceState.AIS_DepthPriorityMask;

    // set visible and standard priority lAnnotationRenderer.setAnnotationRenderingState(lAnnotationId, lMask, lState);

    <br>
    Returns true if the annotation state and flags are correct (i.e. integers).

    Parameters

    • pRenderingMask: number
      in
      The mask of the rendering state to update the given annotations.
    • pRenderingState: number
      in
      The new rendering state of the given annotations.

    Returns boolean

    true if pRenderingMask and pRenderingState are integers.

  • Sets the new application matrix to put for the given view.

    Keep in mind that : WorldMatrix = ApplicationMatrix x LocalMatrix. This call replaces the matrix set by addAnnotationView.

    pApplicationMatrix MUST be a rotation / translation matrix (no scale), there is no check to ensure that the matrix is correct. You will experience some rendering and positioning trouble if pApplicationMatrix is not a rotation / translation matrix.

    Returns true if the application matrix for the given view has been updated, false if pViewId is invalid or refer to a nonexistent annotation view.

    Parameters

    • pViewId: number
      in
      The annotation view id of the annotation view to modify.
    • pApplicationMatrix: Matrix4
      in
      The new application matrix (rotation / translation) to set.

    Returns boolean

    true if the application matrix for the given view has been updated.