Vmodel

  • LXiSELECTION_UNSELECTED

  • LXiSELECTION_SELECTED

  • LXiSELECTION_ROLLOVER

  • LXiMOTION_1D

  • LXiMOTION_ANGULAR

  • LXiMOTION_RADIAL

  • LXiVHANDLE_BASE_PART

  • LXmVHANDLE_CONSTRAINT

  • LXfVHANDLE_CON_LINEAR

  • LXfVHANDLE_CON_PLANAR

  • LXmVHANDLE_DRAW_SHAPE

  • LXfVHANDLE_DRAW_BOX

  • LXfVHANDLE_DRAW_LINE

  • LXfVHANDLE_DRAW_POINT

  • LXfVHANDLE_DRAW_PLUS

  • LXfVHANDLE_DRAW_X

  • LXxVHANDLE_DRAW_SHAPE

  • LXmVHANDLE_DRAW_AXIS

  • LXxVHANDLE_DRAW_AXIS

  • LXfVHANDLE_VAL_VECTOR

  • LXfVHANDLE_VAL_2D

  • LXfVHANDLE_RESERVED

ILxViewItem3D

class ILxViewItem3D

A 3D view item plug-in defines the appearance of an entity in abstract 3D space.

Public Functions

LxResult Draw(LXtObjectID self, LXtObjectID chanRead, LXtObjectID strokeDraw, int selectionFlags, const LXtVector itemColor)
LxResult DrawBackground(LXtObjectID self, LXtObjectID chanRead, LXtObjectID strokeDraw, const LXtVector itemColor)
LxResult WorldSpace(LXtObjectID self)
LxResult HandleCount(LXtObjectID self, int *count)
LxResult HandleMotion(LXtObjectID self, int handleIndex, int *handleFlags, double *min, double *max, LXtVector plane, LXtVector offset)
LxResult HandleChannel(LXtObjectID self, int handleIndex, int *chanIndex)
LxResult HandleValueToPosition(LXtObjectID self, int handleIndex, const double *chanValue, LXtVector position)
LxResult HandlePositionToValue(LXtObjectID self, int handleIndex, const LXtVector position, double *chanValue)
LxResult Test(LXtObjectID self, LXtObjectID chanRead, LXtObjectID strokeDraw, int selectionFlags, const LXtVector itemColor)

“Test” is called to hit test the item. If “Test” is not implemented, “Draw” method is called for hit testing.

ILxViewItem3D1

class ILxViewItem3D1

This interface was retired in modo 701, and was replaced with an updated one that adds a few more methods.

Public Functions

LxResult Draw(LXtObjectID self, LXtObjectID chanRead, LXtObjectID strokeDraw, int selectionFlags, LXtVector itemColor)
LxResult DrawBackground(LXtObjectID self, LXtObjectID chanRead, LXtObjectID strokeDraw, LXtVector itemColor)
LxResult WorldSpace(LXtObjectID self)
LxResult HandleCount(LXtObjectID self, int *count)
LxResult HandleMotion(LXtObjectID self, int handleIndex, int *handleFlags, double *min, double *max, LXtVector plane, LXtVector offset)
LxResult HandleChannel(LXtObjectID self, int handleIndex, int *chanIndex)
LxResult HandleValueToPosition(LXtObjectID self, int handleIndex, double *chanValue, LXtVector position)
LxResult HandlePositionToValue(LXtObjectID self, int handleIndex, LXtVector position, double *chanValue)

ILxVirtualModel

class ILxVirtualModel

Public Functions

unsigned Flags(LXtObjectID self)

The flags method determines various interactive behaviors for the virtual model. These values should be a combination of LXfTMOD flags. This value should not change.

void Draw(LXtObjectID self, LXtObjectID stroke)

Virtual Models can draw into graphic viewports with the Draw and Test methods. Draw is called to update the stroked model in the view, and Test is called when performing mouse rollover to define regions for hit testing.

void Test(LXtObjectID self, LXtObjectID stroke)
void Track(LXtObjectID self, int part)

This function allows clients to get the part number the mouse is over. If the mouse is not over a part, the part number is -1.

void Down(LXtObjectID self, LXtObjectID vts)

Virtual Models can handle mouse input using the Down, Move and Up methods.

  • Down This function is called on an initial mouse down.

  • Move This function is called repeatedly with updated position information that tracks the mouse movement during raw input event processing.

  • Up This function is called at the end of a user interaction, signified by a release of the mouse button.

void Move(LXtObjectID self, LXtObjectID vts)
void Up(LXtObjectID self, LXtObjectID vts)
const char *Tooltip(LXtObjectID self, int part)

This function allows clients to return a tooltip for the given part number.

ILxToolModel

class ILxToolModel

When tools are selected, they can affect the way that input happens in the 3D views. Tool object present an ILxToolModel interface which allows them to participate in mouse input and direct manipulation. Internal tools implemented as ToolObj’s can also have model interfaces attached.

Public Functions

unsigned Flags(LXtObjectID self)

A tool’s flags encode various interactive behaviors of the tool. This value should not change.

void Draw(LXtObjectID self, LXtObjectID vts, LXtObjectID stroke, int flags)

Tools can draw themselves in graphic viewports with the Draw() and Test() methods. Draw() is called to update the appearance of the tool (as a stroked model in the view). Test() is called when performing hit testing on the tool, and can be substantially the same as the draw method as long as part ID’s are set for the tool’s handles.

void Test(LXtObjectID self, LXtObjectID vts, LXtObjectID stroke, int flags)
void Filter(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
void Initialize(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust, unsigned int flags)

The Initialize() method is called to set up tool attributes when they need to integrate into an active pipeline, typically when the tool activates due to a mouse-down event. The tool needs to compute default state based on the flags. DIRECT means that the tool itself is the focus of user action, and EVENT means that this is the result of a viewport event. AGAIN is set only if the tool sets the INITAGAIN bit in its flags, in which case it means that the tool has user-set values but is being initialized again. BRUSH means that the tool is used in conjunction with a brush tool, which maybe change the way the tool is intialized. PROCEDURAL bit is set when the Initialize() method is called for the procedural tool operator.

LxResult Down(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)

The ILxToolModel directly tracks mouse movement via Down, Move, and Up event callbacks, as well as tracking the part number and hit location of mouse events on handles. The parts are prioritized based on the part number (available in the tool vector), with the highest part taking the hit.

void Move(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
void Up(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
const char *Haul(LXtObjectID self, unsigned int index)

Some attributes can have automatic hauling behavior. Tools may expose up to 2 attributes for automatic hauling: the first attribute (index = 0) is displayed with horizontal graduations, the seconde one (index = 1) is displayed vertically. The ‘haul’ method returns the attribute name given its index.

const char *Help(LXtObjectID self, LXtObjectID vts)

Help or tips messages can be displayed during tool interaction using the ‘Help’ method. This function gets the tool vector and returns a pointer to a string.

LxResult Enable(LXtObjectID self, LXtObjectID msg)

Tell whether tool can be set. This method retuns LXe_DISABLED if the tool is not ready to run and it also set the reason to the message. Otherwise it returns LXe_OK.

LxResult Drop(LXtObjectID self)

Called when the tool is dropped.

LxResult Track(LXtObjectID self, LXtObjectID vts, unsigned int eventType)
LxResult TrackFlags(LXtObjectID self, unsigned int *flags)
LxResult Post(LXtObjectID self, LXtObjectID vts)
LxResult TestType(LXtObjectID self, LXtID4 type)

Test if the tool can be operated on the given viewport type. This meshod should return LXe_FALSE if the tool does not work on the viewport type. Otherwise it returns LXe_TRUE.

const char *Tooltip(LXtObjectID self, LXtObjectID vts, int part)

This function allows clients to return a tooltip for the given tool part number.


LXfTMOD_MODELSPACE

The flags contain masks for drawing and testing in different view coordinates. 3D space is the normal model or world coordinate system, and PIXEL is the pixel space for the GL viewport. Tools with both flags set will be drawn twice in each viewport. The MODELSPACE bit indicates that the tool will expect the draw and test functions to operate in raw Model space, rather than the View space, which is the apparent space in which the user is working. View space is just Model space transformed by the ‘Construction Plane’. Since users will expect tools to respect the altered coordinate system they have chosen, it is rare that a tool would want to forgo this transformation. For tools that will work directly with mesh coordinates, however, this flag can be useful. The Model Space to View Space transform is available in the Xfrm packet of the tool vector.

  • LXfTMOD_DRAW_3D

  • LXfTMOD_DRAW_PIXEL


LXfTMOD_I0_INPUT

The flags also contain masks for the different input behaviors. I0 is the primary input and I1 is the secondary input (mapped to left and right buttons), the tool can ask for input on either of these or indicate that it wants automatic attribute hauling. The other two flags can be used to trigger certain input changes, for brush-type and curve-type tools.

  • LXfTMOD_I0_ATTRHAUL

  • LXfTMOD_I1_INPUT

  • LXfTMOD_I1_ATTRHAUL

  • LXfTMOD_I_CURVE

  • LXfTMOD_I_BRUSH

  • LXfTMOD_I_GENERAL


LXfTMOD_BRUSHRESET

Finally, the flags contain masks to identify the tool type which is then mapped to an input pattern. For the input pattern, we can derive the falloff information from the vector type, so we just need to know the reset and brush behaviors.

  • BRUSHRESET This is used for tools that want to autoreset for each brush stroke (like the push tool

  • NEEDHAUL Tools without handles or that require hauling input should say so with the NEEDSHAUL flag. This will prevent hauling from being disabled by a tool preset flag.

  • ROLLOVERS Set if the handles should draw highlighted when the mouse moves over them.

  • AUTORESET Apaprently distinguishes between transform and general tools…

  • HANDLERESET This flag causes the tool to be restarted each time a handle is clicked.

  • DRAW_INACTIVE When set, the draw function is called even if the tool is not active. Similarly, clicking on the drawn handle of such an inactive tool will activate the tool and start dragging the handle.

  • I0_NOSELECT

  • I1_NOSELECT Don’t select when an INPUT or ATTRHAUL event is received, effectively blocking “select through” (I think).

  • AUTOACTIVATE

  • SELECTTRHOUGH These set the initial tool modes, which can then be overridden from tool presets.

  • NOCLONE This should be set when clone is reset.

  • NODELTA When set, the mouse pointer remains visible and the tool does not operate in delta mode, meaning that it is constrainted to the bounds of the screen. Useful for 2D operations that should track the true mouse position, as opposed to 3D operations where edge of the screen would be in the way.

  • INDIRECT The tool is always activated indirectly as a result of downstream tool activation.

  • LXfTMOD_INITAGAIN

  • LXfTMOD_NEEDSHAUL

  • LXfTMOD_ROLLOVERS

  • LXfTMOD_AUTORESET

  • LXfTMOD_HANDLERESET

  • LXfTMOD_DRAW_INACTIVE

  • LXfTMOD_I0_NOSELECT

  • LXfTMOD_I1_NOSELECT

  • LXfTMOD_AUTOACTIVATE

  • LXfTMOD_SELECTTHROUGH

  • LXfTMOD_NOCLONE

  • LXfTMOD_NODELTA

  • LXfTMOD_INDIRECT

  • LXfINITIALIZE_DIRECT

  • LXfINITIALIZE_EVENT

  • LXfINITIALIZE_AGAIN

  • LXfINITIALIZE_BRUSH

  • LXfINITIALIZE_PROCEDURAL


LXfTRACK_ENTER

Tool can also have a tracking function associated with them. The function will be called during mouse movement over a viewport with one of the event types below.

  • LXfTRACK_MOVE

  • LXfTRACK_EXIT


LXfTRACK_LAZY

Tool can specify how to select elements for selection rollover. LAZY allows the tool lazy selection regardress the current lazy selection mode. VERX, EDGE and POLY are components to be pre highlighting. If nothing is specified, the default selection settings will be used. LOOP1 and LOOP2 works with EDGE mask to draw edge loop. RAYCAST always uses the hit testing regardress the view shading mode.

  • LXfTRACK_VERX

  • LXfTRACK_EDGE

  • LXfTRACK_POLY

  • LXfTRACK_LOOP1

  • LXfTRACK_LOOP2

  • LXfTRACK_RAYCAST

  • LXfTRACK_BK_RAYCAST

  • LXfTRACK_ACTIVE

  • LXfTRACK_INACTIVE

ILxToolModel3

class ILxToolModel3

This interface was retired in modo 904, and was replaced with an updated one that adds “adjust” argument to Filter method.

Public Functions

unsigned Flags(LXtObjectID self)
void Draw(LXtObjectID self, LXtObjectID vts, LXtObjectID stroke, int flags)
void Test(LXtObjectID self, LXtObjectID vts, LXtObjectID stroke, int flags)
void Filter(LXtObjectID self, LXtObjectID vts)
void Initialize(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust, unsigned int flags)
LxResult Down(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
void Move(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
void Up(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
const char *Haul(LXtObjectID self, unsigned int index)
const char *Help(LXtObjectID self, LXtObjectID vts)
LxResult Enable(LXtObjectID self, LXtObjectID msg)
LxResult Drop(LXtObjectID self)
LxResult Track(LXtObjectID self, LXtObjectID vts, unsigned int eventType)
LxResult TrackFlags(LXtObjectID self, unsigned int *flags)
LxResult Post(LXtObjectID self, LXtObjectID vts)
LxResult TestType(LXtObjectID self, LXtID4 type)
const char *Tooltip(LXtObjectID self, LXtObjectID vts, int part)

ILxToolModel2

class ILxToolModel2

This interface was retired in modo 901, and was replaced with an updated one that adds a method for tooltips.

Public Functions

unsigned Flags(LXtObjectID self)
void Draw(LXtObjectID self, LXtObjectID vts, LXtObjectID stroke, int flags)
void Test(LXtObjectID self, LXtObjectID vts, LXtObjectID stroke, int flags)
void Filter(LXtObjectID self, LXtObjectID vts)
void Initialize(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust, unsigned int flags)
LxResult Down(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
void Move(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
void Up(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
const char *Haul(LXtObjectID self, unsigned int index)
const char *Help(LXtObjectID self, LXtObjectID vts)
LxResult Enable(LXtObjectID self, LXtObjectID msg)
LxResult Drop(LXtObjectID self)
LxResult Track(LXtObjectID self, LXtObjectID vts, unsigned int eventType)
LxResult TrackFlags(LXtObjectID self, unsigned int *flags)
LxResult Post(LXtObjectID self, LXtObjectID vts)
LxResult TestType(LXtObjectID self, LXtID4 type)

ILxToolModel1

class ILxToolModel1

This interface was retired in modo 701, and was replaced with an updated one that adds a few more methods.

Public Functions

unsigned Flags(LXtObjectID self)
void Draw(LXtObjectID self, LXtObjectID vts, LXtObjectID stroke, int flags)
void Test(LXtObjectID self, LXtObjectID vts, LXtObjectID stroke, int flags)
void Filter(LXtObjectID self, LXtObjectID vts)
void Initialize(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust, unsigned int flags)
LxResult Down(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
void Move(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
void Up(LXtObjectID self, LXtObjectID vts, LXtObjectID adjust)
const char *Haul(LXtObjectID self, unsigned int index)
const char *Help(LXtObjectID self, LXtObjectID vts)
LxResult Enable(LXtObjectID self, LXtObjectID msg)
LxResult Drop(LXtObjectID self)
LxResult Track(LXtObjectID self, LXtObjectID vts, unsigned int eventType)
LxResult TrackFlags(LXtObjectID self, unsigned int *flags)
LxResult Post(LXtObjectID self, LXtObjectID vts)

ILxAdjustTool

class ILxAdjustTool

This interface has an ID, but it’s never used by the client since it’s not polymorphic with anything.

Public Functions

void Value(LXtObjectID self, unsigned int index, LXtObjectID val)

During event processing, the tool should not modify its own attributes directly. Instead it should adjust its own values through the adjust tool interface which allows the atribute changes to be scripted and undoable. The functions are similar to those found in the ILxAttributes interface, but they are for write only. The Value() method is passed a value object for the attribute which will probably be copied and converted into text.

void SetInt(LXtObjectID self, unsigned int index, int val)
void SetFlt(LXtObjectID self, unsigned int index, double val)
void SetString(LXtObjectID self, unsigned int index, const char *val)
void Lock(LXtObjectID self)

Additional methods allow the tool to signal other changes during interaction. Invalidate() causes the tools model to redraw, and Lock() indicates that the next attribute change will have side effects and cannot be merged with previous changes.

void Invalidate(LXtObjectID self)
void Update(LXtObjectID self)

ILxNavigationListener

class ILxNavigationListener

Public Functions

void Down(LXtObjectID self, LXtObjectID view, LXtObjectID item)

Navigation listener is a global port to be informed of camera navigation event. ‘Down’ is called when mouse is down. ‘view’ is ILxView3D object of navigation viewport. ‘item’ is ILxItem1 object when navigation viewport is camera or light or preview.

void Move(LXtObjectID self, LXtObjectID view, LXtObjectID item, unsigned hot, const LXtVector pos, const LXtMatrix rot, double zoom)

‘Move’ is called when mouse is move. ‘pos’, ‘rot’ and ‘zoom’ are current view tranform in hot mode in camera or preview navigation. The navigating transform type is set by ‘hot’ mask as LXfNAV_HOT.

void Up(LXtObjectID self, LXtObjectID view, LXtObjectID item)

‘Up’ is called when mouse is up.

void Delta(LXtObjectID self, LXtObjectID view, LXtObjectID item, unsigned hot, const LXtVector pos, const LXtMatrix rot, double zoom)

‘Delta’ is called at the end of navigation by a navigation wiget.

void Wheel(LXtObjectID self, LXtObjectID view, LXtObjectID item)

‘Wheel’ is called at the end of mouse wheel event.

void HotSyncPre(LXtObjectID self, LXtObjectID view, LXtObjectID item)

‘HotSyncPre’ is called when the current hot mode is on and the new mode is off before calling the navigation action in ‘Move’ or ‘Delta’ event.

void HotSyncPost(LXtObjectID self, LXtObjectID view, LXtObjectID item)

‘HotSyncPost’ is called when the current hot mode is on and the new mode is off after the navigation action in ‘Move’ or ‘Delta’ event.

  • LXfNAV_HOT_POS

  • LXfNAV_HOT_ROT

  • LXfNAV_HOT_ZOOM