Home > @modelo.io/api > Section

Section class

This tool can cut the scene in any directions and reveal the internal part of the scene.

Signature:

export default class Section extends Tool 

Constructors

ConstructorDescription
(constructor)(viewer)Create the tool. This tool should be created after the model is loaded or scene is constructed. Otherwise it will be mistaken about the scene size and does rendering wrong.

Methods

MethodDescription
getSectionBox()Get the current section box;
isRotatable()If this section tool is axis-aligned or not.
setEnabled(enabled)Enable/Disable the section tool.
setRotatable(enabled)By default the section is axis-aligned which means users can only cut the scene in either -x/+x/-y/+y/-z/+z, 6 directions in total. When section tool becomes rotable, the section can happen in any directions. The section plane will be aligned to the plane on which mouse hovers.
setSectionBox(bbox)Set the current section box.
setSensitivity(sensitivity)Set the sensitivity of the section tool. A large value will make the section plane move more rapidly at mouse movement.

Example

var section = new Modelo.View.Tool.Section(viewer);
viewer.addTool(section);