Public Member Functions

SpaceArrayCallback Class Reference

Search for all occurrences

Detailed Description

See also:
Class Interface, Class ShapeObject, Class Spline3D, Class Point3.

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

This is the callback object for the method Interface::DoSpaceArrayDialog(SpaceArrayCallback *sacb=NULL)=0

This is the method which brings up the Spacing tool. This lets the user distribute objects based on the current selection along a path defined by a spline or a pair of points.

The callback is mostly for use for plug-ins that need to use the spacing tool as a way of generating spacing information. If one wants to customize the default behaviour of the dialog, they derive a class from this one and implement the virtual methods. The non-virtuals simply provide access to the spacing information. This is both for setting the defaults before calling the spacing tool as well as getting out the information after using the spacing tool.

#include <spacearraycallback.h>

Inheritance diagram for SpaceArrayCallback:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  SpaceArrayCallback ()
virtual  ~SpaceArrayCallback ()
virtual bool  isModal (void)
virtual bool  doPickPath (void)
virtual MCHAR *  dialogTitle (void)
virtual MCHAR *  startMessage (void)
virtual MCHAR *  buttonText (void)
virtual bool  isSilent (void)
virtual bool  doObjectType (void)
virtual void  proc (void)
ShapeObject getPath (void)
void  setPath (ShapeObject *p)
CoreExport void  setPath (Point3 pt1, Point3 pt2)
CoreExport void  setPath (Spline3D *s)
float  getStart (void)
float  getEnd (void)
float  getSpace (void)
int  getCount (void)
int  getContext (void)
float  getWidth (void)
void  setStart (float f)
void  setEnd (float f)
void  setSpace (float f)
void  setCount (int n)
bool  getFollow (void)
void  setFollow (bool t)
void  setContext (CTYPE c)
OTYPE  getObjectCreationType (void)
void  setObjectCreationType (OTYPE t)
STYPE  getSpacingType (void)
void  setSpacingType (STYPE s)
CoreExport void  setMessage (char *buf)
void  setWidth (float nWidth)
void  setCountLimit (int limit)
int  getCountLimit (void)

Constructor & Destructor Documentation

SpaceArrayCallback ( ) [inline]
Remarks:
Constructor. The data members are initialized as follows:

path = NULL; start = end = space = 0.0f; count = 1; oType = NODE_CPY; sType = SPACE_CENTER; follow = false; context = CTXT_FREE; width = 0.0f; countLimit = INT_MAX;
                         { path = NULL; start = end = space = 0.0f; count = 1; oType = NODE_CPY; sType = SPACE_CENTER; follow = false; 
                            context = CTXT_FREE; width = 0.0f; countLimit = INT_MAX; }
virtual ~SpaceArrayCallback ( ) [inline, virtual]
Remarks:
Destructor.
{}

Member Function Documentation

virtual bool isModal ( void  ) [inline, virtual]
Remarks:
Implemented by the Plug-in.

If this method returns false, the dialog is presented as a modeless dialog.
Default Implementation:
{ return true; }
{ return true; }
virtual bool doPickPath ( void  ) [inline, virtual]
Remarks:
Implemented by the Plug-in.

If this method returns true, the path picking buttons are turned on.
Default Implementation:
{ return false; }
{ return false; }
virtual MCHAR* dialogTitle ( void  ) [inline, virtual]
Remarks:
Implemented by the Plug-in.

Returns the title for the dialog (e.g. Space Array Tool).
Default Implementation:
{ return _M(""); }
{ return _M(""); }
virtual MCHAR* startMessage ( void  ) [inline, virtual]
Remarks:
Implemented by the Plug-in.

Returns the message to be displayed in the static display right after the dialog comes up.
Default Implementation:
{ return _M(""); }
{ return _M(""); }
virtual MCHAR* buttonText ( void  ) [inline, virtual]
Remarks:
Implemented by the Plug-in.

Returns the button text.
Default Implementation:
{ return _M("OK"); }
{ return _M("OK"); }
virtual bool isSilent ( void  ) [inline, virtual]
Remarks:
Implemented by the Plug-in.

If this method returns true, the spacing tool generates points, but the actual dialog is not presented to the user. This is currently used, for example, by the Stairs in VIZ to generate spacing information for the mesh.
Default Implementation:
{ return false; }
{ return false; }
virtual bool doObjectType ( void  ) [inline, virtual]
Remarks:
Implemented by the Plug-in.

If this method returns false, then the Instance, Copy, Reference radio buttons are disabled (greyed out).
Default Implementation:
{ return true; }
{ return true; }
virtual void proc ( void  ) [inline, virtual]
Remarks:
Implemented by the Plug-in.

This method is called after the spacing information is generated. It is here that a developer using this callback could get the updated values, perform some calculation of their own, etc.
Default Implementation:
{}
{}
ShapeObject* getPath ( void  ) [inline]
Remarks:
Implemented by the System.

Returns a pointer to the path ShapeObject.
{ return path; }
void setPath ( ShapeObject p ) [inline]
Remarks:
Implemented by the System.

Sets the path used (as a ShapeObject).
Parameters:
ShapeObject *p

Points to the shape object to use as a path.
{ path = p; }
CoreExport void setPath ( Point3  pt1,
Point3  pt2 
)
Remarks:
Implemented by the System.

Sets the points for the path.
Parameters:
Point3 pt1

One of the endpoints.

Point3 pt2

The other endpoint.
CoreExport void setPath ( Spline3D s )
Remarks:
Implemented by the System.

Sets the path used.
Parameters:
Spline3D *s

Points to the path to use.
float getStart ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the start offset.
{ return start; }
float getEnd ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the end offset.
{ return end; }
float getSpace ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the spacing.
{ return space; }
int getCount ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the object count.
{ return count; }
int getContext ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the context. See setContext() above.
{ return context; }
float getWidth ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the width. This is the width of the object to be arrayed. It is a single value so can be calculated any way the user wishes. In the default spacing tool this is calculated based on the x size of the bounding box.
{ return width; }
void setStart ( float  f ) [inline]
Remarks:
Implemented by the System.

Sets the start offset.
Parameters:
float f

The start offset to set.
{ start = f; }
void setEnd ( float  f ) [inline]
Remarks:
Implemented by the System.

Sets the end offset.
Parameters:
float f

The end offset to set.
{ end = f; }
void setSpace ( float  f ) [inline]
Remarks:
Implemented by the System.

Sets the spacing.
Parameters:
float f

The spacing to set.
{ space = f; }
void setCount ( int  n ) [inline]
Remarks:
Implemented by the System.

Sets the count.
Parameters:
int n

The count to set.
{ count = n > countLimit ? countLimit : n; }
bool getFollow ( void  ) [inline]
Remarks:
Implemented by the System.

Returns true if Follow is set (checked); otherwise false.
{ return follow; }
void setFollow ( bool  t ) [inline]
Remarks:
Implemented by the System.

Sets the Follow state (checkbox).
Parameters:
bool t

Use true for checked; false for un-checked.
{ follow = t; }
void setContext ( CTYPE  c ) [inline]
Remarks:
Implemented by the System.

Sets the context.
Parameters:
CTYPE c

One of the following values:

CTXT_FREE - Free Center

CTXT_CNTRCOUNT - Divide Evenly, Objects at Ends

CTXT_CNTRSPACE - Centered, Specify Spacing

CTXT_END - End Offset

CTXT_ENDCOUNT - End Offset, Divide Evenly

CTXT_ENDSPACE - End Offset, Specify Spacing

CTXT_START - Start Offset

CTXT_STARTCOUNT - Start Offset, Divide Evenly

CTXT_STARTSPACE - Start Offset, Specify Spacing

CTXT_FULLSPACE - Specify Offset and Spacing

CTXT_FULLCOUNT - Specify Offsets, Divide Evenly

CTXT_ENDLOCK - Space from End, Unbounded

CTXT_ENDLOCKCOUNT - Space from End, Specify Number

CTXT_ENDLOCKSPACE - Space from End, Specify Spacing

CTXT_STARTLOCK - Space from Start, Unbounded

CTXT_STARTLOCKCOUNT - Space from Start, Specify Number

CTXT_STARTLOCKSPACE - Space from Start, Specify Spacing

CTXT_FULLLOCKSPACE - Specify Spacing, Matching Offsets

CTXT_FULLLOCKCOUNT - Divide Evenly, No Objects at Ends
{ context = c; }
OTYPE getObjectCreationType ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the object creation type. One of the following values:

NODE_CPY -- Copy

NODE_INST -- Instance

NODE_REF -- Reference
{ return oType; }
void setObjectCreationType ( OTYPE  t ) [inline]
Remarks:
Implemented by the System.

Sets the object creation type. One of the following values:

NODE_CPY -- Copy

NODE_INST -- Instance

NODE_REF -- Reference
{ oType = t; }
STYPE getSpacingType ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the spacing type. One of the following values:

SPACE_CENTER

SPACE_EDGE
{ return sType; }
void setSpacingType ( STYPE  s ) [inline]
Remarks:
Implemented by the System.

Sets the spacing type.
Parameters:
STYPE s

One of the following values:

SPACE_CENTER

SPACE_EDGE
{ sType = s; }
CoreExport void setMessage ( char *  buf )
Remarks:
Implemented by the System.

Sets the message string.
void setWidth ( float  nWidth ) [inline]
Remarks:
Implemented by the System.

Sets the width. See getWidth() above.
Parameters:
float nWidth

The width to set.
{ width = nWidth; }
void setCountLimit ( int  limit ) [inline]
Remarks:
Implemented by the System.

Sets a limit on the count.
Parameters:
int limit

The limit to set.
{ countLimit = limit; }
int getCountLimit ( void  ) [inline]
Remarks:
Implemented by the System.

Returns the limit on the count.
{ return countLimit; }

SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback
SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback SpaceArrayCallback