THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/08/2009 at 07:52, xxxxxxxx wrote:
Here is the code up to this function.
> `
\>
\> /////////////////////////////////////////////////////////////
\> // TrueSymmetry
\>
\> #include "c4d.h"
\> #include "c4d_symbols.h"
\> #include "ttruesymmetry.h"
\> #include "truesymmetry.h"
\>
\> #include "lib_description.h"
\> #include "customgui_priority.h"
\>
\> const Real DELTA=0.001f;
\>
\> class TrueSymmetry : public TagData
\> {
\> Bool blnMessages;
\> Bool blnSymmetryActive;
\> Bool blnSymmetryDirty;
\> Bool blnTest;
\>
\>
\>
\> Bool IsSymmetrical(BaseObject* obj , BaseContainer* data);
\> Bool InitSymmetryPoints(BaseObject* obj,BaseContainer* data);
\> Bool InitSymmetryPolygons(BaseObject* obj,BaseContainer* data);
\> Bool IsPartner(const Vector * arrPoints, LONG lngI, LONG lngJ, LONG lngSymPlane);
\> Bool OnSymmetryPlane(const Vector * arrPoints, LONG lngI, LONG lngSymPlane);
\> Bool PointOnEditableSide(const Vector * arrPoints, LONG lngI, LONG lngSymPlane, LONG lngMirroredSide,bool blnIncNul);
\> Bool PolyOnEditableSide(const Vector * arrPoints, const CPolygon * arrPolygons,LONG lngI, LONG lngSymPlane, LONG lngMirroredSide);
\> Bool PolygonStillExists(const CPolygon * arrPolygons, LONG lngOldPoly);
\> LONG FindLastKnowPolyPartner(const CPolygon * arrPolygons,LONG lngOldPoly);
\> LONG FindPolyPartner(const CPolygon * arrPolygons, LONG lngPolygonCount,LONG lngPoly);
\>
\> Bool ResetPointsOnSymPlane(PolygonObject* objPoly,BaseContainer* data);
\> Bool UpdateSymmetryPositions(PolygonObject* objPoly,BaseContainer* data);
\> Bool CreateSymmetry(BaseObject* obj ,BaseContainer* data);
\> Bool ReInitSymmetry(BaseObject* obj,BaseContainer* data);
\>
\> Vector GetVirtualPartnerPos( Vector * arrPoints, LONG lngI, LONG lngSymPlane);
\> CPolygon GetVirtualPartnerPolygon(CPolygon * arrPolygons, LONG lngPoly);
\>
\> LONG * arrPartners;
\> Vector * arrLastKnownPos;
\> CPolygon* arrLastKnownPolygons;
\> LONG lngLastKnownPointCount;
\> LONG lngLastKnownPolygonCount;
\>
\> public:
\> virtual Bool Init(GeListNode *node);
\> virtual void Free(GeListNode *node);
\> virtual Bool GetDDescription(GeListNode *node, Description *description,LONG &flags;);
\> virtual Bool Message(GeListNode *node, LONG type, void *data);
\> virtual LONG Execute(PluginTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, LONG priority, LONG flags);
\> virtual Bool GetDEnabling(GeListNode *node, const DescID &id;,GeData &t;_data,LONG flags,const BaseContainer *itemdesc);
\>
\> //FOR SHOWING SYMMETRY PLANE
\> virtual LONG Draw(PluginTag* tag, BaseDocument *doc, BaseContainer &data;, BaseDraw *bd, BaseDrawHelp *bh, BaseThread *bt,LONG flags);
\>
\>
\> static NodeData *Alloc(void) { return gNew TrueSymmetry; }
\>
\> };
\>
\> //FOR DRAWING THE SYMMETRY PLANE
\> /////////////////////////////////////////////////////////////////////////////////////////
\> LONG TrueSymmetry::Draw(PluginTag* tag, BaseDocument *doc, BaseContainer &data;, BaseDraw *bd, BaseDrawHelp *bh, BaseThread *bt,LONG flags)
\> {
\>
\>
\>
\> if (tag->GetDataInstance()->GetBool(SHOW_PLANE)) // draw
\> {
\>
\> Vector p[4] = { Vector(-100,0,0),Vector(100,0,0),Vector(-100,100,0),Vector(100,100,0)};
\> Vector f[3] = { Vector(1,0,0),Vector(1,0,0),Vector(1,0,0)};
\> bd->Polygon3D(p,f,TRUE);
\> GePrint ("It's Checked");
\> }
\> else
\> {
\> GePrint ("Not Checked");
\> }
\> return DRAW_HANDLES|DRAW_AXIS;
\>
\>
\>
\>
\>
\> }
\>
\>
\> /////////////////////////////////////////////////////////////////////////////////////////
\>
\>
\>
`
If this does not show the problem I can email you the whole contents of the .cpp file if you PM me your email.
Thanks so much Matthias for taking the time to help me out.
~Shawn