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.
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.
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.
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.
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.
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.
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.
annotation ids of the annotations to fetch.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).
annotation id of the annotation to fetch.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.
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).
annotation view id of the annotation to fetch.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).
annotation id of the annotation to fetch.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).
annotation id of the annotation to fetch.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).
annotation id of the annotation to fetch.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).
annotation id of the annotation to fetch.true if the Local Plane Y Axis direction of the given annotation has been retrieved.
Gets the rendering state of the given annotation.
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).
annotation id of the annotation to fetch.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.
annotation id of the annotation to fetch.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).
annotation id of the annotation to fetch.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).
annotation id of the annotation to fetch.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).
annotation id of the annotation to fetch.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).
annotation id of the annotation to fetch.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).
annotation id of the annotation to fetch.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].
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.
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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.
annotation view id of the annotation view to fetch.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.
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 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 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(getViewFirstAnnotationId(pViewId), pLocalMatrix).
annotation view id of the annotation view to fetch.true if the Local matrix of the given annotation view has been retrieved.
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).
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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.
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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).
annotation view id of the annotation view to fetch.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.
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 AnnotationRendererInterfaceSignal.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.
If the input array contains annotation request id, then the parsing for such annotations is cancelled.
Optional pRemovedAnnotations: 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.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
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.
The listener function that gets removed.
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.
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_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);
true if the rendering state is correct.
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);
<br>
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.
annotation view id of the annotation view to modify.true if the application matrix for the given view has been updated.
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.
The LocalMatrix is decomposed with 4 vectors : the LocalPlaneX, LocalPlaneY, LocalNormal, and LocalOrigin.
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 :
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