This is a list of the exposed 3DHOP functions with a brief description; to know more on their parameters, just click on any of them.
animateToTrackballPosition(position) | - | set a new position for the used trackball and animate the camera from the current point of view to the new setted; | |
Parameters | position | [array] : the spatial coordinates of the trackball (the number of values may varying depending on the used trackball); | |
enableLightTrackball(state) | - | enable or disable the 3D scene trackball interactive lighting control; | |
Parameters | state | [boolean] : true to enable, false to disable (light trackball is disabled by default). Enabling the interactive light trackball control also enables the scene lighting (if disabled); | |
enableMeasurementTool(state) | - | enable or disable the 3D scene interactive measurement tool; | |
Parameters | state | [boolean] : true to enable, false to disable (measurement tool is disabled by default); | |
enableOnHover(state) | - | enable or disable the visual effects (spots transparency and mouse cursor changes) related to the movement of the mouse pointer onto a mesh in the 3D scene. | |
Parameters | state | [boolean] : true to enable, false to disable (on hover effects are disabled by default). Visual effects activation could decreases performance on slower systems; | |
enablePickpointMode(state) | - | enable or disable the 3D scene interactive point picking mode; | |
Parameters | state | [boolean] : true to enable, false to disable (point picking mode is disabled by default); | |
enableSceneLighting(state) | - | enable or disable the 3D scene lighting system; | |
Parameters | state | [boolean] : true to enable, false to disable (scene lighting is enabled by default). Disabling the scene lighting also disables the interactive light trackball control (if enabled); | |
getCameraType() | return the current setup of the virtual camera (projection mode); | ||
Returns | - | [string] : the projection mode name ("perspective" or "orthographic", "perspective" is selected by default); | |
getClippingRendermode() | return the current rendering setup of the sectioning tool (sectioning planes and edges visibility state, edges size and color values); | ||
Returns | - | [array] : the 4-dimensional array containing the sectioning tool setup values: sectioning planes visibility (true if rendered, false if not), sectioning edges visibility (true if rendered, false if not), sectioning edges size value (expressed in scene space absolute value), sectioning edges color 3-dimensional array (expressed in RGB arithmetic notation, from 0 to 1, with any fractional value in between); | |
getClippingX() | return the current operating state of the sectioning plane along the X axis; | ||
Returns | - | [number] : the operating state of the sectioning plane along the X axis: 0 if disabled, 1 if enabled (splitting the 3D scene along the X axis, cutting out the clippable instances on the positive side of the intersection), and -1 also if enabled (again splitting the 3D scene along the X axis, but this time cutting out the clippable instances on the negative side of the intersection); | |
getClippingY() | return the current operating state of the sectioning plane along the Y axis; | ||
Returns | - | [number] : the operating state of the sectioning plane along the Y axis: 0 if disabled, 1 if enabled (splitting the 3D scene along the Y axis, cutting out the clippable instances on the positive side of the intersection), and -1 also if enabled (again splitting the 3D scene along the Y axis, but this time cutting out the clippable instances on the negative side of the intersection); | |
getClippingZ() | return the current operating state of the sectioning plane along the Z axis; | ||
Returns | - | [number] : the operating state of the sectioning plane along the Z axis: 0 if disabled, 1 if enabled (splitting the 3D scene along the Z axis, cutting out the clippable instances on the positive side of the intersection), and -1 also if enabled (again splitting the 3D scene along the Z axis, but this time cutting out the clippable instances on the negative side of the intersection); | |
getNexusMaxCacheSize() | return the maximum cache-size value specified in the NEXUS progressive rendering setup; | ||
Returns | - | [number] : the cache limit value (expressed in megabytes) which NEXUS should not exceed during the interactive rendering; | |
getNexusMinFps() | return the minimum frames-per-second value specified in the NEXUS progressive rendering setup; | ||
Returns | - | [number] : the fame rate value below which NEXUS should not go during the interactive rendering; | |
getNexusTargetError() | return the target geometric-error value specified in the NEXUS progressive rendering setup; | ||
Returns | - | [number] : the target value used by NEXUS as a reference for the view-dependent refinement; | |
getTrackballPosition() | return the current position of the used trackball; | ||
Returns | - | [array] : the spatial coordinates of the trackball (the number of values may vary depending on the used trackball); | |
isAnimate() | return the activation status of the 3D scene camera animation feature; | ||
Returns | - | [boolean] : true if enabled, false if disabled; | |
isAnyMeasurementEnabled() | return the activation status of the 3D scene interactive measurement tools (measurement tool and point picking mode); | ||
Returns | - | [boolean] : true if enabled, false if disabled. The function returns true if at least one of all the measurement tool is enabled; | |
isInstanceLightingEnabled(tag) | return the lighting activation status in the 3D scene of the model instance specified by tag; | ||
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the lighting command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances ("HOP_ALL is the default tag value"); | |
Returns | - | [boolean] : true if active, false if not active. If tag is "HOP_ALL" the function returns true if at least one of all the instances enables lighting; | |
isInstanceLightingEnabledByName(name) | return the lighting activation status in the 3D scene of the model instance specified by name; | ||
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the lighting command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances ("HOP_ALL is the default name value"); | |
Returns | - | [boolean] : true if active, false if not active. If tag is "HOP_ALL" the function returns true if at least one of all the instances enables lighting; | |
isInstanceVisibilityEnabled(tag) | return the visibility status in the 3D scene of the model instance specified by tag; | ||
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances ("HOP_ALL is the default tag value"); | |
Returns | - | [boolean] : true if visible, false if not visible. If tag is "HOP_ALL" the function returns true if at least one of all the instances is visible; | |
isInstanceVisibilityEnabledByName(name) | return the visibility status in the 3D scene of the model instance specified by name; | ||
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances ("HOP_ALL is the default name value"); | |
Returns | - | [boolean] : true if visible, false if not visible. If name is "HOP_ALL" the function returns true if at least one of all the instances is visible; | |
isInstanceSolidColorEnabled(tag) | return the solid color usage status in the 3D scene of the model instance specified by tag; | ||
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the solid color command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances ("HOP_ALL is the default tag value"); | |
Returns | - | [boolean] : true if active, false if not active. If tag is "HOP_ALL" the function returns true if at least one of all the instances enables solid colors; | |
isInstanceSolidColorEnabledByName(name) | return the solid color usage status in the 3D scene of the model instance specified by name; | ||
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the solid color command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances ("HOP_ALL is the default name value"); | |
Returns | - | [boolean] : true if active, false if not active. If tag is "HOP_ALL" the function returns true if at least one of all the instances enables solid colors; | |
isInstanceTransparencyEnabled(tag) | return the transparency status in the 3D scene of the model instance specified by tag; | ||
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the transparency command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances ("HOP_ALL is the default tag value"); | |
Returns | - | [boolean] : true if active, false if not active. If tag is "HOP_ALL" the function returns true if at least one of all the instances enables transparency; | |
isInstanceTransparencyEnabledByName(name) | return the transparency status in the 3D scene of the model instance specified by name; | ||
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the transparency command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances ("HOP_ALL is the default name value"); | |
Returns | - | [boolean] : true if active, false if not active. If tag is "HOP_ALL" the function returns true if at least one of all the instances enables transparency; | |
isLightTrackballEnabled() | return the activation status of the 3D scene trackball interactive lighting control; | ||
Returns | - | [boolean] : true if enabled, false if disabled; | |
isMeasurementToolEnabled() | return the activation status of the 3D scene interactive measurement tool; | ||
Returns | - | [boolean] : true if enabled, false if disabled; | |
isPickpointModeEnabled() | return the activation status of the 3D scene interactive point picking mode; | ||
Returns | - | [boolean] : true if enabled, false if disabled; | |
isSceneLightingEnabled() | return the activation status of the 3D scene lighting system; | ||
Returns | - | [boolean] : true if enabled, false if disabled; | |
isSpotVisibilityEnabled(tag) | return the visibility status in the 3D scene of the hot spot instance specified by tag; | ||
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "spots" (in "setScene") that refers the instance of the hot spot on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the hot spots instances ("HOP_ALL is the default tag value"); | |
Returns | - | [boolean] : true if visible, false if not visible. If tag is "HOP_ALL" the function returns true if at least one of all the instances is visible; | |
isSpotVisibilityEnabledByName(name) | return the visibility status in the 3D scene of the hot spot instance specified by name; | ||
Parameters | name | [string] : the instance name specified in "spots" (in "setScene") that refers the instance of the hot spot on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the hot spots instances ("HOP_ALL is the default name value"); | |
Returns | - | [boolean] : true if visible, false if not visible. If name is "HOP_ALL" the function returns true if at least one of all the instances is visible; | |
isOnHoverEnabled() | return the activation status of the visual effects (spots transparency and mouse cursor changes) related to the movement of the mouse pointer onto a mesh in the 3D scene; | ||
Returns | - | [boolean] : true if enabled, false if disabled; | |
repaint() | redraw the 3D scene; | ||
resetClippingXYZ() | - | reset both the position and the operating state of the sectioning planes along the X, Y and Z axes to the initial setting; | |
resetTrackball() | - | reset both the position and light control trackballs to the initial setting; | |
rotateLight(x, y) | - | rotate the 3D scene light trackball; | |
Parameters | x | [number] : the amount of displacement along the x-axis (accepts values ranging from -0.5 to 0.5); | |
y | [number] : the amount of displacement along the y-axis (accepts values ranging from -0.5 to 0.5); | ||
saveScreenshot() | - | save a snapshot of 3DHOP with an alpha transparent background; | |
setCameraPerspective() | - | set the camera type to perspective projection mode; | |
setCameraOrthographic() | - | set the camera type to orthographic projection mode; | |
setCenterModeFirst() | - | set the virtual scene center in the barycenter of its first declared model instance; | |
setCenterModeScene() | - | set the virtual scene center in the barycenter of all model instances which compose the scene; | |
setCenterModeSpecific(name) | - | set the virtual scene center in the barycenter of the specified model instance; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the scene will be centered; | |
setCenterModeExplicit(point) | - | set the virtual scene center in the specified spatial coordinates; | |
Parameters | point | [array] : the 3-dimensional array containing the point spatial coordinates in vector notation (expressed in scene space absolute value); | |
setClippingPointXYZ(x, y, z) | - | set the intersection points of the sectioning planes along the X, Y and Z axes (expressed in normalized value); | |
Parameters | x | [number] : the intersection point between the X sectioning plane and the X axis (accepts values ranging to 0 and 1); | |
y | [number] : the intersection point between the Y sectioning plane and the Y axis (accepts values ranging from 0 to 1); | ||
z | [number] : the intersection point between the Z sectioning plane and the Z axis (accepts values ranging from 0 to 1); | ||
setClippingPointXYZabs(x, y, z) | - | set the intersection points of the sectioning planes along the X, Y and Z axes (expressed in scene space absolute value); | |
Parameters | x | [number] : the intersection point between the X sectioning plane and the X axis (accepts values expressed in scene space absolute value); | |
y | [number] : the intersection point between the Y sectioning plane and the Y axis (accepts values expressed in scene space absolute value); | ||
z | [number] : the intersection point between the Z sectioning plane and the Z axis (accepts values expressed in scene space absolute value); | ||
setClippingPointX(x) | - | set the intersection point of the sectioning plane along the X, axis (expressed in normalized value); | |
Parameters | x | [number] : the intersection point between the X sectioning plane and the X axis (accepts values ranging to 0 and 1); | |
setClippingPointXabs(x) | - | set the intersection point of the sectioning plane along the X axis (expressed in scene space absolute value); | |
Parameters | x | [number] : the intersection point between the X sectioning plane and the X axis (accepts values expressed in scene space absolute value); | |
setClippingPointY(y) | - | set the intersection point of the sectioning plane along the Y axis (expressed in normalized value); | |
Parameters | y | [number] : the intersection point between the Y sectioning plane and the Y axis (accepts values ranging from 0 to 1); | |
setClippingPointYabs(y) | - | set the intersection point of the sectioning plane along the Y axis (expressed in scene space absolute value); | |
Parameters | y | [number] : the intersection point between the Y sectioning plane and the Y axis (accepts values expressed in scene space absolute value); | |
setClippingPointZ(z) | - | set the intersection point of the sectioning plane along the Z axis (expressed in normalized value); | |
Parameters | z | [number] : the intersection point between the Z sectioning plane and the Z axis (accepts values ranging from 0 to 1); | |
setClippingPointZabs(z) | - | set the intersection point of the sectioning plane along the Z axis (expressed in scene space absolute value); | |
Parameters | z | [number] : the intersection point between the Z sectioning plane and the Z axis (accepts values expressed in scene space absolute value); | |
setClippingRendermode(state, state, *size, *color) | - | customize the rendering setup of the sectioning tool (sectioning planes and edges visibility state, and optionally edges size and color values); | |
Parameters | state | [boolean] : true to render the sectioning planes (if any), false to not render (true by default); | |
state | [boolean] : true to render the sectioning edges (if any), false to not render (false by default); | ||
size | [number] : the size value (expressed in scene space absolute value) of the sectioning edges (if rendered). Accepts values greater than 0.0. Optional parameter (default sectioning edges size is 0.5); | ||
color | [array] : the 3-dimensional array containing color values of the sectioning edges (if rendered). Accepts values expressed in RGB arithmetic notation (from 0 to 1, with any fractional value in between). Optional parameter (default sectioning edges color is [0.0, 1.0, 1.0]); | ||
setClippingXYZ(state, state, state) | - | set the operating state of the sectioning planes along the X, Y and Z axes; | |
Parameters | state | [number] : the operating state of the X axis sectioning plane. Accepts three values: 0 to disable the related sectioning plane, 1 to enable it (splitting the 3D scene along the X axis, cutting out the clippable instances on the positive side of the intersection), and -1 also to enable it (again splitting the 3D scene along the X axis, but this time cutting out the clippable instances on the negative side of the intersection); | |
state | [number] : the operating state of the Y axis sectioning plane. Accepts three values: 0 to disable the related sectioning plane, 1 to enable it (splitting the 3D scene along the Y axis, cutting out the clippable instances on the positive side of the intersection), and -1 also to enable it (again splitting the 3D scene along the Y axis, but this time cutting out the clippable instances on the negative side of the intersection); | ||
state | [number] : the operating state of the Z axis sectioning plane. Accepts three values: 0 to disable the related sectioning plane, 1 to enable it (splitting the 3D scene along the Z axis, cutting out the clippable instances on the positive side of the intersection), and -1 also to enable it (again splitting the 3D scene along the Z axis, but this time cutting out the clippable instances on the negative side of the intersection); | ||
setClippingX(state) | - | set the operating state of the sectioning plane along the X axis; | |
Parameters | state | [number] : the operating state of the X axis sectioning plane. Accepts three values: 0 to disable the related sectioning plane, 1 to enable it (splitting the 3D scene along the X axis, cutting out the clippable instances on the positive side of the intersection), and -1 also to enable it (again splitting the 3D scene along the X axis, but this time cutting out the clippable instances on the negative side of the intersection); | |
setClippingY(state) | - | set the operating state of the sectioning plane along the Y axis; | |
Parameters | state | [number] : the operating state of the Y axis sectioning plane. Accepts three values: 0 to disable the related sectioning plane, 1 to enable it (splitting the 3D scene along the Y axis, cutting out the clippable instances on the positive side of the intersection), and -1 also to enable it (again splitting the 3D scene along the Y axis, but this time cutting out the clippable instances on the negative side of the intersection); | |
setClippingZ(state) | - | set the operating state of the sectioning plane along the Z axis; | |
Parameters | state | [number] : the operating state of the Z axis sectioning plane. Accepts three values: 0 to disable the related sectioning plane, 1 to enable it (splitting the 3D scene along the Z axis, cutting out the clippable instances on the positive side of the intersection), and -1 also to enable it (again splitting the 3D scene along the Z axis, but this time cutting out the clippable instances on the negative side of the intersection); | |
setInstanceLighting(tag, state, redraw) | - | set the lighting for the model instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the lighting command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
state | [boolean] : true to active the instance lighting, false to not active; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
setInstanceLightingByName(name, state, redraw) | - | set the lighting for the model instance specified by name; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the lighting command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
state | [boolean] : true to active the instance lighting, false to not active; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
setInstanceSolidColor(tag, state, redraw, *color) | - | set a solid color for the model instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the color command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
state | [boolean] : true to active the instance solid color, false to not active; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
color | [array] : the 3-dimensional array containing color values expressed in RGB arithmetic notation (from 0 to 1, with any fractional value in between). Optional parameter (default solid color is [1.0, 1.0, 1.0]); | ||
setInstanceSolidColorByName(name, state, redraw, *color) | - | set a solid color for the model instance specified by name; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the color command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
state | [boolean] : true to active the instance solid color, false to not active; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
color | [array] : the 3-dimensional array containing color values expressed in RGB arithmetic notation (from 0 to 1, with any fractional value in between). Optional parameter (default solid color is [1.0, 1.0, 1.0]); | ||
setInstanceTransparency(tag, state, redraw, *alpha) | - | set the transparency of the model instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the transparency command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
state | [boolean] : true to active the instance transparency, false to not active; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
alpha | [number] : the alpha transparency value, varying from 0 (max transparency) to 1 (min transparency), with any fractional value in between. Optional parameter (default alpha value is 0.5); | ||
setInstanceTransparencyByName(name, state, redraw, *alpha) | - | set the transparency of the model instance specified by name; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the transparency command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
state | [boolean] : true to active the instance transparency, false to not active; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
alpha | [number] : the alpha transparency value, varying from 0 (max transparency) to 1 (min transparency), with any fractional value in between. Optional parameter (default alpha value is 0.5); | ||
setInstanceVisibility(tag, state, redraw) | - | set the visibility in the 3D scene of the model instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
state | [boolean] : true to make the instance visible, false to not make; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
setInstanceVisibilityByName(name, state, redraw) | - | set the visibility in the 3D scene of the model instance specified by name; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
state | [boolean] : true to make the instance visible, false to not make; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
setNexusMaxCacheSize(size) | set the maximum cache-size value for the NEXUS progressive rendering; | ||
Parameters | size | [number] : the cache limit value (expressed in megabytes) which NEXUS should not exceed during the interactive rendering (default is 512.0). Big size values could result the browser to freeze. Accepts values greater than 0.0; | |
setNexusMinFps(fps) | set the minimum frames-per-second value for the NEXUS progressive rendering; | ||
Parameters | fps | [number] : the fame rate value below which NEXUS should not go during the interactive rendering (default is 15.0). Big fps values could result in a lower rendering quality for the multiresolution 3D models. Accepts values greater than 0.0; | |
setNexusTargetError(error) | set the target geometric-error value for the NEXUS progressive rendering; | ||
Parameters | error | [number] : the target value used by NEXUS as a reference for the view-dependent refinement (default is 1.0). Big error values result in a lower rendering quality of the multiresolution 3D models. Accepts values greater than 0.0; | |
setRadiusModeFirst() | - | scale the virtual scene to fit in the viewer the first declared model instance; | |
setRadiusModeScene() | - | scale the virtual scene to fit in the viewer all model instances which compose the scene; | |
setRadiusModeSpecific(name) | - | scale the virtual scene to fit in the viewer the specified model instance; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the scene will be scaled; | |
setRadiusModeExplicit(size) | - | scale the virtual scene to fit in the viewer an object with the specified size; | |
Parameters | size | [number] : the size value (expressed in scene space absolute value) on which the scene will be scaled. Accepts values greater than 0.0; | |
setScene(options) | - | 3DHOP main method, set the 3D scene; | |
Parameters | options | [multiple values] : all the text fields that define the virtual scene (meshes, modelInstances, spots, trackball, space). Check the how to section for more details; | |
setSpotVisibility(tag, state, redraw) | - | set the visibility in the 3D scene of the hot spot instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "spots" (in "setScene") that refers the instance of the hot spot on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the hot spots instances; | |
state | [boolean] : true to make the instance visible, false to not make; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
setSpotVisibilityByName(name, state, redraw) | - | set the visibility in the 3D scene of the hot spot instance specified by name; | |
Parameters | name | [string] : the instance name specified in "spots" (in "setScene") that refers the instance of the hot spot on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the hot spots instances; | |
state | [boolean] : true to make the instance visible, false to not make; | ||
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
setTrackballPosition(position) | - | set a new position for the used trackball and redraw the 3D scene with the camera in the new setted point; | |
Parameters | position | [array] : the spatial coordinates of the trackball (the number of values may varying depending on the used trackball); | |
supportsWebGL() | check if the system supports the WebGL API; | ||
Returns | - | [boolean] : true if supported, false if not supported; | |
toggleCameraType() | - | toggle the camera type between perspective and orthographic projection modes; | |
toggleDebugMode() | - | toggle 3DHOP between normal mode and debug mode; | |
toggleInstanceLighting(tag, redraw) | - | toggle the lighting in the 3D scene of the model instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the lighting command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleInstanceLightingByName(name, redraw) | - | toggle the lighting in the 3D scene of the model instance specified by name; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the lighting command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleInstanceSolidColor(tag, redraw) | - | toggle the solid color usage for the model instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the color command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleInstanceSolidColorByName(name, redraw) | - | toggle the solid color usage for the model instance specified by name; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the color command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleInstanceTransparency(tag, redraw) | - | toggle the transparency usage for the model instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the transparency command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleInstanceTransparencyByName(name, redraw) | - | toggle the transparency usage for the model instance specified by name; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the transparency command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleInstanceVisibility(tag, redraw) | - | toggle the visibility in the 3D scene of the model instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "modelInstance" (in "setScene") that refers the instance of the model on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleInstanceVisibilityByName(name, redraw) | - | toggle the visibility in the 3D scene of the model instance specified by name; | |
Parameters | name | [string] : the instance name specified in "modelInstance" (in "setScene") that refers the instance of the model on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the models instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleSpotVisibility(tag, redraw) | - | toggle the visibility in the 3D scene of the hot spot instance specified by tag; | |
Parameters | tag | [string] : the tag keyword specified in the "tags" field of "spots" (in "setScene") that refers the instance of the hot spot on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the hot spots instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
toggleSpotVisibilityByName(name, redraw) | - | toggle the visibility in the 3D scene of the hot spot instance specified by name; | |
Parameters | tag | [string] : the name instance specified in "spots" (in "setScene") that refers the instance of the hot spot on which the visibility command acts. Accepts the constant value "HOP_ALL" too (without quotes) that refers all the hot spots instances; | |
redraw | [boolean] : true to redraw the 3D scene, false to not redraw; | ||
version() | check the 3DHOP version; | ||
Returns | - | [constant] : the constant value that refers to the framework version number (expressed in "version major" dot "version minor" dot "version revision" format); | |
zoomIn() | - | zoom the camera one step into the 3D scene; | |
zoomOut() | - | zoom the camera one step out of the 3D scene; |
_onEndMeasurement(measure, *point, *point) | - | bind an event handler to be fired when a measurement action ends; | |
Parameters | measure | [number] : the size of the last measurement performed (expressed in scene space absolute value); | |
point | [array] : the 3-dimensional array containing the spatial coordinates of the first measure point picked (expressed in scene space absolute value). Optional parameter; | ||
point | [array] : the 3-dimensional array containing the spatial coordinates of the last measure point picked (expressed in scene space absolute value). Optional parameter; | ||
_onEndPickingPoint(point) | - | bind an event handler to be fired when a point picking action ends; | |
Parameters | point | [array] : the 3-dimensional array containing the spatial coordinates of the last point picked (expressed in scene space absolute value); | |
_onEnterInstance(id) | - | bind an event handler to be fired when the mouse enters an instance; | |
Parameters | id | [string] : the instance name specified in the "modelInstance" field of "setScene"; | |
_onEnterSpot(id) | - | bind an event handler to be fired when the mouse enters a spot; | |
Parameters | id | [string] : the spot name specified in the "spots" field of "setScene"; | |
_onLeaveInstance(id) | - | bind an event handler to be fired when the mouse leaves an instance; | |
Parameters | id | [string] : the instance name specified in the "modelInstance" field of "setScene"; | |
_onLeaveSpot(id) | - | bind an event handler to be fired when the mouse leaves a spot; | |
Parameters | id | [string] : the spot name specified in the "spots" field of "setScene"; | |
_onPickedInstance(id) | - | bind an event handler to be fired when the mouse clicks an instance; | |
Parameters | id | [string] : the instance name specified in the "modelInstance" field of "setScene"; | |
_onPickedSpot(id) | - | bind an event handler to be fired when the mouse clicks a spot; | |
Parameters | id | [string] : the spot name specified in the "spots" field of "setScene"; |
cameraSwitch() | - | switch between on/off toolbar related camera projection button icon; | |
colorSwitch() | - | switch between on/off toolbar related color mode button icon; | |
fullscreenSwitch() | - | switch between 3DHOP element fullscreen and normal mode, simultaneously updating the toolbar related button icon; | |
helpSwitch() | - | switch between on/off toolbar related help button icon; | |
hotspotSwitch() | - | switch between on/off toolbar related hotspot button icon; | |
lightSwitch() | - | switch between on/off toolbar related light control button icon. Turning on the light control button icon also turns on the lighting button icon (if present and off); | |
lightingSwitch() | - | switch between on/off toolbar related lighting button icon. Turning off the lighting button icon also turns off the light control button icon (if present and on); | |
measureSwitch() | - | switch between on/off toolbar related measurement tool button icon; | |
- | switch between on/off toolbar related measurement tool button icon. This functionality is DEPRECATED, use "measureSwitch()" instead; | ||
- | move the 3DHOP measure output box around the screen. This functionality is DEPRECATED, use "moveMeasurementbox(left, top)" instead; | ||
Parameters | right | [number] : measure box right space in px (relative to 3DHOP container, default value is 10). Accepts the CSS positioning syntax too (enclosed in quotes); | |
top | [number] : measure box top space in px (relative to 3DHOP container, default value is 10). Accepts the CSS positioning syntax too (enclosed in quotes); | ||
moveMeasurementbox(left, top) | - | move the 3DHOP measure output box around the screen; | |
Parameters | left | [number] : measure box left space in px (relative to 3DHOP container, due to anchorage default value is related to toolbar position). Accepts the CSS positioning syntax too (enclosed in quotes); | |
top | [number] : measure box top space in px (relative to 3DHOP container, due to anchorage default value is related to toolbar position). Accepts the CSS positioning syntax too (enclosed in quotes); | ||
movePickpointbox(left, top) | - | move the 3DHOP point picking output box around the screen; | |
Parameters | left | [number] : point picking box left space in px (relative to 3DHOP container, due to anchorage default value is related to toolbar position). Accepts the CSS positioning syntax too (enclosed in quotes); | |
top | [number] : point picking box top space in px (relative to 3DHOP container, due to anchorage default value is related to toolbar position). Accepts the CSS positioning syntax too (enclosed in quotes); | ||
moveSectionsbox(left, top) | - | move the 3DHOP planes section output box around the screen; | |
Parameters | left | [number] : planes section output box left space in px (relative to 3DHOP container, due to anchorage default value is related to toolbar position). Accepts the CSS positioning syntax too (enclosed in quotes); | |
top | [number] : planes section output box top space in px (relative to 3DHOP container, due to anchorage default value is related to toolbar position). Accepts the CSS positioning syntax too (enclosed in quotes); | ||
moveToolbar(left, top) | - | move the 3DHOP toolbar around the screen; | |
Parameters | left | [number] : toolbar left space in px (relative to 3DHOP container, default value is 10). Accepts the CSS positioning syntax too (enclosed in quotes); | |
top | [number] : toolbar top space in px (relative to 3DHOP container, default value is 10). Accepts the CSS positioning syntax too (enclosed in quotes); | ||
pickpointSwitch() | - | switch between on/off toolbar related point picking tool button icon; | |
resizeCanvas(width, height) | - | change the 3DHOP sizes; | |
Parameters | width | [number] : 3DHOP width value in px (default is full browser). Accepts the CSS width syntax too (enclosed in quotes); | |
height | [number] : 3DHOP height value in px (default is full browser). Accepts the CSS height syntax too (enclosed in quotes); | ||
sectiontoolInit() | - | initialize the components in the planes section tool output box; | |
sectiontoolReset() | - | reset the components in the planes section tool output box; | |
sectiontoolSwitch() | - | switch between on/off toolbar related planes section tool button icon; |