3ds Max C++ API Reference
IPainterInterface_V5 Class Referenceabstract

#include <IPainterInterface.h>

+ Inheritance diagram for IPainterInterface_V5:

Public Member Functions

virtual BOOL InitializeCallback (ReferenceTarget *canvas)=0
 The canvas passes a pointer of itself to the painter. More...
 
virtual BOOL InitializeNodes (int flags, Tab< INode * > &nodeList)=0
 this loads of the nodes that you want to paint on More...
 
virtual BOOL UpdateMeshes (BOOL updatePointGather)=0
 This forces the quadtree to rebuilt.
More...
 
virtual BOOL StartPaintSession ()=0
 This is called when the a canvas wants to start a paint session. More...
 
virtual BOOL EndPaintSession ()=0
 This is called when the a canvas wants to end a paint session. More...
 
virtual BOOL InPaintMode ()=0
 This return whether the user is in the paint mode, so a plugin can determine how to paint the UI paint button. More...
 
virtual BOOL BringUpOptions ()=0
 This brings up the Painter Options dialog that lets the users sets various setting of the painter system. More...
 
virtual intRetrieveTimeList (int &ct)=0
 This lets you access the time stamp of each sample of a stroke.
More...
 
virtual BOOL TestHit (IPoint2 mousePos, Point3 &worldPoint, Point3 &worldNormal, Point3 &localPoint, Point3 &localNormal, Point3 &bary, int &index, INode *node, BOOL &mirrorOn, Point3 &worldMirrorPoint, Point3 &worldMirrorNormal, Point3 &localMirrorPoint, Point3 &localMirrorNormal)=0
 this function lets you hit test against the quad tree given a mouse coord More...
 
virtual BOOL RandomHit (Point3 &worldPoint, Point3 &worldNormal, Point3 &localPoint, Point3 &localNormal, Point3 &bary, int &index, float &strFromFalloff, INode *node, BOOL &mirrorOn, Point3 &worldMirrorPoint, Point3 &worldMirrorNormal, Point3 &localMirrorPoint, Point3 &localMirrorNormal, int tabIndex)=0
 Retrieves a random hit point around the last hit point or a specified hit point within the brush. More...
 
virtual BOOL RandomHitAlongStroke (Point3 &worldPoint, Point3 &worldNormal, Point3 &localPoint, Point3 &localNormal, Point3 &bary, int &index, float &strFromFalloff, INode *node, BOOL &mirrorOn, Point3 &worldMirrorPoint, Point3 &worldMirrorNormal, Point3 &localMirrorPoint, Point3 &localMirrorNormal, int tabIndex)=0
 This will do random hit point along the stroke segment. More...
 
virtual BOOL ClearStroke ()=0
 this clears out all the stroke data for the current stroke More...
 
virtual BOOL AddToStroke (IPoint2 mousePos, BOOL rebuildPointGatherData, BOOL updateViewport)=0
 this adds a hit test to the current stroke More...
 
virtual int GetStrokeCount ()=0
 returns the number of sample points in the current stroke More...
 
virtual float * GetStrokeStr ()=0
 this returns a pointer to an array of floats where each entry is the str of a point sample More...
 
virtual float * GetStrokeRadius ()=0
 this returns a pointer to an array of floats where each entry is the radius of a point sample More...
 
virtual Point3GetStrokePointWorld ()=0
 this returns a pointer to an array of point3s where each entry is the world space hit point of the sample More...
 
virtual Point3GetStrokeNormalWorld ()=0
 this returns a pointer to an array of point3s where each entry is the world space normal of the sample More...
 
virtual Point3GetStrokePointWorldMirror ()=0
 this returns a pointer to an array of point3s where each entry is the world space hit point of the sample after it has been mirrored More...
 
virtual Point3GetStrokeNormalWorldMirror ()=0
 this returns a pointer to an array of point3s where each entry is the world space normal of the sample after it has been mirrored More...
 
virtual float * GetStrokePressure ()=0
 this returns a pointer to an array of floats where each entry is the pressure of a point sample either from a pressure sensitive tablet or from a predefined presssure graph More...
 
virtual Point3GetStrokePointLocal ()=0
 this returns a pointer to an array of point3s where each entry is the local space hit point of the sample More...
 
virtual Point3GetStrokeNormalLocal ()=0
 this returns a pointer to an array of point3s where each entry is the local space normal of the sample More...
 
virtual Point3GetStrokePointLocalMirror ()=0
 this returns a pointer to an array of point3s where each entry is the local space hit point of the sample after it has been mirrored More...
 
virtual Point3GetStrokeNormalLocalMirror ()=0
 this returns a pointer to an array of point3s where each entry is the world space normal of the sample after it has been mirrored More...
 
virtual IPoint2GetStrokeMousePos ()=0
 this returns a pointer to an array of Ipoint2s where each entry is the mouse pos in screen space for the sample More...
 
virtual BOOL * GetStrokeHitList ()=0
 this returns a pointer to an array of s where each entry is whether the sample hit the mesh or not More...
 
virtual Point3GetStrokeBary ()=0
 this returns a pointer to an array of point3s where each entry is the barycentri coords of the sample More...
 
virtual intGetStrokeIndex ()=0
 this returns a pointer to an array of ints where each entry is the index of the face of the sample More...
 
virtual BOOL * GetStrokeShift ()=0
 this returns a pointer to an array of bools where each entry is the state of the shift of the sample More...
 
virtual BOOL * GetStrokeCtrl ()=0
 this returns a pointer to an array of bools where each entry is the state of the ctrl of the sample More...
 
virtual BOOL * GetStrokeAlt ()=0
 this returns a pointer to an array of bools where each entry is the state of the alt of the sample More...
 
virtual INode ** GetStrokeNode ()=0
 this returns a pointer to an array of INode where each entry is the INode of the sample More...
 
virtual intGetStrokeTime ()=0
 this returns a pointer to an array of ints where each entry is the time stamp of the sample More...
 
virtual float GetStrFromPoint (Point3 point)=0
 given a point in world space it returns the str of that point based on the current stroke More...
 
virtual float * GetPredefineStrStrokeData (int &ct)=0
 Lets you interogate and set the state of the options dialog. More...
 
virtual float * GetPredefineSizeStrokeData (int &ct)=0
 Lets you interogate and set the state of the options dialog. More...
 
virtual BOOL GetBuildNormalData ()=0
 Access to the BuildNormalData property. More...
 
virtual void SetBuildNormalData (BOOL enable)=0
 Access to the BuildNormalData property. More...
 
virtual BOOL GetEnablePointGather ()=0
 Gets the state of point gathering. More...
 
virtual void SetEnablePointGather (BOOL enable)=0
 Turn on/off the point gather. More...
 
virtual BOOL LoadCustomPointGather (int ct, Point3 *points, INode *node)=0
 This lets you set up a custom list of points to weight to override the currentlist. More...
 
virtual float * RetrievePointGatherWeights (INode *node, int &ct)=0
 This retrieves the weight of the points based on the current stroke. More...
 
virtual float * RetrievePointGatherStr (INode *node, int &ct)=0
 This retrieves the strength of the points based on the current stroke. More...
 
virtual BOOL * RetrievePointGatherIsMirror (INode *node, int &ct)=0
 This retrieves the whether the point was affected by a mirror stroke. More...
 
virtual Point3RetrievePointGatherPoints (INode *node, int &ct)=0
 This retrieves the the array of the points. More...
 
virtual Point3RetrievePointGatherNormals (INode *node, int &ct)=0
 This retrieves the the array of the normals. More...
 
virtual float * RetrievePointGatherU (INode *node, int &ct)=0
 This retrieves the the array of the U vals, this is how far along the stroke that point is. More...
 
virtual BOOL GetMirrorEnable ()=0
 returns if the mirror plane is on or off More...
 
virtual void SetMirrorEnable (BOOL enable)=0
 lets you set whether the mirror plane is on/off More...
 
virtual Point3 GetMirrorPlaneCenter ()=0
 returns the center of the mirror plane in world space coords More...
 
virtual int GetMirrorAxis ()=0
 returns which mirror axis is active More...
 
virtual void SetMirrorAxis (int dir)=0
 lets you set the mirror axis More...
 
virtual float GetMirrorOffset ()=0
 Returns the mirror offset. More...
 
virtual void SetMirrorOffset (float offset)=0
 Sets the mirror offset. More...
 
virtual int GetTreeDepth ()=0
 Lets you get the quad tree depth. More...
 
virtual void SetTreeDepth (int depth)=0
 Lets you set the quad tree depth. More...
 
virtual BOOL GetUpdateOnMouseUp ()=0
 Lets you get the Update on Mouse Up option. More...
 
virtual void SetUpdateOnMouseUp (BOOL update)=0
 Lets you get the Update on Mouse Up option. More...
 
virtual int GetLagRate ()=0
 These 2 function let you get and set the lag rate. More...
 
virtual void SetLagRate (int lagRate)=0
 These 2 function let you get and set the lag rate. More...
 
virtual float GetMinStr ()=0
 Let you get the min strength for a brush. More...
 
virtual void SetMinStr (float str)=0
 lets you set the min strength for a brush. More...
 
virtual float GetMaxStr ()=0
 lets you get the max strength for a brush. More...
 
virtual void SetMaxStr (float str)=0
 lets you set the max strength for a brush. More...
 
virtual float GetMinSize ()=0
 lets you get the min radius for a brush. More...
 
virtual void SetMinSize (float str)=0
 lets you set the min radius for a brush. More...
 
virtual float GetMaxSize ()=0
 lets you get the max radius for a brush. More...
 
virtual void SetMaxSize (float str)=0
 lets you set the max radius for a brush. More...
 
virtual BOOL GetAdditiveMode ()=0
 Gets the aditive mode. More...
 
virtual void SetAdditiveMode (BOOL enable)=0
 Sets the aditive mode. More...
 
virtual ICurveGetFalloffGraph ()=0
 This returns the brush falloff curve if you want to handle the doing the brush falloff yourself. More...
 
virtual BOOL GetDrawRing ()=0
 This lets you get whether the ring is drawn around the hit point. More...
 
virtual void SetDrawRing (BOOL draw)=0
 This lets you set whether the ring is drawn around the hit point. More...
 
virtual BOOL GetDrawNormal ()=0
 This lets you get whether the normal vector is drawn at the hit point. More...
 
virtual void SetDrawNormal (BOOL draw)=0
 This lets you set whether the normal vector is drawn at the hit point. More...
 
virtual BOOL GetDrawTrace ()=0
 This lets you get whether the a line is left behind a stroke as it is drawn. More...
 
virtual void SetDrawTrace (BOOL draw)=0
 This lets you set whether the a line is left behind a stroke as it is drawn. More...
 
virtual BOOL GetPressureEnable ()=0
 let you get whether pressure sensistivity is turned on More...
 
virtual void SetPressureEnable (BOOL enable)=0
 let you set whether pressure sensistivity is turned on More...
 
virtual BOOL GetPressureAffects ()=0
 Get what the pressure of a brush affects. More...
 
virtual void SetPressureAffects (int affect)=0
 Set what the pressure of a brush affects. More...
 
virtual BOOL GetPredefinedStrEnable ()=0
 get whether a predefined str is enabled for a stroke. More...
 
virtual void SetPredefinedStrEnable (BOOL enable)=0
 set whether a predefined str is enabled for a stroke. More...
 
virtual BOOL GetPredefinedSizeEnable ()=0
 get whether a predefined radius is enabled for a stroke. More...
 
virtual void SetPredefinedSizeEnable (BOOL enable)=0
 set whether a predefined radius is enabled for a stroke. More...
 
virtual ICurveGetPredefineSizeStrokeGraph ()=0
 get the predefined radius graph set for a stroke. More...
 
virtual ICurveGetPredefineStrStrokeGraph ()=0
 get the predefined strength graph set for a stroke. More...
 
virtual float GetNormalScale ()=0
 
virtual void SetNormalScale (float scale)=0
 
virtual BOOL GetMarkerEnable ()=0
 
virtual void SetMarkerEnable (BOOL on)=0
 
virtual float GetMarker ()=0
 
virtual void SetMarker (float pos)=0
 
virtual int GetOffMeshHitType ()=0
 Returns the mesh hit type. More...
 
virtual void SetOffMeshHitType (int type)=0
 Sets the mesh hit type. More...
 
virtual float GetOffMeshHitZDepth ()=0
 
virtual void SetOffMeshHitZDepth (float depth)=0
 
virtual Point3 GetOffMeshHitPos ()=0
 
virtual void SetOffMeshHitPos (Point3 pos)=0
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

See also
IPainterCanvasInterface_V5
description
Any plugin that wants to be able to be painted on must sub class from this class or a later version of it.

Member Function Documentation

◆ InitializeCallback()

virtual BOOL InitializeCallback ( ReferenceTarget canvas)
pure virtual

The canvas passes a pointer of itself to the painter.

This is so the painter knows where to send the stroke messages

Parameters
canvas- is the pointer to the canvas

◆ InitializeNodes()

virtual BOOL InitializeNodes ( int  flags,
Tab< INode * > &  nodeList 
)
pure virtual

this loads of the nodes that you want to paint on

Anytime you want to add delete a node this must be called

Parameters
flags- not yet implemented does nothing but there to allow flags per node for special conditions
nodeList- a table of nodes that you want to paint on

◆ UpdateMeshes()

virtual BOOL UpdateMeshes ( BOOL  updatePointGather)
pure virtual

This forces the quadtree to rebuilt.

Any time you change a geometry or togopology of a node you passed to the InitializedNodes methode this must be called. Ideally I could listen to the notifyremessage changed and rebuild on that but the since rebuilding the quad tree is inetensive, I leave it up to the canvas as to when to rebuild so we can better control the amount of stack re-evals

Parameters
updatePointGather- determines whether the pointGather data gets updated also normally if your mesh does not change shape or topology you dont need to update the pointgather. For instance if you rotate a view your quad tree needs to get updated but not the point list

◆ StartPaintSession()

virtual BOOL StartPaintSession ( )
pure virtual

This is called when the a canvas wants to start a paint session.

Implemented in IPainterInterface_V7.

◆ EndPaintSession()

virtual BOOL EndPaintSession ( )
pure virtual

This is called when the a canvas wants to end a paint session.

◆ InPaintMode()

virtual BOOL InPaintMode ( )
pure virtual

This return whether the user is in the paint mode, so a plugin can determine how to paint the UI paint button.

◆ BringUpOptions()

virtual BOOL BringUpOptions ( )
pure virtual

This brings up the Painter Options dialog that lets the users sets various setting of the painter system.

◆ RetrieveTimeList()

virtual int* RetrieveTimeList ( int ct)
pure virtual

This lets you access the time stamp of each sample of a stroke.

This lets you look at the acceleration of the mouse as it moves if say you wanted to paint a stroke and use it for an animation path.

◆ TestHit()

virtual BOOL TestHit ( IPoint2  mousePos,
Point3 worldPoint,
Point3 worldNormal,
Point3 localPoint,
Point3 localNormal,
Point3 bary,
int index,
INode node,
BOOL &  mirrorOn,
Point3 worldMirrorPoint,
Point3 worldMirrorNormal,
Point3 localMirrorPoint,
Point3 localMirrorNormal 
)
pure virtual

this function lets you hit test against the quad tree given a mouse coord

Parameters
mousePos- the position in screen space that you want to hit test agains
worldPoint- the world hit point position
worldNormal- the world hit point normal
localPoint- the local hit point position
localNormal- the local hit point normal
bary- the barycentry coord of the face that was hit
index- the index of the face that was hit
node- the node that was hit
mirrorOn- whether mirroring was on or off
worldMirrorPoint- the world hit point position after it was mirrored
worldMirrorNormal- the world hit point normal after it was mirrored
localMirrorPoint- the local hit point position after it was mirrored
localMirrorNormal- the local hit point normal after it was mirrored
Returns
TRUE if that point insterects the quad tree

◆ RandomHit()

virtual BOOL RandomHit ( Point3 worldPoint,
Point3 worldNormal,
Point3 localPoint,
Point3 localNormal,
Point3 bary,
int index,
float &  strFromFalloff,
INode node,
BOOL &  mirrorOn,
Point3 worldMirrorPoint,
Point3 worldMirrorNormal,
Point3 localMirrorPoint,
Point3 localMirrorNormal,
int  tabIndex 
)
pure virtual

Retrieves a random hit point around the last hit point or a specified hit point within the brush.

Useful if you want to do airbrush type effects or to just sample around the hit point

Parameters
[out]worldPoint- the world hit point position
[out]worldNormal- the world hit point normal
[out]localPoint- the local hit point position
[out]localNormal- the local hit point normal
[out]bary- the barycentry coord of the face that was hit
[out]index- the index of the face that was hit
[out]strFromFalloff- the strength of the point based on the fall off of the brush
[out]node- the node that was hit
[out]mirrorOn- whether mirroring was on or off
[out]worldMirrorPoint- the world hit point position after it was mirrored
[out]worldMirrorNormal- the world hit point normal after it was mirrored
[out]localMirrorPoint- the local hit point position after it was mirrored
[out]localMirrorNormal- the local hit point normal after it was mirrored
tabIndex- What hit you want to sample around if 0 or less it will hit around the last hit test
Returns
FALSE if a hit point was not found

◆ RandomHitAlongStroke()

virtual BOOL RandomHitAlongStroke ( Point3 worldPoint,
Point3 worldNormal,
Point3 localPoint,
Point3 localNormal,
Point3 bary,
int index,
float &  strFromFalloff,
INode node,
BOOL &  mirrorOn,
Point3 worldMirrorPoint,
Point3 worldMirrorNormal,
Point3 localMirrorPoint,
Point3 localMirrorNormal,
int  tabIndex 
)
pure virtual

This will do random hit point along the stroke segment.

Parameters
[out]worldPoint- the world hit point position
[out]worldNormal- the world hit point normal
[out]localPoint- the local hit point position
[out]localNormal- the local hit point normal
[out]bary- the barycentry coord of the face that was hit
[out]index- the index of the face that was hit
[out]strFromFalloff- the strength of the point based on the fall off of the brush
[out]node- the node that was hit
[out]mirrorOn- whether mirroring was on or off
[out]worldMirrorPoint- the world hit point position after it was mirrored
[out]worldMirrorNormal- the world hit point normal after it was mirrored
[out]localMirrorPoint- the local hit point position after it was mirrored
[out]localMirrorNormal- the local hit point normal after it was mirrored
tabIndexis what segment you want to sample around if 0 or less it will hit around the last segment
Returns
FALSE if it does not find a hit

◆ ClearStroke()

virtual BOOL ClearStroke ( )
pure virtual

this clears out all the stroke data for the current stroke

This method is used if you want to do a custom stroke. Say for instance you wanted to just stroke a straight line, by default the painter uses a path stroke. so what you do on the PaintStroke method record the first and last mousePos, clear all the stroke data and then Add your custom stroke to the system.

◆ AddToStroke()

virtual BOOL AddToStroke ( IPoint2  mousePos,
BOOL  rebuildPointGatherData,
BOOL  updateViewport 
)
pure virtual

this adds a hit test to the current stroke

This method is used if you want to do a custom stroke. Say for instance you wanted to just stroke a straight line, by default the painter uses a path stroke. so what you do on the PaintStroke method record the first and last mousePos, clear all the stroke data and then Add your custom stroke to the system.

Parameters
mousePos- the point that want to test to add
rebuildPointGatherData- this determines whether the poing gather data get rebuilt this allows you to delay the building of the data if you are addding mulitple points at once
updateViewport- determines if the viewports get updated after this call

◆ GetStrokeCount()

virtual int GetStrokeCount ( )
pure virtual

returns the number of sample points in the current stroke

◆ GetStrokeStr()

virtual float* GetStrokeStr ( )
pure virtual

this returns a pointer to an array of floats where each entry is the str of a point sample

◆ GetStrokeRadius()

virtual float* GetStrokeRadius ( )
pure virtual

this returns a pointer to an array of floats where each entry is the radius of a point sample

◆ GetStrokePointWorld()

virtual Point3* GetStrokePointWorld ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the world space hit point of the sample

◆ GetStrokeNormalWorld()

virtual Point3* GetStrokeNormalWorld ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the world space normal of the sample

◆ GetStrokePointWorldMirror()

virtual Point3* GetStrokePointWorldMirror ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the world space hit point of the sample after it has been mirrored

◆ GetStrokeNormalWorldMirror()

virtual Point3* GetStrokeNormalWorldMirror ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the world space normal of the sample after it has been mirrored

◆ GetStrokePressure()

virtual float* GetStrokePressure ( )
pure virtual

this returns a pointer to an array of floats where each entry is the pressure of a point sample either from a pressure sensitive tablet or from a predefined presssure graph

◆ GetStrokePointLocal()

virtual Point3* GetStrokePointLocal ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the local space hit point of the sample

◆ GetStrokeNormalLocal()

virtual Point3* GetStrokeNormalLocal ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the local space normal of the sample

◆ GetStrokePointLocalMirror()

virtual Point3* GetStrokePointLocalMirror ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the local space hit point of the sample after it has been mirrored

◆ GetStrokeNormalLocalMirror()

virtual Point3* GetStrokeNormalLocalMirror ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the world space normal of the sample after it has been mirrored

◆ GetStrokeMousePos()

virtual IPoint2* GetStrokeMousePos ( )
pure virtual

this returns a pointer to an array of Ipoint2s where each entry is the mouse pos in screen space for the sample

◆ GetStrokeHitList()

virtual BOOL* GetStrokeHitList ( )
pure virtual

this returns a pointer to an array of s where each entry is whether the sample hit the mesh or not

the system allows the user to paint off the mesh, where all hitpoint are projected onto a plane based on the last hit point and normal

◆ GetStrokeBary()

virtual Point3* GetStrokeBary ( )
pure virtual

this returns a pointer to an array of point3s where each entry is the barycentri coords of the sample

◆ GetStrokeIndex()

virtual int* GetStrokeIndex ( )
pure virtual

this returns a pointer to an array of ints where each entry is the index of the face of the sample

◆ GetStrokeShift()

virtual BOOL* GetStrokeShift ( )
pure virtual

this returns a pointer to an array of bools where each entry is the state of the shift of the sample

◆ GetStrokeCtrl()

virtual BOOL* GetStrokeCtrl ( )
pure virtual

this returns a pointer to an array of bools where each entry is the state of the ctrl of the sample

◆ GetStrokeAlt()

virtual BOOL* GetStrokeAlt ( )
pure virtual

this returns a pointer to an array of bools where each entry is the state of the alt of the sample

◆ GetStrokeNode()

virtual INode** GetStrokeNode ( )
pure virtual

this returns a pointer to an array of INode where each entry is the INode of the sample

◆ GetStrokeTime()

virtual int* GetStrokeTime ( )
pure virtual

this returns a pointer to an array of ints where each entry is the time stamp of the sample

◆ GetStrFromPoint()

virtual float GetStrFromPoint ( Point3  point)
pure virtual

given a point in world space it returns the str of that point based on the current stroke

◆ GetPredefineStrStrokeData()

virtual float* GetPredefineStrStrokeData ( int ct)
pure virtual

Lets you interogate and set the state of the options dialog.

this is used to ask the system if a stroke str changes as it is painted the user can set predetermined shapes graphs and attach them to the str of brush based on the position of the in the curve it is. If you are in an interactive mode this data will always be changing so you can use this to get the current str/sizes of the hit points. If you are in a non interactive mode you do not need to call this since all the correct sizes/str are sent to the end stroke arrays. If the user has not specified any predetermined graphs the arrays will be NULL

Parameters
ct- count of the arrays

◆ GetPredefineSizeStrokeData()

virtual float* GetPredefineSizeStrokeData ( int ct)
pure virtual

Lets you interogate and set the state of the options dialog.

this is used to ask the system if a stroke size changes as it is painted the user can set predetermined shapes graphs and attach them to the size of brush based on the position of the in the curve it is. If you are in an interactive mode this data will always be changing so you can use this to get the current str/sizes of the hit points. If you are in a non interactive mode you do not need to call this since all the correct sizes/str are sent to the end stroke arrays. If the user has not specified any predetermined graphs the arrays will be NULL

Parameters
ct- count of the arrays

◆ GetBuildNormalData()

virtual BOOL GetBuildNormalData ( )
pure virtual

Access to the BuildNormalData property.

This will build a vertex normal list that you can access through RetrievePointGatherNormals This is by default is off to save memory. Also if you use a custom point list through LoadCustomPointGather no normals will be built since there is no topo data to build them from

Returns
whether we build normal data or not

◆ SetBuildNormalData()

virtual void SetBuildNormalData ( BOOL  enable)
pure virtual

Access to the BuildNormalData property.

This will build a vertex normal list that you can access through RetrievePointGatherNormals This is by default is off to save memory. Also if you use a custom point list through LoadCustomPointGather no normals will be built since there is no topo data to build them from

Parameters
enable- Sets whether we build normal data or not

◆ GetEnablePointGather()

virtual BOOL GetEnablePointGather ( )
pure virtual

Gets the state of point gathering.

If this is enabled, the points of the mesh will be used as your points

Returns
TRUE if point gather is enabled

◆ SetEnablePointGather()

virtual void SetEnablePointGather ( BOOL  enable)
pure virtual

Turn on/off the point gather.

If this is enabled, the points of the mesh will be used as your points param enabled - The new state of the point gather

◆ LoadCustomPointGather()

virtual BOOL LoadCustomPointGather ( int  ct,
Point3 points,
INode node 
)
pure virtual

This lets you set up a custom list of points to weight to override the currentlist.

for instance if you have a non mesh you will need to do this since by default the point gather uses the mesh points to weight

Parameters
ct- the number of points that you want to add
points- the points you want to add in world space
node- which node you want to assign them to

◆ RetrievePointGatherWeights()

virtual float* RetrievePointGatherWeights ( INode node,
int ct 
)
pure virtual

This retrieves the weight of the points based on the current stroke.

Parameters
node- the node that you want to inspect
[out]ct- the number of points in the array
Returns
a pointer to an array of weights

◆ RetrievePointGatherStr()

virtual float* RetrievePointGatherStr ( INode node,
int ct 
)
pure virtual

This retrieves the strength of the points based on the current stroke.

Parameters
node- the node that you want to inspect
[out]ct- the number of points in the array
Returns
a pointer to an array of point strengths

◆ RetrievePointGatherIsMirror()

virtual BOOL* RetrievePointGatherIsMirror ( INode node,
int ct 
)
pure virtual

This retrieves the whether the point was affected by a mirror stroke.

Parameters
node- the node that you want to inspect
[out]ct- the number of points in the array
Returns
an pointer to an array of bools indicating if points were mirrored

◆ RetrievePointGatherPoints()

virtual Point3* RetrievePointGatherPoints ( INode node,
int ct 
)
pure virtual

This retrieves the the array of the points.

Parameters
node- the node that you want to inspect
[out]ct- the number of points in the array
Returns
a pointer to an array of gather points

◆ RetrievePointGatherNormals()

virtual Point3* RetrievePointGatherNormals ( INode node,
int ct 
)
pure virtual

This retrieves the the array of the normals.

Parameters
node- the node that you want to inspect
[out]ct- the number of points in the array
Returns
An array of normals in local space. Note that these are only valid if you do not use a CustomPointGather

◆ RetrievePointGatherU()

virtual float* RetrievePointGatherU ( INode node,
int ct 
)
pure virtual

This retrieves the the array of the U vals, this is how far along the stroke that point is.

Parameters
node- the node that you want to inspect
[out]ct- the number of points in the array
Returns
a pointer to an array of float U values

◆ GetMirrorEnable()

virtual BOOL GetMirrorEnable ( )
pure virtual

returns if the mirror plane is on or off

◆ SetMirrorEnable()

virtual void SetMirrorEnable ( BOOL  enable)
pure virtual

lets you set whether the mirror plane is on/off

◆ GetMirrorPlaneCenter()

virtual Point3 GetMirrorPlaneCenter ( )
pure virtual

returns the center of the mirror plane in world space coords

the mirror plane is always aligned to the world axis

Returns
The center of the mirror plane in world space

◆ GetMirrorAxis()

virtual int GetMirrorAxis ( )
pure virtual

returns which mirror axis is active

Returns
One of the following values:
  • 0 = x axis
  • 1 = y axis
  • 2 = z axis

◆ SetMirrorAxis()

virtual void SetMirrorAxis ( int  dir)
pure virtual

lets you set the mirror axis

Parameters
dir- One of the following values:
  • 0 = x axis
  • 1 = y axis
  • 2 = z axis

◆ GetMirrorOffset()

virtual float GetMirrorOffset ( )
pure virtual

Returns the mirror offset.

◆ SetMirrorOffset()

virtual void SetMirrorOffset ( float  offset)
pure virtual

Sets the mirror offset.

◆ GetTreeDepth()

virtual int GetTreeDepth ( )
pure virtual

Lets you get the quad tree depth.

The deeper the quad tree the more memory you consume, but the more memory you consume (the memory consumption is exponential so be careful)

Returns
the current quad tree depth

◆ SetTreeDepth()

virtual void SetTreeDepth ( int  depth)
pure virtual

Lets you set the quad tree depth.

The deeper the quad tree the more memory you consume, but the more memory you consume (the memory consumption is exponential so be careful)

Parameters
depth- the new quad tree depth

◆ GetUpdateOnMouseUp()

virtual BOOL GetUpdateOnMouseUp ( )
pure virtual

Lets you get the Update on Mouse Up option.

When this is enabled you will not get PaintStroke calls. Instead you will get all the points at the end through the endStoke function

Returns
the current Update on Mouse Up state

◆ SetUpdateOnMouseUp()

virtual void SetUpdateOnMouseUp ( BOOL  update)
pure virtual

Lets you get the Update on Mouse Up option.

When this is enabled you will not get PaintStroke calls. Instead you will get all the points at the end through the endStoke function

Parameters
update- Enables or disables the Update on Mouse Up option state.

◆ GetLagRate()

virtual int GetLagRate ( )
pure virtual

These 2 function let you get and set the lag rate.

When this is enabled you get PaintStroke delayed by the lag rate calls. every x(lagrate) stroke points you willget the strokes.

Returns
The current lag rate

◆ SetLagRate()

virtual void SetLagRate ( int  lagRate)
pure virtual

These 2 function let you get and set the lag rate.

When this is enabled you get PaintStroke delayed by the lag rate calls. every x(lagrate) stroke points you willget the strokes.

Parameters
lagRate- The new lagrate

◆ GetMinStr()

virtual float GetMinStr ( )
pure virtual

Let you get the min strength for a brush.

If there is no pressure sensitive device attached only the max str is used

Returns
The current min strength

◆ SetMinStr()

virtual void SetMinStr ( float  str)
pure virtual

lets you set the min strength for a brush.

If there is no pressure sensitive device attached only the max str is used

Parameters
str- The new min strength

◆ GetMaxStr()

virtual float GetMaxStr ( )
pure virtual

lets you get the max strength for a brush.

If there is no pressure sensitive device attached only the max str is used

Returns
The current max strength

◆ SetMaxStr()

virtual void SetMaxStr ( float  str)
pure virtual

lets you set the max strength for a brush.

If there is no pressure sensitive device attached only the max str is used

Parameters
str- The new max strength

◆ GetMinSize()

virtual float GetMinSize ( )
pure virtual

lets you get the min radius for a brush.

If there is no pressure sensitive device attached only the max radius is used

Returns
the current min radius

◆ SetMinSize()

virtual void SetMinSize ( float  str)
pure virtual

lets you set the min radius for a brush.

If there is no pressure sensitive device attached only the max radius is used

Parameters
str- the new size

◆ GetMaxSize()

virtual float GetMaxSize ( )
pure virtual

lets you get the max radius for a brush.

If there is no pressure sensitive device attached only the max radius is used

Returns
the current max radius

◆ SetMaxSize()

virtual void SetMaxSize ( float  str)
pure virtual

lets you set the max radius for a brush.

If there is no pressure sensitive device attached only the max radius is used

Parameters
str- the new max size

◆ GetAdditiveMode()

virtual BOOL GetAdditiveMode ( )
pure virtual

Gets the aditive mode.

When additive mode is off the weight is absolutely set based on the current stroke hit. Previous stroke data is over written. In Additive mode the strength is added to current strength and is not capped.

Returns
True if we are in additive mode

◆ SetAdditiveMode()

virtual void SetAdditiveMode ( BOOL  enable)
pure virtual

Sets the aditive mode.

When additive mode is off the weight is absolutely set based on the current stroke hit. Previous stroke data is over written. In Additive mode the strength is added to current strength and is not capped.

Parameters
enable- True to enable additive mode, false to set absolute

◆ GetFalloffGraph()

virtual ICurve* GetFalloffGraph ( )
pure virtual

This returns the brush falloff curve if you want to handle the doing the brush falloff yourself.

◆ GetDrawRing()

virtual BOOL GetDrawRing ( )
pure virtual

This lets you get whether the ring is drawn around the hit point.

See also
The Color ID defines

◆ SetDrawRing()

virtual void SetDrawRing ( BOOL  draw)
pure virtual

This lets you set whether the ring is drawn around the hit point.

See also
The Color ID defines

◆ GetDrawNormal()

virtual BOOL GetDrawNormal ( )
pure virtual

This lets you get whether the normal vector is drawn at the hit point.

See also
The Color ID defines

◆ SetDrawNormal()

virtual void SetDrawNormal ( BOOL  draw)
pure virtual

This lets you set whether the normal vector is drawn at the hit point.

See also
The Color ID defines

◆ GetDrawTrace()

virtual BOOL GetDrawTrace ( )
pure virtual

This lets you get whether the a line is left behind a stroke as it is drawn.

See also
The Color ID defines

◆ SetDrawTrace()

virtual void SetDrawTrace ( BOOL  draw)
pure virtual

This lets you set whether the a line is left behind a stroke as it is drawn.

See also
The Color ID defines

◆ GetPressureEnable()

virtual BOOL GetPressureEnable ( )
pure virtual

let you get whether pressure sensistivity is turned on

when Pressure is enabled it can affect Str, Radius, Both Str and Radius or Nothing You would nothing fr instance if you wanted to do a custom affect for pressure.

Returns
TRUE if pressure is enabled

◆ SetPressureEnable()

virtual void SetPressureEnable ( BOOL  enable)
pure virtual

let you set whether pressure sensistivity is turned on

when Pressure is enabled it can affect Str, Radius, Both Str and Radius or Nothing You would nothing fr instance if you wanted to do a custom affect for pressure.

Parameters
enable- TRUE to enable pressure sensitivity

◆ GetPressureAffects()

virtual BOOL GetPressureAffects ( )
pure virtual

Get what the pressure of a brush affects.

You can effect Str. Radius, Str and Radius or None

See also
See the Pressure defines in IPainterInterface.h

◆ SetPressureAffects()

virtual void SetPressureAffects ( int  affect)
pure virtual

Set what the pressure of a brush affects.

You can effect Str. Radius, Str and Radius or None

Parameters
affect- One of the Pressure defines in IPainterInterface.h

◆ GetPredefinedStrEnable()

virtual BOOL GetPredefinedStrEnable ( )
pure virtual

get whether a predefined str is enabled for a stroke.

A predefined str stroke lets the user graph the str of stroke over the length of stroke

◆ SetPredefinedStrEnable()

virtual void SetPredefinedStrEnable ( BOOL  enable)
pure virtual

set whether a predefined str is enabled for a stroke.

A predefined str stroke lets the user graph the str of stroke over the length of stroke

◆ GetPredefinedSizeEnable()

virtual BOOL GetPredefinedSizeEnable ( )
pure virtual

get whether a predefined radius is enabled for a stroke.

A predefined radius stroke lets the user graph the radius of stroke over the length of stroke

◆ SetPredefinedSizeEnable()

virtual void SetPredefinedSizeEnable ( BOOL  enable)
pure virtual

set whether a predefined radius is enabled for a stroke.

A predefined radius stroke lets the user graph the radius of stroke over the length of stroke

◆ GetPredefineSizeStrokeGraph()

virtual ICurve* GetPredefineSizeStrokeGraph ( )
pure virtual

get the predefined radius graph set for a stroke.

A predefined radius stroke lets the user graph the radius of stroke over the length of stroke

◆ GetPredefineStrStrokeGraph()

virtual ICurve* GetPredefineStrStrokeGraph ( )
pure virtual

get the predefined strength graph set for a stroke.

A predefined strength stroke lets the user graph the strength of stroke over the length of stroke

◆ GetNormalScale()

virtual float GetNormalScale ( )
pure virtual

◆ SetNormalScale()

virtual void SetNormalScale ( float  scale)
pure virtual

◆ GetMarkerEnable()

virtual BOOL GetMarkerEnable ( )
pure virtual

◆ SetMarkerEnable()

virtual void SetMarkerEnable ( BOOL  on)
pure virtual

◆ GetMarker()

virtual float GetMarker ( )
pure virtual

◆ SetMarker()

virtual void SetMarker ( float  pos)
pure virtual

◆ GetOffMeshHitType()

virtual int GetOffMeshHitType ( )
pure virtual

Returns the mesh hit type.

Returns
One of the following values:
  • 0 = creates a plance based on your last hit point and normal
  • 1 = a zdepth into the screen
  • 2 = a point in world space aligned to current view

◆ SetOffMeshHitType()

virtual void SetOffMeshHitType ( int  type)
pure virtual

Sets the mesh hit type.

Parameters
type- One of the following values:
  • 0 = creates a plance based on your last hit point and normal
  • 1 = a zdepth into the screen
  • 2 = a point in world space aligned to current view

◆ GetOffMeshHitZDepth()

virtual float GetOffMeshHitZDepth ( )
pure virtual

◆ SetOffMeshHitZDepth()

virtual void SetOffMeshHitZDepth ( float  depth)
pure virtual

◆ GetOffMeshHitPos()

virtual Point3 GetOffMeshHitPos ( )
pure virtual

◆ SetOffMeshHitPos()

virtual void SetOffMeshHitPos ( Point3  pos)
pure virtual