#include <TCollection_ExtendedString.hxx>
#include <Font_FontAspect.hxx>
-typedef void (*minMaxValuesCallback)(void*);
+class Visual3d_View;
+
class Graphic3d_CGraduatedTrihedron
{
- public:
+public:
+ typedef void (*minMaxValuesCallback)(Visual3d_View*);
+public:
/* Default constructor. Nullifies the view pointer */
Graphic3d_CGraduatedTrihedron () : xdrawname ( Standard_False ),
ydrawname ( Standard_False ),
/* Callback function to define boundary box of displayed objects */
minMaxValuesCallback cbCubicAxes;
- void* ptrVisual3dView;
+ Visual3d_View* ptrVisual3dView;
};
const Handle(Standard_Type)& TYPE(Graphic3d_CGraduatedTrihedron);
cout<<"----------- IntPatch_Point : "<<endl;
Standard_Real u1,v1,u2,v2;
pt.Parameters(u1,v1,u2,v2);
-#if 0
- cout<<"IntSurf_PntOn2S : Pnt ("<<pt.Value().X()
- <<","<<pt.Value().Y()<<","<<pt.Value().Z()<<")"<<endl;
- cout<<" u1:"<<u1; cout<<" u2:"<<u2;
- cout<<" v1:"<<v1;
- cout<<" v2:"<<v2<<endl;
- cout<<" para("<<para<<")";
- cout<<" mult("<<mult<<")";
- cout<<" OnS1("<<onS1<<")";
- cout<<" VtxOnS1("<<vtxonS1<<")"<<endl;
- cout<<" OnS2("<<onS2<<")";
- cout<<" VtxOnS2("<<vtxonS2<<")";
- cout<<" prm1("<<prm1<<")";
- cout<<" prm2("<<prm2<<")";
-#else
-#ifndef DEB // for porting on linux
printf("P(%15.10f,%15.10f,%15.10f) UV1(%15.10f,%15.10f) UV2(%15.10f,%15.10f) (Para:%15.10f)\n",
(double)(pt.Value().X()),
(double)(pt.Value().Y()),
(double)(pt.Value().Z()),
(double)u1,(double)v1,(double)u2,(double)v2,(double)para);
- if(onS1) { printf("*OnS1* par=%15.10f arc1=%10lu",(double)prm1,
- *((long unsigned *)(((Handle_Standard_Transient *)(&arcS1))))
- ); }
- if(vtxonS1) { printf(" *Vtx1* vtx1=%10lu",
- *((long unsigned *)(((Handle_Standard_Transient *)(&vS1))))); }
- if(onS1 || vtxonS1) printf("\n");
- if(onS2) { printf("*OnS2* par=%15.10f arc2=%10lu",(double)prm2,
- *((long unsigned *)(((Handle_Standard_Transient *)(&arcS2))))); }
- if(vtxonS2) { printf(" *Vtx2* vtx2=%10lu",
- *((long unsigned *)(((Handle_Standard_Transient *)(&vS2))))); }
-
-#else // debug mode
- printf("P(%15.10lf,%15.10lf,%15.10lf) UV1(%15.10lf,%15.10lf) UV2(%15.10lf,%15.10lf) (Para:%15.10lf)\n",
- (double)(pt.Value().X()),
- (double)(pt.Value().Y()),
- (double)(pt.Value().Z()),
- (double)u1,(double)v1,(double)u2,(double)v2,(double)para);
- if(onS1) { printf("*OnS1* par=%15.10lf arc1=%10lu",(double)prm1,
- *((long unsigned *)(((Handle_Standard_Transient *)(&arcS1))))
- ); }
- if(vtxonS1) { printf(" *Vtx1* vtx1=%10lu",
- *((long unsigned *)(((Handle_Standard_Transient *)(&vS1))))); }
+ if(onS1)
+ printf("*OnS1* par=%15.10f arc1=%10p", (double)prm1, (void*)arcS1.operator->());
+ if(vtxonS1)
+ printf(" *Vtx1* vtx1=%10p", (void*)vS1.operator->());
if(onS1 || vtxonS1) printf("\n");
- if(onS2) { printf("*OnS2* par=%15.10lf arc2=%10lu",(double)prm2,
- *((long unsigned *)(((Handle_Standard_Transient *)(&arcS2))))); }
- if(vtxonS2) { printf(" *Vtx2* vtx2=%10lu",
- *((long unsigned *)(((Handle_Standard_Transient *)(&vS2))))); }
-
-#endif
- if(onS2 || vtxonS2) printf("\n");
+ if(onS2)
+ printf("*OnS2* par=%15.10f arc2=%10p", (double)prm2, (void*)arcS2.operator->());
+ if(vtxonS2)
+ printf(" *Vtx2* vtx2=%10lu", (void*)vS2.operator->());
+
+ if(onS2 || vtxonS2)
+ printf("\n");
fflush(stdout);
-
-#endif
+
if(onS1 || onS2) {
cout<<" tgt:"<<((tgt)? 1 : 0) <<" mult:"<<((mult)? 1 :0);
if(onS1) {
//! ReSize
void ReSize (const Standard_Integer N)
{
- DataMapNode** newdata = NULL;
- DataMapNode** dummy = NULL;
+ NCollection_ListNode** newdata = NULL;
+ NCollection_ListNode** dummy = NULL;
Standard_Integer newBuck;
- if (BeginResize (N, newBuck,
- (NCollection_ListNode**&)newdata,
- (NCollection_ListNode**&)dummy,
- this->myAllocator))
+ if (BeginResize (N, newBuck, newdata, dummy, this->myAllocator))
{
if (myData1)
{
}
}
}
- EndResize(N,newBuck,
- (NCollection_ListNode**&)newdata,
- (NCollection_ListNode**&)dummy,
- this->myAllocator);
+ EndResize (N, newBuck, newdata, dummy, this->myAllocator);
}
}
//! ReSize
void ReSize (const Standard_Integer N)
{
- DoubleMapNode** ppNewData1 = NULL;
- DoubleMapNode** ppNewData2 = NULL;
+ NCollection_ListNode** ppNewData1 = NULL;
+ NCollection_ListNode** ppNewData2 = NULL;
Standard_Integer newBuck;
- if (BeginResize (N, newBuck,
- (NCollection_ListNode**&)ppNewData1,
- (NCollection_ListNode**&)ppNewData2,
- this->myAllocator))
+ if (BeginResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator))
{
if (myData1)
{
iK2 = Hasher2::HashCode (p->Key2(), newBuck);
q = (DoubleMapNode*) p->Next();
p->Next() = ppNewData1[iK1];
- p->Next2() = ppNewData2[iK2];
+ p->Next2() = (DoubleMapNode*)ppNewData2[iK2];
ppNewData1[iK1] = p;
ppNewData2[iK2] = p;
p = q;
}
}
}
- EndResize(N,newBuck,
- (NCollection_ListNode**&)ppNewData1,
- (NCollection_ListNode**&)ppNewData2,
- this->myAllocator);
+ EndResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator);
}
}
//! ReSize
void ReSize (const Standard_Integer N)
{
- IndexedDataMapNode** ppNewData1 = NULL;
- IndexedDataMapNode** ppNewData2 = NULL;
+ NCollection_ListNode** ppNewData1 = NULL;
+ NCollection_ListNode** ppNewData2 = NULL;
Standard_Integer newBuck;
- if (BeginResize (N, newBuck,
- (NCollection_ListNode**&)ppNewData1,
- (NCollection_ListNode**&)ppNewData2,
- this->myAllocator))
+ if (BeginResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator))
{
if (myData1)
{
iK2 = ::HashCode (p->Key2(), newBuck);
q = (IndexedDataMapNode*) p->Next();
p->Next() = ppNewData1[iK1];
- p->Next2() = ppNewData2[iK2];
+ p->Next2() = (IndexedDataMapNode*)ppNewData2[iK2];
ppNewData1[iK1] = p;
ppNewData2[iK2] = p;
p = q;
}
}
}
- EndResize(N,newBuck,
- (NCollection_ListNode**&)ppNewData1,
- (NCollection_ListNode**&)ppNewData2,
- this->myAllocator);
+ EndResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator);
}
}
//! ReSize
void ReSize (const Standard_Integer N)
{
- IndexedMapNode** ppNewData1 = NULL;
- IndexedMapNode** ppNewData2 = NULL;
+ NCollection_ListNode** ppNewData1 = NULL;
+ NCollection_ListNode** ppNewData2 = NULL;
Standard_Integer newBuck;
- if (BeginResize (N, newBuck,
- (NCollection_ListNode**&)ppNewData1,
- (NCollection_ListNode**&)ppNewData2,
- this->myAllocator))
+ if (BeginResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator))
{
if (myData1)
{
if (p->Key2() > 0)
{
iK2 = ::HashCode (p->Key2(), newBuck);
- p->Next2() = ppNewData2[iK2];
+ p->Next2() = (IndexedMapNode*)ppNewData2[iK2];
ppNewData2[iK2] = p;
}
p = q;
}
}
}
- EndResize(N,newBuck,
- (NCollection_ListNode**&)ppNewData1,
- (NCollection_ListNode**&)ppNewData2,
- this->myAllocator);
+ EndResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator);
}
}
//! ReSize
void ReSize (const Standard_Integer N)
{
- MapNode** newdata = 0L;
- MapNode** dummy = 0L;
+ NCollection_ListNode** newdata = 0L;
+ NCollection_ListNode** dummy = 0L;
Standard_Integer newBuck;
- if (BeginResize (N, newBuck,
- (NCollection_ListNode**&)newdata,
- (NCollection_ListNode**&)dummy,
- this->myAllocator))
+ if (BeginResize (N, newBuck, newdata, dummy, this->myAllocator))
{
if (myData1)
{
}
}
}
- EndResize(N,newBuck,
- (NCollection_ListNode**&)newdata,
- (NCollection_ListNode**&)dummy,
- this->myAllocator);
+ EndResize (N, newBuck, newdata, dummy, this->myAllocator);
}
}
#include <OpenGl_Text.hxx>
#include <Graphic3d_CGraduatedTrihedron.hxx>
+class Visual3d_View;
class OpenGl_View;
class OpenGl_GraduatedTrihedron : public OpenGl_Element
TEL_COLOUR myXColor;
TEL_COLOUR myYColor;
TEL_COLOUR myZColor;
- minMaxValuesCallback myCbCubicAxes;
- void* myPtrVisual3dView;
+ Graphic3d_CGraduatedTrihedron::minMaxValuesCallback myCbCubicAxes;
+ Visual3d_View* myPtrVisual3dView;
public:
}
-Standard_Boolean checkFloat(const Standard_Real value)
+static Standard_Boolean checkFloat(const Standard_Real value)
{
return value > -FLT_MAX && value < FLT_MAX;
}
-void SetMinMaxValuesCallback(void* Visual3dView)
+static void SetMinMaxValuesCallback(Visual3d_View* theView)
{
Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
-
- Handle(Visual3d_View) view = (Handle(Visual3d_View)&) Visual3dView;
- view->MinMaxValues(xmin, ymin, zmin, xmax, ymax, zmax);
+ theView->MinMaxValues(xmin, ymin, zmin, xmax, ymax, zmax);
if (checkFloat(xmin) && checkFloat(ymin) && checkFloat(zmin) &&
checkFloat(xmax) && checkFloat(ymax) && checkFloat(zmax))
{
- Handle(Graphic3d_GraphicDriver) driver = Handle(Graphic3d_GraphicDriver)::DownCast(view->GraphicDriver());
+ Handle(Graphic3d_GraphicDriver) driver = Handle(Graphic3d_GraphicDriver)::DownCast(theView->GraphicDriver());
driver->GraduatedTrihedronMinMaxValues((Standard_ShortReal)xmin, (Standard_ShortReal)ymin, (Standard_ShortReal)zmin,
(Standard_ShortReal)xmax, (Standard_ShortReal)ymax, (Standard_ShortReal)zmax);
}
aNode = anElement.getNextSibling())
{
if (aNode.getNodeType() == LDOM_Node::TEXT_NODE) {
- LDOM_Text aText = (LDOM_Text&) aNode;
- LDOMString aData = aText.getData();
+ LDOMString aData = aNode.getNodeValue();
#ifdef USE_STL_STREAM
std::stringstream aStream (std::string(aData.GetString()));
#else