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).
Asynchronous - Sends a close request concerning the current data session on the proxy.
This actually cleans up the data retained by the proxy and cleans up the resources allocated to the InfiniteEngineInterface.
When the data session is effectively closed, the promise is resolved.
A promise.
Asynchronous - starts the open data session procedure.
A connection is established between the client and the 3djuump infinite proxy. Security tokens are exchanged and initialization data is retrieved from the proxy and the cache if relevant. This operation may take from a few seconds to several minutes depending on the size of the build to work with.
The promise is then resolved with the correct AsyncDataSessionInterfaceOpenResult value.
A promise. The promise is resolved with the reason (success, failed, already closed).
Cancels the calculation of all running FilterSolverInterfaces, FilterItemInterfaces, VisibilityContextInterfaces ConfContextInterfaces.
The relevant interfaces will asynchronously trigger a "cancel" and "ready" signal when the canceling is done.
Sends a close request concerning the current data session on the proxy.
This actually cleans up the data retained by the proxy and cleans up the resources allocated to the InfiniteEngineInterface.
When the data session is effectively closed, then the DataSessionClosed signal is sent.
Optional _pDoNotCareAboutResult: booleanInstantiates an annotation retrieval procedure to retrieve the content of a view of annotations.
Please see Annotations for more explanations about annotations.
Annotation views may be linked to part instances. The list of annotation views for a part instance
are retrieved by an IdCardGetterInterface, then individual views may be retrieved by
a AnnotationGetterInterface.
A new AnnotationGetterInterface.
Creates an AttachedDocumentInfoInterface to be used in a DocumentContentGetterInterface.
If the user knows the attached document id and the mime type of an attached document, then a
DocumentContentGetterInterface can be used to retrieve the corresponding attached document.
A new AttachedDocumentInfoInterface.
Instantiates a metadata boolean attribute value filter.
A FilterBooleanInterface is a FilterItemInterface that elects part instances
that contain in their joined attribute set a boolean attribute (true, false) whose value
is set by
the FilterBooleanInterface.
The FilterBooleanInterface should be used inside a container (FilterSolverInterface, FilterSetInterface or FilterCompoundInterface).
The FilterBooleanInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterBooleanInterface.
Optional pFilterId: stringInstantiates a data retrieval procedure to retrieve the metadata documents
of the children of a list of part instance ids.
Such a list of metadata documents can be merged and customized to
display an metadata information of the children of a part instance.
A new ChildrenIdCardGetterInterface.
Instantiates a group metadata filter.
A FilterCompoundInterface is a group filter that elects documents
whose metadata satisfy the clauses contained inside (FilterAttributeInterface,
FilterRangeInterface, FilterHasFieldInterface, FilterBooleanInterface).
When the set of documents that match the clauses are found, then part instances that
are referenced by these documents are elected.
The FilterCompoundInterface should be used inside a container (FilterSolverInterface, FilterSetInterface).
The FilterCompoundInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterCompoundInterface.
Optional pFilterId: stringInstantiates a ConfContextInterface.
A ConfContextInterface MUST be used inside a VisibilityContextInterface to create a valid filtering context. The ConfContextInterface is the expression of a selected configuration.
The ConfContextInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new ConfContextInterface.
Optional pConfCtxId: stringInstantiates an oriented bounding box diagonal SQUARED length filter.
A FilterDiagonalInterface is a FilterItemInterface that elects part instances
whom oriented bounding box diagonal SQUARED length is contained within the ranges
specified in the FilterDiagonalInterface.
The FilterDiagonalInterface should be used inside a container (FilterSolverInterface, FilterSetInterface).
The FilterDiagonalInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterDiagonalInterface.
Optional pFilterId: stringInstantiates a data retrieval procedure to retrieve the content of an attached document.
Attached document are documents (images, html pages, links, pdf documents, etc ...)
that may be linked to part instances. The list of available documents for a part instance
are retrieved by an IdCardGetterInterface, then individual documents may be retrieved by
a DocumentContentGetterInterface.
A new DocumentContentGetterInterface.
Instantiates a converter to translate a document id to its corresponding part instance ids and geometric instance ids.
A DocumentIdConverterInterface may be used in a search procedure.
A DocumentIdConverterInterface.
Instantiates an axis aligned bounding box filter.
A FilterAABBInterface is a FilterItemInterface that elects part instances
whom triangles intersect the FilterAABBInterface AABB.
The FilterAABBInterface should be used inside a container (FilterSolverInterface, FilterSetInterface).
The FilterAABBInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterAABBInterface.
Optional pFilterId: stringInstantiates an all part instances filter.
A FilterAllPartsInterface is a FilterItemInterface that elects all part instances
of the DMU. It is the most optimized way to create a filter that contains all part instances.
The FilterAllPartsInterface should be used inside a container (FilterSolverInterface, FilterSetInterface).
The FilterAllPartsInterface is bound to the currently DataSessionInterface.
Get rid of the object with dispose.
A new FilterAllPartsInterface.
Optional pFilterId: stringInstantiates a metadata text attribute value filter.
A FilterAttributeInterface is a FilterItemInterface that elects part instances
that contain in their joined attribute set a string attribute whose value matches with the ones contained inside
the FilterAttributeInterface.
The FilterAttributeInterface should be used inside a container (FilterSolverInterface, FilterSetInterface or FilterCompoundInterface).
The FilterAttributeInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterAttributeInterface.
Optional pFilterId: stringInstantiates a metadata attribute filter.
A FilterHasFieldInterface is a FilterItemInterface that elects part instances
that contain in their joined attribute set an attribute whose name
is set by the FilterHasFieldInterface.
The FilterHasFieldInterface should be used inside a container (FilterSolverInterface, FilterSetInterface or FilterCompoundInterface).
The FilterHasFieldInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterHasFieldInterface.
Optional pFilterId: stringInstantiates a part instance ids list filter.
A FilterPartInstanceListInterface is a FilterItemInterface that elects part instances
whose part instance id is contained in the FilterPartInstanceListInterface part instance ids list.
WARNING : using a FilterPartInstanceListInterface is very risky since part instance ids are recomputed at
each new 3djuump Infinite build process.
The FilterPartInstanceListInterface should be used inside a container (FilterSolverInterface, FilterSetInterface).
The FilterPartInstanceListInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterPartInstanceListInterface.
Optional pFilterId: stringInstantiates a metadata numeric attribute value filter.
A FilterRangeInterface is a FilterItemInterface that elects part instances
that contain in their joined attribute set a numeric attribute (number, date, number range, date range) whose value
is contained within the ranges contained inside
the FilterRangeInterface.
The FilterRangeInterface should be used inside a container (FilterSolverInterface, FilterSetInterface or FilterCompoundInterface).
The FilterRangeInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterRangeInterface.
Optional pFilterId: stringInstantiates a "group" filter.
A FilterSetInterface is a FilterItemInterface that allows grouping [FilterItemInterface | FilterItemInterfaces] to introduce an operator precedence between them. It is similar to a "parenthesis" system (see FilterOperator).
The FilterSetInterface can be used inside a container (FilterSolverInterface, FilterSetInterface), but beware there is a hard coded limit on the number of imbricated FilterSetInterface (a FilterSetInterface inside a FilterSetInterface inside a FilterSetInterface etc).
Please refer to FilterSetInterface and getDepthContribution.
The FilterSetInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterSetInterface.
Optional pFilterId: stringInstantiates a FilterSolverInterface.
A FilterSolverInterface is the expression of a combination of multiple
FilterItemInterfaces with a specific operator to create
part instance ids sets and geometric instance ids sets.
The FilterSolverInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterSolverInterface.
Optional pFilterSolverId: stringInstantiates a converter to translate geometric instance ids to their corresponding part instance ids.
This is the opposite of the PartInstanceConverterInterface.
A new GeometricInstanceConverterInterface.
Instantiates a data retrieval procedure to retrieve the metadata documents
associated to a list of part instance ids and their ancestors.
Such a list of metadata documents can be merged and customized to
display an "idcard" of a part instance and its ancestors.
A new IdCardGetterInterface.
Instantiates a query string filter.
A FilterLiteralInterface is a FilterItemInterface that elects part instances
that have at least one individual metadata document that satisfies the string query set by the FilterLiteralInterface.
Such a query should be written in the 3djuump infinite literal and search query language.
The FilterLiteralInterface should be used inside a container (FilterSolverInterface, FilterSetInterface).
The FilterLiteralInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new FilterLiteralInterface.
Optional pFilterId: stringInstantiates a converter to translate part instances ids to their corresponding geometric instance ids.
This is the opposite of the GeometricInstanceConverterInterface.
A new PartInstanceConverterInterface.
Instantiates a search procedure.
A SearchInterface is used to trigger search query(ies) in the 3djuump infinite metadata documents, and returns matching metadata documents. The SearchInterface relies on the 3djuump infinite literal and search query language.
A new SearchInterface.
Instantiates a filtering context.
A filtering context (VisibilityContextInterface) is composed of a list of
FilterSolverInterface(s),
and a required ConfContextInterface. Filtering context may be used
to restrict the next filtering requests
to a set a specific part instances.
The VisibilityContextInterface is bound to the given DataSessionInterface.
Get rid of the object with dispose.
A new filtering context bound to the currently loaded DMU.
Optional pVisibilityCtxId: stringGets rid of this object.
After this call, this object can no longer be used.
If the object is an InfiniteObjectDispatcherInterface, then the ObjectDisposed signal is emitted.
Further uses of the object (with the exception of isDisposed and getInfiniteObjectType) will log a message with LL_UsingDisposedObject.
Gets the list of available annotation types.
Please see Annotations for more explanations about annotations.
Modifying this array in place results in undefined behavior.
DO NOT modify this array.
Gets the attributes dictionary of the DMU.
The AttributesDictionaryInterface is a read only interface to know all the available attributes and their types.
Gets the list of configurations.
Please see configurations for more explanations about configurations.
Modifying this array in place results in undefined behavior.
DO NOT modify this array.
Gets the data session token that may be used in other requests to prove the authentication to the 3djuump infinite architecture.
Any http request should have the header x-infinite-bearer : <DataSessionInterface.getDataSessionBearer()>.
If the data session is not connected, returns an empty string.
The data session token used to prove the authentication.
Gets the Axis Aligned Bounding Box of the currently loaded DMU.
Returns false if no DMU is loaded (DMULoadingSuccess).
true if a DMU is loaded and pDmuAABBOut is updated.
Gets the extended data session token that may be used in other requests to prove the authentication to the 3djuump infinite architecture.
The extended bearer is heavier than getDataSessionBearer and is available only if the directory session was connected with an extended bearer request (Please refer to getSamePageAuthenticationUrl and getPopupBasedAuthenticationUrl).
Any http request may have the header x-infinite-bearer : <DataSessionInterface.getExtendedDataSessionBearer()>.
If the data session is not connected, returns an empty string.
The extended data session token used to prove the authentication.
Gets the axis aligned bounding box of the given geometric instance id.
Call this function after the DMU has been loaded (DMULoadingSuccess) with a previously created AABB.
Returns true if the given geometric instance id is valid.
true if pAABBOut is updated.
geometric instance id to query.geometric instance.Gets the diagonal squared length of the Oriented Bounding Box (OBB) of the given geometric instance id.
Returns -1 if pGeometricInstanceId is an invalid geometric instance id, or the diagonal squared length of the OBB if it is valid.
The diagonal squared length of the OBB of the geometric instance or -1 if invalid.
geometric instance id to query.Gets the maximum diagonal squared length of all the Oriented Bounding Box (OBB) of all the geometric instances.
Returns the maximum diagonal squared length of the current DMU, or -1 if a DMU has not been loaded (DMULoadingSuccess).
The maximum diagonal squared length of the current DMU, or -1 if no DMU is loaded.
Gets the minimum diagonal squared length of all the Oriented Bounding Box (OBB) of all the geometric instances.
Returns the minimum diagonal squared length of the current DMU, or -1 if a DMU has not been loaded ().
The minimum diagonal squared length of the current DMU, or -1 if no DMU is loaded.
Tells the type of the given interface.
The type of the given interface.
Gets the maximum geometric instance id of the DMU.
Valid geometric instance ids range from 1 to getMaximumGeometricId() included.
Please refer to Main ID Types for more information.
Returns the maximum geometric instance id if a DMU is loaded (DMULoadingSuccess,
0 else.
The maximum geometric instance id, 0 if no DMU is loaded.
Gets the maximum part instance id of the DMU.
Valid part instance ids range from 1 to getMaximumPartInstanceId() included.
Please refer to Main ID Types for more information.
Returns the maximum part instance id if a DMU is loaded (DMULoadingSuccess,
0 else.
The maximum part instance id, 0 if no DMU is loaded.
Gets a project document by its id.
Available project documents are :
Please refer to the integration manual to have more information about these documents.
It is very unlikely any developer will use these versioned documents.
Example (illustration purpose only):
const lDocs = [
{
"id": "com.3djuump:defaultsettings",
"profiles": [],
"settings": {
"backfaceculling": false,
"dynamiclowdefprofiles": {
"high": 2097152,
"standard": 1048576
},
"fieldofview": {
"degree": 25,
"orientation": "vertical"
},
"frameorientation": {
"dir": [
-1,
0,
0
],
"up": [
0,
0,
1
]
}
},
"subtype": "defaultsettings",
"tasksettings": {
"PresentationTask": {
"aspectratio": [
16,
9
]
}
},
"ts": 1591950944,
"type": "projectdocument",
"version": "8.0"
},
{
"id": "com.3djuump:indexinfo",
"internal": {
"effectivity": {
"SB": {
"nested": [
"effectivity"
],
"type": "keyword",
"values": [
"SB1",
"not_SB1"
]
},
"engine": {
"nested": [
"effectivity"
],
"type": "keyword",
"values": [
"A",
"B"
]
}
},
"metadata": {
"system": {
"type": "text",
"values": [
"Structure",
"Interior",
"Exterior",
"windows",
"Wheel base"
]
},
"test.nested.text": {
"nested": [
"metadata",
"test",
"nested"
],
"type": "text",
"values": [
"A",
"B",
"C"
]
},
"test.bool": {
"type": "boolean"
},
"test.date": {
"max": 1528114033000,
"min": 1528114033000,
"type": "date"
},
"test.date_range": {
"type": "date_range"
},
"test.double_range": {
"type": "double_range"
},
"test.int": {
"max": 1,
"min": 1,
"type": "double"
}
}
},
"seq": 814,
"subtype": "indexinfo",
"type": "indexdocument",
"version": 1
},
{
"id": "com.3djuump:scripts",
"scriptbase64": "base64 string",
"subtype": "scripts",
"taskscripts": {
"AnnotationTask": "base64 string"
},
"ts": 1598877573,
"type": "projectdocument",
"version": "8.0"
}
];
Returns the json document as a string if the given document is available in the 3djuump infinite project.
It is very unlikely any developer will use getProjectDocument("com.3djuump:scripts") as this script should be used for the 3djuump infinite native client.
The document as a string, or undefined if the document could not be found or the DMU is not loaded.
Computes the axis aligned bounding box of the given geometric instances.
This consists in the union of all the AABB of the geometric instances expressed by their
geometric instance ids.
Call this function once the DMU has been loaded (DMULoadingSuccess) with a previously created AABB.
Returns true if at least one geometric instance id inside pGeometricInstanceIds is valid. Invalid geometric instance ids
are silently discarded.
true if at least one geometric instance id inside pGeometricInstanceIds is valid and pAABBOut is therefore updated.
geometric instance ids to query.geometric instance.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 data session is connected to a proxy.
If the proxy has not yet received the DMULoadingSuccess or DMULoadingFailed signal, returns false.
Returns true if openDataSession has been called and closeDataSession has not yet been called.
true if all initialization data have been parsed.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Starts the open data session procedure.
A connection is established between the client and the 3djuump infinite proxy. Security tokens are exchanged and initialization data is retrieved from the proxy and the cache if relevant. This operation may take from a few seconds to several minutes depending on the size of the build to work with.
When data is ready, the [[DataSessionInterfaceSignal.DMULoadingSuccess] signal is sent.
If an error occurs, then the [[DataSessionInterfaceSignal.DMULoadingFailed] signal is sent.
true if the data session open procedure can be started. Returns false in case the DataSessionInterface has already been opened.
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.
Relaunches the idle timer.
For security reasons, the data session is closed when no event has been received for a long time, this duration depends on the server configuration. You may reset the idle timer at some time to avoid the user from being disconnected.
When the user will be soon disconnected, then the IdleWarningDataSession signal is sent, if the user interacts with the system or
restartIdleTimer is called, then the DataSessionReactivated signal is sent.
If no user interaction takes place, then the data session is closed, the IdleDataSession signal is sent (no DataSessionClosed signal will be sent).
You will have to call closeDataSession to clean up the resources.
Triggers the calculation of all modified FilterSolverInterfaces, FilterItemInterfaces, VisibilityContextInterfaces ConfContextInterfaces.
All the modified items are updated on the server according to their inter-dependencies.
The relevant interfaces will asynchronously trigger a "ready" signal when their calculation is over.
The DataSessionInterface is the formalization of the connection between a 3djuump infinite proxy and the client.
The DataSessionInterface is created from a connected DirectorySessionInterface and a proxy by the use of the createDataSession function. This function also allows the user to choose a specific proxy by the use of a tChooseProxyCallback.
The open data session procedure is detailed below :
The DataSession can only be opened once, when closed, there is no way to reuse this object. You will have to call again the [createDataSession](DirectorySessionInterface.html#createDataSession) function.
Idle System.
In order to save resources on the proxy, the api features an automatic data session closing mechanism when the user is not interacting with the application. The DataSessionInterface will be closed if restartIdleTimer is not called on user interactions.
It is composed of three pseudo-states :
The idle system.
Please see [DirectorySessionInterface](DirectorySessionInterface.html) for more explanations about sessions.
All metadata filters, search procedure, data retrieval procedures are created from this interface.
The DataSessionInterface, once successfully connected to a 3djuump infinite build (see DMULoadingSuccess) provides access to
Id converters and data retrieval interfaces are somewhat autonomous. They only rely on a filtering Context to be used.
However, filtering interfaces are linked together, making difficult to find the correct order to update them and when. For these reasons, and to avoid too many requests being sent to the 3djuump infinite server, the update is triggered by the DataSessionInterface that handles the dependency graph of all these items, and updates only the required interfaces with update.
All these interfaces (filtering, id conversion, data retrieval) work asynchronously : they all feature some kind of "ready" signal telling the result is available, just call addEventListener with the correct signal on the required interfaces.
These interfaces has a dispose function to get rid of them. Do not forget to call these functions to save memory and CPU usage.
The only way to create sets of
part instancesis to use a FilterSolverInterface that allows computing the result of the intersection of filtering queries with some infinite configurations (see ConfigurationInterface, ConfContextInterface) and optionally other FilterSolverInterface(s). Available configurations (created by the 3djuump infinite maintainer) are accessed through getConfigurationList, they are then "included" by id in a ConfContextInterface.DMU statistics (Axis Aligned Bounding Box (AABB) of each
geometric instance, diagonal length of eachgeometric instance, min/max of diagonal length, DMU AABB, DMU Unit, maximumgeometric instance id, maximumpart instance id) and the metadata dictionary (AttributesDictionaryInterface) are accessed through the DataSessionInterface.or asynchronously :
The DataSessionInterface now offers the same functionalities than the former [MetadataManagerInterface](MetadataManagerInterface.html).
See
DataSessionInterfaceSignal