SculptObject Class Reference

#include <lib_sculpt.h>

Inheritance diagram for SculptObject:

Detailed Description

A SculptObject is used to interact with the data referenced by a SculptTag.
The SculptTag on a PolygonObject references a SculptObject that is stored in a Scene Hook within the document.
When the SculptTag is deleted the referenced SculptObject is also deleted.

Public Member Functions

Int32 GetSubdivisionCount ()
 
PolygonObjectGetPolygonCopy (Int32 subdivisionLevel, Bool includeTopLevels=true)
 
PolygonObjectGetOriginalObject ()
 
PolygonObjectGetDisplayPolygonObject ()
 
Bool Hit (BaseDraw *bd, Float mx, Float my, Bool backfaces, SculptHitData &hitData)
 
Bool Hit (const Vector &rayp, const Vector &rayv, Bool backfaces, SculptHitData &hitData)
 
Int32 GetPolygonCount ()
 
Int32 GetPointCount ()
 
SculptLayerBaseGetCurrentLayer ()
 
Int32 GetCurrentLevel ()
 
UInt32 GetMemoryUsage ()
 
SculptLayerAddLayer ()
 
SculptFolderAddFolder ()
 
Bool DeleteSelectedLayer ()
 
void Update ()
 
const Vector32GetVertexNormals ()
 
const Vector32GetFaceNormals ()
 
const VectorGetPointR ()
 
VectorGetPointW ()
 
Bool Subdivide ()
 
Bool IncreaseSubdivisionLevel ()
 
Bool DecreaseSubdivisionLevel ()
 
SculptLayerBaseGetFirstLayer ()
 
SculptLayerGetBaseLayer ()
 
SculptLayerSystemGetLayerSystem ()
 
Bool IsFrozen ()
 
void SetFrozen (Bool value)
 
Bool GetAllowDeformations ()
 
void SetAllowDeformations (Bool value)
 
void UpdateCollision ()
 
void NeedCollisionUpdate (Bool fullUpdate=false)
 
void OffsetPoint (SculptLayer *pLayer, Vector *pPoints, Bool useMask, Float strength, Int32 index, const Vector &offset, Bool respectLayerStrength=false)
 
void OffsetPreviewPoint (SculptLayer *pLayer, Bool useMask, Float strength, Int32 index, const Vector &offset, Bool respectLayerStrength=false)
 
void SetPreviewPoint (SculptLayer *pLayer, Bool useMask, Float strength, Int32 index, const Vector &offset, Bool respectLayerStrength=false)
 
void StartUndo ()
 
void EndUndo ()
 
void Smooth (Int32 count, Bool respectMask)
 
Float32GetMaskCache ()
 
Float32 PointPolysAverage (Int32 vertex, Float32 *values)
 
Vector PointPolysAverage (Int32 vertex, Vector *values)
 
void UpdateMask (Bool fullUpdate=false)
 
void InitOpenGL (BaseDraw *bd=nullptr)
 
Bool IsPointSelected (Int32 index)
 
Bool IsPolygonSelected (Int32 index)
 
Bool GetPolygon (Int32 index, CPolygon &cpoly)
 
- Public Member Functions inherited from BaseList2D
const CharGetViewportRenderId (VIEWPORT_RENDER_ID typeId) const
 
BaseList2DGetNext ()
 
BaseList2DGetPred ()
 
void SetBit (Int32 mask)
 
Bool GetBit (Int32 mask) const
 
void DelBit (Int32 mask)
 
void ToggleBit (Int32 mask)
 
Int32 GetAllBits () const
 
void SetAllBits (Int32 bits)
 
void SetBitEx (Int32 mask, Int32 flags)
 
BaseContainer GetData ()
 
void SetData (const BaseContainer &bc, Bool add=true)
 
const BaseContainerGetDataInstance () const
 
BaseContainerGetDataInstance ()
 
const BaseContainerGetDataInstanceRef () const
 
BaseContainerGetDataInstanceRef ()
 
String GetName () const
 
void SetName (const maxon::String &name)
 
String GetBubbleHelp ()
 
Bool TransferGoal (BaseList2D *dst, Bool undolink)
 
Bool TransferMarker (BaseList2D *dst) const
 
Bool Scale (Float scale)
 
Bool Edit ()
 
void GetIcon (IconData *dat)
 
GeListHeadGetNLARoot ()
 
BaseList2DAnimationLayerRemap (BaseObject **layer=nullptr)
 
String GetTypeName ()
 
BaseList2DGetMain () const
 
void InsertTrackSorted (CTrack *track)
 
Bool AddEventNotification (BaseList2D *bl, NOTIFY_EVENT eventid, NOTIFY_EVENT_FLAG flags, const BaseContainer *data)
 
Bool RemoveEventNotification (BaseDocument *doc, BaseList2D *bl, NOTIFY_EVENT eventid)
 
Bool FindEventNotification (BaseDocument *doc, BaseList2D *bl, NOTIFY_EVENT eventid)
 
Bool SetDescIDState (const DescID &id, DESCIDSTATE descidstate)
 
DESCIDSTATE GetDescIDState (const DescID &id, Bool tolerant) const
 
GeListHeadGetOverrideRoot ()
 
BaseOverrideGetFirstOverride ()
 
GeListHeadGetShaderRepositoryRoot ()
 
GeListHeadGetHiddenShaderRoot ()
 
maxon::NimbusInterface * GetNimbusRef (const maxon::Id &spaceId) const
 
maxon::Result< maxon::NimbusInterface * > GetOrCreateNimbusRef (const maxon::Id &spaceId)
 
void RemoveNimbusRef (const maxon::Id &spaceId)
 
maxon::Result< maxon::HashMap< maxon::Id, maxon::ForwardRef< maxon::NimbusRef > > > GetAllNimbusRefs () const
 
Bool IsNodeBased () const
 
void GetMarkerStampEx (UInt32 *l1, UInt32 *l2)
 
const GeMarkerGetMarker () const
 
void SetMarker (const GeMarker &m)
 
Bool AddUniqueID (Int32 appid, const Char *const mem, Int bytes)
 
Bool FindUniqueID (Int32 appid, const Char *&mem, Int &bytes) const
 
Int32 GetUniqueIDCount () const
 
Bool GetUniqueIDIndex (Int32 idx, Int32 &id, const Char *&mem, Int &bytes) const
 
Bool SetAnimatedParameter (CTrack *track, const DescID &id, const GeData &t_data1, const GeData &t_data2, Float mix, DESCFLAGS_SET flags)
 
Bool GetAnimatedParameter (const DescID &id, GeData &t_data1, GeData &t_data2, Float &mix, DESCFLAGS_GET flags)
 
BaseShaderGetFirstShader () const
 
void InsertShader (BaseShader *shader, BaseShader *pred=nullptr)
 
void ClearKeyframeSelection ()
 
Bool FindKeyframeSelection (const DescID &id)
 
Bool SetKeyframeSelection (const DescID &id, Bool selection)
 
Bool KeyframeSelectionContent ()
 
LayerObjectGetLayerObject (BaseDocument *doc)
 
Bool SetLayerObject (LayerObject *layer)
 
const LayerDataGetLayerData (BaseDocument *doc, Bool rawdata=false)
 
Bool SetLayerData (BaseDocument *doc, const LayerData &data)
 
GeListHeadGetCTrackRoot ()
 
CTrackGetFirstCTrack ()
 
CTrackFindCTrack (const DescID &id)
 
- Public Member Functions inherited from GeListNode
GeListNodeGetNext ()
 
GeListNodeGetPred ()
 
GeListNodeGetDown ()
 
GeListNodeGetUp ()
 
GeListNodeGetDownLast ()
 
void InsertBefore (GeListNode *bl)
 
void InsertAfter (GeListNode *bl)
 
void InsertUnder (GeListNode *bl)
 
void InsertUnderLast (GeListNode *bl)
 
void Remove ()
 
GeListHeadGetListHead ()
 
Int32 GetNodeID (Int32 index=0) const
 
template<typename CAST >
const CAST * GetNodeData (Int32 index=0) const
 
template<typename CAST >
CAST * GetNodeData (Int32 index=0)
 
void SetCustomData (GeListNode *node)
 
GeListNodeGetCustomData ()
 
BaseDocumentGetDocument ()
 
Int32 GetBranchInfo (BranchInfo *info, Int32 max, GETBRANCHINFO flags)
 
Bool IsDocumentRelated ()
 
Int32 GetInfo ()
 
Bool GetNBit (NBIT bit) const
 
UInt32 GetNBitMask (Int32 index) const
 
Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
 
- Public Member Functions inherited from C4DAtom
Int32 GetType () const
 
Int32 GetRealType () const
 
Int32 GetDiskType () const
 
Bool IsInstanceOf (Int32 id) const
 
Int32 GetClassification () const
 
Bool Message (Int32 type, void *data=nullptr)
 
Bool MultiMessage (MULTIMSG_ROUTE flags, Int32 type, void *data)
 
C4DAtomGetClone (COPYFLAGS flags, AliasTrans *trn)
 
Bool CopyTo (C4DAtom *dst, COPYFLAGS flags, AliasTrans *trn)
 
Bool Read (HyperFile *hf, Int32 id, Int32 level)
 
Bool Write (HyperFile *hf)
 
Bool ReadObject (HyperFile *hf, Bool readheader)
 
Bool WriteObject (HyperFile *hf)
 
Bool GetDescription (Description *description, DESCFLAGS_DESC flags)
 
Bool GetParameter (const DescID &id, GeData &t_data, DESCFLAGS_GET flags)
 
Bool SetParameter (const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
 
DynamicDescriptionGetDynamicDescription ()
 
Bool GetEnabling (const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc)
 
Bool TranslateDescID (const DescID &id, DescID &res_id, C4DAtom *&res_at)
 
UInt32 GetDirty (DIRTYFLAGS flags) const
 
void SetDirty (DIRTYFLAGS flags)
 
UInt32 GetHDirty (HDIRTYFLAGS mask) const
 
void SetHDirty (HDIRTYFLAGS mask)
 

Private Member Functions

 SculptObject ()
 
 ~SculptObject ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseList2D
static BaseList2DAlloc (Int32 type)
 
static void Free (BaseList2D *&bl)
 
- Static Public Attributes inherited from BaseList2D
static const Int32 SETBIT_FLAG_NODIRTY
 
static const Int32 SETBIT_FLAG_REMOVE
 

Constructor & Destructor Documentation

◆ SculptObject()

SculptObject ( )
private

◆ ~SculptObject()

~SculptObject ( )
private

Member Function Documentation

◆ GetSubdivisionCount()

Int32 GetSubdivisionCount ( )

Gets the number of Subdivisions that the SculptObject currently has, i.e. how many times it has been subdivided by the user.

Returns
The number of subdivision levels.

◆ GetPolygonCopy()

PolygonObject* GetPolygonCopy ( Int32  subdivisionLevel,
Bool  includeTopLevels = true 
)

Gets a copy of the SculptObject at a specific subdivision level.

Note
The returned object does not contain a copy of the SculptTag.
Parameters
[in]subdivisionLevelThe subdivision level to copy the PolyonObject at.
[in]includeTopLevelsIf True includes all the detail from any layers that are above subdivisionLevel.
If false includes only the sculpting data for all layers up to and including the subdivisionLevel specified.
Returns
The PolygonObject for the subdivision level. The caller owns the pointed PolygonObject.

◆ GetOriginalObject()

PolygonObject* GetOriginalObject ( )

Gets the original PolygonObject that the SculptTag is applied to.

Returns
The original PolygonObject that the SculptTag is applied to. The document owns the pointed PolygonObject.

◆ GetDisplayPolygonObject()

PolygonObject* GetDisplayPolygonObject ( )

Gets the PolygonObject that is currently being displayed in the viewport.

Note
In SculptBrushToolData::FloodSelectedLayer() calls this returns the same as GetOriginalObject() when sculpting on Polygon Objects that have no SculptTag.
Returns
The PolygonObject displayed in the viewport. This is the internal Polygon Object and should never be changed!

◆ Hit() [1/2]

Bool Hit ( BaseDraw bd,
Float  mx,
Float  my,
Bool  backfaces,
SculptHitData hitData 
)

From a viewport cast a ray, in screen space, onto the SculptObject and return any data if the ray hits the object.

Note
Returns the closest hit point if multiple intersections are found.
Warning
To use the Hit() methods the mesh must be unfrozen and both NeedCollisionUpdate(true) and UpdateCollision() should be called to initialize the collision data.
Parameters
[in]bdThe view that the user is casting the ray from. The caller owns the pointed view.
[in]mxThe X coordinate (mouse coordinate) in screen space.
[in]myThe Y coordinate (mouse coordinate) in screen space.
[in]backfacestrue to allow back facing polygons to be hit tested.
If enabled and the back facing hit point is closer than the front hit point, then it is returned.
[out]hitDataFilled with the intersection data if the ray hits the object.
Returns
true if the SculptObject was hit, otherwise false.

◆ Hit() [2/2]

Bool Hit ( const Vector rayp,
const Vector rayv,
Bool  backfaces,
SculptHitData hitData 
)

Given a ray in object space do a hit intersection against the SculptObject and return any data if the ray hits the object.

Note
Returns the closest hit point if multiple intersections are found.
Warning
To use the Hit() methods the mesh must be unfrozen and both NeedCollisionUpdate(true) and UpdateCollision() should be called to initialize the collision data.
Parameters
[in]raypThe starting position of the ray in object space.
[in]rayvThe direction the ray is pointing.
[in]backfacestrue to allow back facing polygons to be hit tested.
If enabled and the back facing hit point is closer than the front hit point, then it is returned.
[out]hitDataFilled with the intersection data if the ray hits the object.
Returns
true if the SculptObject was hit, otherwise false.

◆ GetPolygonCount()

Int32 GetPolygonCount ( )

Gets the number of polygons at the current subdivision level.

Returns
The number of polygons.

◆ GetPointCount()

Int32 GetPointCount ( )

Gets the number of points at the current subdivision level.

Returns
The number of points.

◆ GetCurrentLayer()

SculptLayerBase* GetCurrentLayer ( )

Gets the currently selected layer, or folder, selected for the SculptObject.

Returns
The currently selected layer or folder.

◆ GetCurrentLevel()

Int32 GetCurrentLevel ( )

Gets the current subdivision level that the SculptObject is currently at.

Returns
The current subdivision level.

◆ GetMemoryUsage()

UInt32 GetMemoryUsage ( )

Gets the amount of memory currently used for the SculptObject. This does not include any memory used by OpenGL.

Returns
The memory used in bytes.

◆ AddLayer()

SculptLayer* AddLayer ( )

Creates a new layer on the SculptObject at the current subdivision level.

Returns
The added layer. The SculptObject owns the pointed SculptLayer.

◆ AddFolder()

SculptFolder* AddFolder ( )

Creates a new folder for the SculptObject.

Returns
The added folder. The SculptObject owns the pointed SculptFolder.

◆ DeleteSelectedLayer()

Bool DeleteSelectedLayer ( )

Deletes the currently selected layer (or folder) on the SculptObject (as specified in the Sculpt Layer Manager UI).

Note
If the currently selected layer is a folder then it will only delete the folder if all the layers that are contained in that folder are at the same subdivision level as the current subdivision level.
Returns
true if the layer was deleted, otherwise false.

◆ Update()

void Update ( )

Updates all the layers and the SculptObject.

◆ GetVertexNormals()

const Vector32* GetVertexNormals ( )

Gets the vertex normals for the PolygonObject at its current subdivision level.

Returns
The vertex normals.

◆ GetFaceNormals()

const Vector32* GetFaceNormals ( )

Gets the face normals for the PolygonObject at its current subdivision level.

Since
R17.032
Returns
The face normals.

◆ GetPointR()

const Vector* GetPointR ( )

Gets read only access to the points that will be used for the PolygonObject at its current subdivision level.

Returns
The points.

◆ GetPointW()

Vector* GetPointW ( )

Gets write access to the points that will be used for the display of the PolygonObject at the current subdivision level in the viewport.

Warning
This method should only be used with the call OffsetPoint(), which should only ever be called from SculptBrushToolData::FloodSelectedLayer().
Returns
The points.

◆ Subdivide()

Bool Subdivide ( )

Subdivides the SculptObject to the next level.

Warning
Only works if the SculptObject is already at the top most level and the memory limit (as specified in the preferences) has not been exceeded and also only if there is enough memory on the users computer to successfully do the subdivision.
Returns
true if the object was successfully subdivided, otherwise false.

◆ IncreaseSubdivisionLevel()

Bool IncreaseSubdivisionLevel ( )

Increases the subdivision level to the next highest level. If it is already at the top subdivision level then it will do nothing.

Returns
true if it was able go up a level, otherwise false.

◆ DecreaseSubdivisionLevel()

Bool DecreaseSubdivisionLevel ( )

Decreases the subdivision level to the down one level. If it is already at level 0 then it will do nothing.

Returns
true if it was able go down a level, otherwise false.

◆ GetFirstLayer()

SculptLayerBase* GetFirstLayer ( )

Gets the first layer under the SculptLayerSystem. This is usually the Base layer.

Returns
The first layer.

◆ GetBaseLayer()

SculptLayer* GetBaseLayer ( )

Gets the Base layer, which is the special layer that has multiple SculptLayerData children, one for each subdivision level, that allows the user to sculpt on while at any subdivision level.

Returns
The Base layer.

◆ GetLayerSystem()

SculptLayerSystem* GetLayerSystem ( )

Gets the layer system that contains all the layers. This is a child node of the SculptObject.

Returns
The layer system.

◆ IsFrozen()

Bool IsFrozen ( )

Checks if the SculptObject been frozen. In the UI this is shown in the SculpTag.

Returns
true if the object was frozen, otherwise false.

◆ SetFrozen()

void SetFrozen ( Bool  value)

Sets the frozen state of the SculptObject. In the UI this is shown in the SculpTag.
When the object is frozen no changes to the SculptObject or any of its layers are allowed.

Note
If the PolygonObject has a PhongTag it will also become active when the SculptObject is Frozen.
When not Frozen then SculptObject uses its own internal Vertex Normals and disables the PhongTag on the PolygonObject.
Parameters
[in]valueThe frozen state.

◆ GetAllowDeformations()

Bool GetAllowDeformations ( )

Checks if the object is allowed to be deformed by any deformers. In the UI this is shown in the SculpTag.

Note
This option only works if the object is also Frozen. When both these options are enabled, any deformers that are children of the PolygonObject that the SculptTag is applied to, will be able to deform the object in the viewport.
Returns
true if the object was frozen, otherwise false.

◆ SetAllowDeformations()

void SetAllowDeformations ( Bool  value)

Sets the "Allow Deformations" checkbox thereby allowing any deformers to have an effect on the display of the SculptObject, as long as it is also frozen.
In the UI this is shown in the SculpTag.

Parameters
[in]valueThe "Allow Deformations" state.

◆ UpdateCollision()

void UpdateCollision ( )

Updates any collision data after any changes to the SculptLayer Offsets have been made.

Warning
This is required before calling the Hit() methods.

◆ NeedCollisionUpdate()

void NeedCollisionUpdate ( Bool  fullUpdate = false)

Tells the SculptObject that it requires a collision update before the user tries to use any of the Sculpt tools.
Then next time a user tries to use a tool it will first call UpdateCollision() to ensure that the Hit() calls will be correct.

Parameters
[in]fullUpdatetrue to update the full mesh, this is not always required.

◆ OffsetPoint()

void OffsetPoint ( SculptLayer pLayer,
Vector pPoints,
Bool  useMask,
Float  strength,
Int32  index,
const Vector offset,
Bool  respectLayerStrength = false 
)

Offsets a point on the layer when when the interactive flood operation has finished. This is called on the SculptObject by the Sculpt tools.

Warning
Should only be called from within SculptBrushToolData::FloodSelectedLayer().
Parameters
[in]pLayerThe SculptLayer that the brush is operating on.
[in]pPointsThe points from the call to GetPoints() which are used to directly effect the drawing of the SculptObject in the viewport.
[in]useMasktrue to respect the Mask on the Layer or not.
[in]strengthThe strength of the SculptLayer.
[in]indexThe index of the point on the PolygonObject for the current subdivision level.
[in]offsetThe offset to apply to the preview layer.
[in]respectLayerStrengthtrue to respect the strength of the layer or ignore it updating the mesh on screen.

◆ OffsetPreviewPoint()

void OffsetPreviewPoint ( SculptLayer pLayer,
Bool  useMask,
Float  strength,
Int32  index,
const Vector offset,
Bool  respectLayerStrength = false 
)

Adds to the value of the offset on the preview layer when used to do interactive flood updates on the SculptObject by the Sculpt tools.

Warning
Should only be called from within SculptBrushToolData::FloodSelectedLayer().
Parameters
[in]pLayerThe SculptLayer that the brush is operating on.
[in]useMasktrue to respect the Mask on the Layer or not.
[in]strengthThe strength of the SculptLayer.
[in]indexThe index of the point on the PolygonObject for the current subdivision level.
[in]offsetThe offset to apply to the preview layer.
[in]respectLayerStrengthtrue to respect the strength of the layer or ignore it updating the mesh on screen.

◆ SetPreviewPoint()

void SetPreviewPoint ( SculptLayer pLayer,
Bool  useMask,
Float  strength,
Int32  index,
const Vector offset,
Bool  respectLayerStrength = false 
)

Sets the value of the offset on the preview layer when used to do interactive flood updates on the SculptObject by the Sculpt tools.

Warning
Should only be called from within SculptBrushToolData::FloodSelectedLayer()
Parameters
[in]pLayerThe SculptLayer that the brush is operating on.
[in]useMasktrue to respect the Mask on the Layer or not.
[in]strengthThe strength of the SculptLayer.
[in]indexThe index of the point on the PolygonObject for the current subdivision level.
[in]offsetThe offset to set on the preview layer.
[in]respectLayerStrengthtrue to respect the strength of the layer or ignore it updating the mesh on screen.

◆ StartUndo()

void StartUndo ( )

Calls before any calls to AddOffset(), SetOffset(), AddToMask() or SetMask() to be undone.

Warning
This will only work if making changes to a single layer. Changes to multiple layers or layers at different levels is not allowed.
This must be done at the current subdivision level of the layer being changed for these calls to work properly.
EndUndo() must be called after all calls to the above methods have been done.
This must NEVER be called by a Sculpt brush during a stroke.

◆ EndUndo()

void EndUndo ( )

Must be called after StartUndo() once all the point and masks have been changed on the layers.

Warning
This must NEVER be called by a Sculpt brush during a stroke.

◆ Smooth()

void Smooth ( Int32  count,
Bool  respectMask 
)

Smooths the SculptObject and applies the offsets to the currently selected layer.

Parameters
[in]countThe number of times to run the smooth algorithm.
[in]respectMaskIf true it will not smooth any masked out points, if false it will apply it to every point.

◆ GetMaskCache()

Float32* GetMaskCache ( )

Gets the current mask values for the PolygonObject.
The number of points returned is equal to the number of points on the PolygonObject.

Returns
The mask values.

◆ PointPolysAverage() [1/2]

Float32 PointPolysAverage ( Int32  vertex,
Float32 values 
)

Averages out the values for the vertex on the PolygonObject.

Parameters
[in]vertexThe vertex number on the PolygonObject to get the average value for.
[in]valuesThe values to average out. This must contain the same number of values as there are points on the PolygonObject.
Returns
The mask values.

◆ PointPolysAverage() [2/2]

Vector PointPolysAverage ( Int32  vertex,
Vector values 
)

Averages out the values for the vertex on the PolygonObject.

Parameters
[in]vertexThe vertex number on the PolygonObject to get the average value for.
[in]valuesThe values to average out. This must contain the same number of values as there are points on the PolygonObject.
Returns
The mask values.

◆ UpdateMask()

void UpdateMask ( Bool  fullUpdate = false)

Updates the mask on the SculptObject.

Parameters
[in]fullUpdatetrue to force a full update of the mask.

◆ InitOpenGL()

void InitOpenGL ( BaseDraw bd = nullptr)

Private.
Initializes the SculptObject for the given viewport in OpenGL use.

Parameters
[in]bdThe viewport that is being updated. If it is nullptr then the currently active view will be used.

◆ IsPointSelected()

Bool IsPointSelected ( Int32  index)

Determines if a point should be moved or not in the SculptBrushToolData::FloodSelectedLayer() method.

Note
When in Point mode, and there is a selection, it returns true if a point is selected or false if the point is not selected.
If there are no points selected it returns true. When in Polygon mode, and there is a selection, it returns true if a point on any of the selected polygons is selected or false if there is no point selected.
If there are no polygons selected it returns true.
Warning
This method only works when the selected object being sculpted on is by a tool and is a PolygonObject without a SculptTag.
It returns false in all other cases.
Parameters
[in]indexThe index of the point on the object: 0<= index < GetPointCount()
Returns
true if the point was selected, otherwise false.

◆ IsPolygonSelected()

Bool IsPolygonSelected ( Int32  index)

Determines if a polygon should be moved or not in the SculptBrushToolData::FloodSelectedLayer() method.

Note
When in Polygon mode, and there is a selection, it returns true if a point on any of the selected polygons is selected or false if there is no point selected.
If there are no polygons selected it returns true.
Warning
This method only works when the selected object being sculpted on is by a tool and is a PolygonObject without a SculptTag.
It returns false in all other cases.
Parameters
[in]indexThe index of the polygon on the object: 0<= index < GetPolygonCount()
Returns
true if the polygon was selected, otherwise false.

◆ GetPolygon()

Bool GetPolygon ( Int32  index,
CPolygon cpoly 
)

Gets the polygon data at the given index.

Parameters
[in]indexThe index of the polygon on the object: 0<= index < GetPolygonCount()
[out]cpolyFilled with the polygon data.
Returns
True if the polygon was found, false if not.