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 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.

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. An undefined matrix is equivalent to a unit matrix. 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.

/** 
* Sample to illustrate the concept of annotation view matrices.
*/
import { tAnnotationViewId, Matrix4, InfiniteEngineInterface, AnnotationRendererInterface } from 'generated/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/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, when included in the AnnotationRendererInterface 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.

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/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/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, Matrix4, InfiniteEngineInterface, AnnotationRendererInterface, AnnotationRendererInterfaceSignal,
tAnnotationViewId, AnnotationInstanceState, AnnotationViewParsingResultInterface,
} from 'generated/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.getAnnotationViewsResult();
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 lMask : number = AnnotationInstanceState.AIS_DepthPriorityMask | AnnotationInstanceState.AIS_Visible;
const lState : number = AnnotationInstanceState.AIS_DepthPriorityStd;
const lRequestId : number = lAnnotationRenderer.addAnnotationView(lAnnotationResult.getAnnotationView(), lAnnotationResult.getAnnotationViewMatrix(), 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.annotationViewId < 0)
{
// this is an error
console.log('annotation view parsing has failed ' + lParsingResult.errorMessage);
return;
}

// store the annotation view id
lAnnotationViewId = lParsingResult.annotationViewId;

// create the list of annotation ids from lParsingResult.annotationIdStart to lParsingResult.annotationIdStart + lParsingResult.nbAnnotations - 1
const lAnnotationIds : number [] = [];
lAnnotationIds.length = lParsingResult.nbAnnotations;
let i : number;
for (i = 0; i < lParsingResult.nbAnnotations; ++i)
{
lAnnotationIds[i] = lParsingResult.annotationIdStart + 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, AnnotationViewInfoInterface, InfiniteEngineInterface, AnnotationRendererInterface,
tAnnotationViewId, AnnotationInstanceState, AnnotationViewParsingResultInterface, AsyncAnnotationResult, AsyncResultReason
} from 'generated/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 : AnnotationViewInfoInterface;

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

const displayResult = async () : Promise<any> =>
{
const lAsyncAnnotationResult : AsyncAnnotationResult = await lAnnotationViewGetter.asyncFetchAnnotationViews(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 lAnnotationParsingResult = await lAnnotationRenderer.asyncAddAnnotationView(lAnnotationResult.getAnnotationView(), lAnnotationResult.getAnnotationViewMatrix(), 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.annotationViewId < 0)
{
// this is an error
console.log('annotation view parsing has failed ' + lParsingResult.errorMessage);
return;
}

// store the annotation view id
lAnnotationViewId = lParsingResult.annotationViewId;

// create the list of annotation ids from lParsingResult.annotationIdStart to lParsingResult.annotationIdStart + lParsingResult.nbAnnotations - 1
const lAnnotationIds : number [] = [];
lAnnotationIds.length = lParsingResult.nbAnnotations;
let i : number;
for (i = 0; i < lParsingResult.nbAnnotations; ++i)
{
lAnnotationIds[i] = lParsingResult.annotationIdStart + 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

See

Hierarchy

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 AnnotationViewParsed will be triggered shortly after with the result of the annotation view parsing.

    If the function succeeds, a strictly positive number is returned, which is the id of the request, which should match the requestId of the correspondent signal.

    If the function fails, -1 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.

    Returns

    A strictly positive request id of the add procedure, -1 if there is an error.

    Parameters

    • pView: string | ArrayBuffer | AnnotationViewInterface
      in
      The annotation view to include.
    • pApplicationMatrix: undefined | Matrix4
      in
      The matrix of the annotation view. An undefined value is equivalent to a unit matrix.
    • 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

  • 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.

    Returns

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

    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: undefined | Object
      in
      The optional object the callback will be called with when the given event fires.

    Returns string

  • 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.

    Returns

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

    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

  • 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.

    Returns

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

    Parameters

    • pView: string | ArrayBuffer | AnnotationViewInterface
      in
      The annotation view to include.
    • pApplicationMatrix: undefined | Matrix4
      in
      The matrix of the annotation view. An undefined value is equivalent to a unit matrix.
    • 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>

  • 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).

    Returns

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

    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

  • 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 getPlaneXAxis, getPlaneYAxis, getPlaneNormal, 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).

    Returns

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

    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

  • 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).

    Returns

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

    Parameters

    • pApplicativeAnnotationId: 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

  • 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).

    Returns

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

    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

  • 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).

    Returns

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

    Parameters

    • pApplicativeAnnotationId: 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

  • 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).

    Returns

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

    Parameters

    • pApplicativeAnnotationId: 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

  • Gets the rendering state of the given annotation.

    annotation rendering flags effect
    Returns an `OR`ed value of [AnnotationInstanceState](../enums/AnnotationInstanceState.html) that reflect the rendering of the given annotation, or -1 if the given `annotation id` does not exist.

    Returns

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

    Parameters

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

    Returns number

  • Gets the annotation view id this annotation belongs to.

    getAnnotationViewId({@link getViewStartAnnotationId}(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).

    Returns

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

    Parameters

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

    Returns number

  • 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.

    Returns

    true if pAnnotationId refers to a valid annotation.

    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

  • 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).

    Returns

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

    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

  • 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).

    Returns

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

    Parameters

    • pApplicativeAnnotationId: 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

  • 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).

    Returns

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

    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

  • 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).

    Returns

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

    Parameters

    • pApplicativeAnnotationId: 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

  • 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).

    Returns

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

    Parameters

    • pApplicativeAnnotationId: 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

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

    Calling getAnnotationsIds(undefined) will return the number of annotations currently handled. Calling getAnnotationsIds 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.

    Returns

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

    Parameters

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

    Returns number

  • Gets the rendering state of the given annotations.

    Stores an ORed value of AnnotationInstanceState that reflect the rendering of the given annotation, or -1 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 negative value means the annotation state of the given annotation could not be fetched.

    Returns void

  • 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(getViewStartAnnotationId(pViewId), pApplicationMatrix).

    Returns

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

    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

  • 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.

    Returns

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

    Parameters

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

    Returns number

  • Gets the Local matrix for the given annotation view.

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

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

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

    This call is equivalent to calling getAnnotationLocalMatrix(getViewStartAnnotationId(pViewId), pLocalMatrix).

    Returns

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

    Parameters

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

    Returns boolean

  • 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(getViewStartAnnotationId(pViewId), pLocalPlaneNormal).

    Returns

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

    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

  • 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(getViewStartAnnotationId(pViewId), pLocalPlaneOrigin).

    Returns

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

    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

  • 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(getViewStartAnnotationId(pViewId), pLocalPlaneXAxis).

    Returns

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

    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

  • 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(getViewStartAnnotationId(pViewId), pLocalPlaneYAxis).

    Returns

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

    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

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

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

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

    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

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

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

    getAnnotationViewId(getViewStartAnnotationId(pViewId)) should return pViewId.

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

    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

  • 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.

    Returns

    true if pViewId refers to a valid annotation view.

    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

  • 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(getViewStartAnnotationId(pViewId), pWorldMatrix).

    Returns

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

    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

  • 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(getViewStartAnnotationId(pViewId), pWorldPlaneNormal).

    Returns

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

    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

  • 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(getViewStartAnnotationId(pViewId), pWorldPlaneOrigin).

    Returns

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

    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

  • 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(getViewStartAnnotationId(pViewId), pWorldPlaneXAxis).

    Returns

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

    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

  • 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(getViewStartAnnotationId(pViewId), pWorldPlaneYAxis).

    Returns

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

    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

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

    Returns

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

    Parameters

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

    Returns boolean

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

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

    Returns

    true if the AnnotationRendererInterface is computing annotations.

    Returns boolean

  • Removes all the annotations contained in the AnnotationRendererInterface.

    Any pending request with addAnnotationView will be cancelled and a AnnotationViewParsed signal will be triggered for each pending annotation view to be parsed with an error.

    Returns void

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

    Returns

    The number of annotation views effectively removed.

    Parameters

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

    Returns number

  • 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.

    Returns

    true if the callback was removed else false.

    Parameters

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

      The listener function that gets removed.

    • pObject: undefined | Object

      The listener object that was used when addEventListener was called.

    Returns boolean

  • 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.

    Returns

    true if the callback was removed else false.

    Parameters

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

      The listener function that gets removed.

    Returns boolean

  • 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.

    Returns

    true if the callback was removed else false.

    Parameters

    • pId: string
      in
      The id returned by the call to [addEventListener](AnnotationRendererInterface.html#addEventListener) that you want to remove.

    Returns boolean

  • 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/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).

    Returns

    true if the rendering state was set.

    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

  • 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/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 annotation state and flags are correct (i.e. integers).

    Returns

    true if pRenderingMask and pRenderingState are 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

  • 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.

    Returns

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

    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