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.
A strictly positive request id of the add procedure, -1 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.
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.
The id of the inserted callback (actually an UUID).
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.
A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the parsing result.
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).
true if the application matrix of the given annotation has been retrieved.
annotation id of the annotation to fetch.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).
true if the Local matrix of the given annotation has been retrieved.
annotation view id of the annotation to fetch.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).
true if the Local Plane Normal of the given annotation has been retrieved.
annotation id of the annotation to fetch.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).
true if the Local Plane Origin of the given annotation has been retrieved.
annotation id of the annotation to fetch.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).
true if the Local Plane X Axis direction of the given annotation has been retrieved.
annotation id of the annotation to fetch.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).
true if the Local Plane Y Axis direction of the given annotation has been retrieved.
annotation id of the annotation to fetch.Gets the rendering state of the given annotation.
The annotation state of the given annotation, or -1 if pAnnotationId refers to an invalid or nonexistent annotation id.
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).
The annotation view id this annotation belongs to, or -1 if pAnnotationId could not be found.
annotation id of the annotation to fetch.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.
true if pAnnotationId refers to a valid annotation.
annotation id of the annotation to fetch.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).
true if the World matrix of the given annotation has been retrieved.
annotation id of the annotation to fetch.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).
true if the World Plane Normal of the given annotation has been retrieved.
annotation id of the annotation to fetch.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).
true if the World Plane Origin of the given annotation has been retrieved.
annotation id of the annotation to fetch.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).
true if the World Plane X axis direction of the given annotation has been retrieved.
annotation id of the annotation to fetch.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).
true if the World Plane Y axis direction of the given annotation has been retrieved.
annotation id of the annotation to fetch.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.
The number of annotations handled by the annotation renderer, or -1 if pAnnotationIds is a Uint32Array without sufficient memory.
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].
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).
true if the application matrix of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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.
The number of annotation views handled by the annotation renderer, or -1 if pViewIds is a Uint32Array without sufficient memory.
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).
true if the Local matrix of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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).
true if the Local Plane Normal of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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).
true if the Local Plane Origin of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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).
true if the Local Plane X Axis of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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).
true if the Local Plane Y Axis of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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.
The number of annotations contained within the given annotation view, or -1 if pViewId could not be found.
annotation view id of the annotation view to fetch.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.
The start annotation id of the given annotation view, or -1 if pViewId could not be found.
annotation view id of the annotation view to fetch.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.
true if pViewId refers to a valid annotation view.
annotation view id of the annotation view to fetch.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).
true if the World matrix of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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).
true if the World Plane Normal of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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).
true if the World Plane Origin of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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).
true if the World Plane X Axis of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.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).
true if the World Plane Y Axis of the given annotation view has been retrieved.
annotation view id of the annotation view to fetch.Tells if the EventDispatcher has such a callback registered for the given event type.
true if such a listener is installed for the given type of event.
Tells if the AnnotationRendererInterface is computing annotations at the moment.
This tells if any addAnnotationView has been called but has not finished yet.
true if the AnnotationRendererInterface is computing annotations.
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.
Removes the views (i.e. all the annotations of the given views) from being rendered.
The number of annotation views effectively removed.
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.
true if the callback was removed else false.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
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.
true if the callback was removed else false.
The listener function that gets removed.
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.
true if the callback was removed else false.
Sets the rendering state of the given annotations.
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);
true if the rendering state was set.
Sets the rendering state of all the annotations.
// 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).
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.
true if the application matrix for the given view has been updated.
annotation view id of the annotation view to modify.
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.
The LocalMatrix is decomposed with 4 vectors : the LocalPlaneX, LocalPlaneY, LocalNormal, and LocalOrigin.
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 :
Say I want to change the visibility bit and the priority of an annotation :
And the full example :
Or asynchronously :
Please see Annotations for more explanations about annotations.
See