Public Member Functions

IBoolObject Class Reference

This reference page is linked to from the following overview topics: Object Plug-ins, Plug-in Base Classes.


Search for all occurrences

Detailed Description

See also:
Class GeomObject.

Description:
This class is available in release 2.0 and later only.

This class provides access to the boolean object's parameters. Given a pointer to an object whose ClassID is BOOLOBJ_CLASS_ID, you can cast that pointer to this class and use the methods to access the parameters. Note: In 3ds Max 3.0 and later the new boolean object is used and it has its own ClassID. Therefore where you previously used Class_ID(BOOLOBJ_CLASS_ID,0) you should now use NEWBOOL_CLASS_ID (#define NEWBOOL_CLASS_ID Class_ID(0x51db4f2f,0x1c596b1a)).

The boolean object has four references. 2 references to the operand objects and 2 references to transform controllers providing a transformation matrix for the 2 operands. The following values may be used to access the boolean object's references:

BOOLREF_OBJECT1

BOOLREF_OBJECT2

BOOLREF_CONT1

BOOLREF_CONT2

All methods of this class are implemented by the system.

#include <istdplug.h>

Inheritance diagram for IBoolObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual BOOL  GetOperandSel (int which)=0
virtual void  SetOperandSel (int which, BOOL sel)=0
virtual int  GetBoolOp ()=0
virtual void  SetBoolOp (int op)=0
virtual int  GetBoolCutType ()=0
virtual void  SetBoolCutType (int ct)=0
virtual BOOL  GetDisplayResult ()=0
virtual void  SetDisplayResult (BOOL onOff)=0
virtual BOOL  GetShowHiddenOps ()=0
virtual void  SetShowHiddenOps (BOOL onOff)=0
virtual int  GetUpdateMode ()=0
virtual void  SetUpdateMode (int mode)=0
virtual BOOL  GetOptimize ()=0
virtual void  SetOptimize (BOOL onOff)=0
virtual void  SetOperandA (TimeValue t, INode *node)=0
virtual void  SetOperandB (TimeValue t, INode *node, INode *boolNode, int addOpMethod=0, int matMergeMethod=0, bool *canUndo=NULL)=0

Member Function Documentation

virtual BOOL GetOperandSel ( int  which ) [pure virtual]
Remarks:
Returns TRUE if the specified operand is selected; otherwise FALSE.
Parameters:
int which

Specifies which operand to check.

0 for operand A, 1 for operand B.
virtual void SetOperandSel ( int  which,
BOOL  sel 
) [pure virtual]
Remarks:
Sets the selected state of the specified operand.
Parameters:
int which

Specifies which operand to select.

0 for operand A, 1 for operand B.

BOOL sel

TRUE to select it; FALSE to deselect it.
virtual int GetBoolOp ( ) [pure virtual]
Remarks:
Returns the boolean operation setting.
Returns:
One of the following values:

BOOLOP_UNION

BOOLOP_INTERSECTION

BOOLOP_SUB_AB

BOOLOP_SUB_BA

BOOLOP_CUT -- This option is available in release 3.0 and later only.
virtual void SetBoolOp ( int  op ) [pure virtual]
Remarks:
Sets the boolean operation.
Parameters:
int op

One of the following values:

BOOLOP_UNION

BOOLOP_INTERSECTION

BOOLOP_SUB_AB

BOOLOP_SUB_BA

BOOLOP_CUT -- This option is available in release 3.0 and later only.
virtual int GetBoolCutType ( ) [pure virtual]
Remarks:
Returns the type if the 'Cut' operation is choosen. One of the following values:

BOOLOP_CUT_REFINE

BOOLOP_CUT_SEPARATE

BOOLOP_CUT_REMOVE_IN

BOOLOP_CUT_REMOVE_OUT
virtual void SetBoolCutType ( int  ct ) [pure virtual]
Remarks:
Sets the type for the 'Cut' operation. One of the following values:
Parameters:
int ct

One of the following values:

BOOLOP_CUT_REFINE

BOOLOP_CUT_SEPARATE

BOOLOP_CUT_REMOVE_IN

BOOLOP_CUT_REMOVE_OUT
virtual BOOL GetDisplayResult ( ) [pure virtual]
Remarks:
Returns the display result setting. If TRUE the result is display; otherwise the operands are displayed.
virtual void SetDisplayResult ( BOOL  onOff ) [pure virtual]
Remarks:
Sets the display result state.
Parameters:
BOOL onOff

TRUE to show the result; FALSE to show the operands.
virtual BOOL GetShowHiddenOps ( ) [pure virtual]
Remarks:
Returns the show hidden operands state. TRUE if on; FALSE if off.
virtual void SetShowHiddenOps ( BOOL  onOff ) [pure virtual]
Remarks:
Sets the state of the show hidden operands setting.
Parameters:
BOOL onOff

TRUE for on; FALSE for off.
virtual int GetUpdateMode ( ) [pure virtual]
Remarks:
Returns the state of the update mode.
Returns:
One of the following values:

BOOLUPDATE_ALWAYS

BOOLUPDATE_SELECTED

BOOLUPDATE_RENDER

BOOLUPDATE_MANUAL
virtual void SetUpdateMode ( int  mode ) [pure virtual]
Remarks:
Sets the state of the update mode.
Parameters:
int mode

One of the following values:

BOOLUPDATE_ALWAYS

BOOLUPDATE_SELECTED

BOOLUPDATE_RENDER

BOOLUPDATE_MANUAL
virtual BOOL GetOptimize ( ) [pure virtual]
Remarks:
Returns the state of the optimize result setting. TRUE if on; FALSE if off. Note: This method does not work on 'new' boolean objects as there is no optimize setting for these.
virtual void SetOptimize ( BOOL  onOff ) [pure virtual]
Remarks:
Sets the state of the optimize result setting. Note: This method does not work on 'new' boolean objects as there is no optimize setting for these.
Parameters:
BOOL onOff

TRUE for on; FALSE for off.
virtual void SetOperandA ( TimeValue  t,
INode node 
) [pure virtual]
Remarks:
Sets the node used for operand A. This method adds a restore object if theHold.Holding(), but the Begin() and Accept() should be done in the calling routine.

Note the following:

  • In a Boolean Object, A should be specified before B. (This allows material merges, etc, to work.)

  • This method adds a restore object if theHold.Holding(), but the Begin() and Accept() should be done in the calling routine.
Parameters:
TimeValue t

The time at which to set the operand.

INode *node

Points to the operand A node.
virtual void SetOperandB ( TimeValue  t,
INode node,
INode boolNode,
int  addOpMethod = 0,
int  matMergeMethod = 0,
bool *  canUndo = NULL 
) [pure virtual]
Remarks:
Sets the node used for operand B. This method adds a restore object if theHold.Holding(), but the Begin() and Accept() should be done in the calling routine.
Parameters:
TimeValue t

The time at which to set the operand.

INode *node

+ Points to the operand B node.

INode *boolNode

Points to the node of the boolean object.

int addOpMethod=0

One of the following values:

BOOL_ADDOP_REFERENCE

Operand is a reference to original node.

BOOL_ADDOP_INSTANCE

Operand is an instance of the original node.

BOOL_ADDOP_COPY

Operand is a copy of the original node.

BOOL_ADDOP_MOVE

Original node should be deleted.

int matMergeMethod=0

One of the following values:

BOOL_MAT_NO_MODIFY

Combines materials without changing them or the ID's.

BOOL_MAT_IDTOMAT

Matches ID's to materials, then combines materials.

BOOL_MAT_MATTOID

Matches materials to ID's, then combines them.

BOOL_MAT_DISCARD_ORIG

Discards original material, uses new node's instead.

BOOL_MAT_DISCARD_NEW

Discards new node's material, uses original.

IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject
IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject IBoolObject