mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0023634: Eliminate Polyline and Polygon usage in drawers
Polylines and polygons removed, now everything is based on PrimitiveArrays. Added use of Graphic3d_ArrayOfSegments, some additional clean up in Graphic3d_Group. Dead code elimination in AIS and V3d Corrected compilation errors Fixed grid presentation Adding test case correction
This commit is contained in:
@@ -31,8 +31,6 @@ Graphic3d_Group.pxx
|
||||
Graphic3d_Group_1.cxx
|
||||
Graphic3d_Group_2.cxx
|
||||
Graphic3d_Group_3.cxx
|
||||
Graphic3d_Group_5.cxx
|
||||
Graphic3d_Group_7.cxx
|
||||
Graphic3d_Group_8.cxx
|
||||
Graphic3d_Group_10.cxx
|
||||
Graphic3d_Structure.pxx
|
||||
@@ -54,3 +52,5 @@ Graphic3d_BufferType.hxx
|
||||
Graphic3d_Vec2.hxx
|
||||
Graphic3d_Vec3.hxx
|
||||
Graphic3d_Vec4.hxx
|
||||
Graphic3d_Vertex.hxx
|
||||
Graphic3d_Vertex.cxx
|
||||
|
@@ -69,6 +69,7 @@ uses
|
||||
|
||||
TCollection,
|
||||
TColStd,
|
||||
TColgp,
|
||||
OSD,
|
||||
Quantity,
|
||||
Aspect,
|
||||
@@ -502,26 +503,10 @@ is
|
||||
---Purpose: 3d vector
|
||||
---Category: Classes
|
||||
|
||||
class Vertex;
|
||||
imported Vertex;
|
||||
---Purpose: 3d vertex
|
||||
---Category: Classes
|
||||
|
||||
class VertexN;
|
||||
---Purpose: 3d vertex with a normal vector
|
||||
---Category: Classes
|
||||
|
||||
class VertexNT;
|
||||
---Purpose: 3d vertex with a normal vector and texture coordinate
|
||||
---Category: Classes
|
||||
|
||||
class VertexC;
|
||||
---Purpose: 3d vertex with a colour
|
||||
---Category: Classes
|
||||
|
||||
class VertexNC;
|
||||
---Purpose: 3d vertex with a normal and a colour
|
||||
---Category: Classes
|
||||
|
||||
---------------------
|
||||
-- Category: Pointers
|
||||
---------------------
|
||||
@@ -589,38 +574,6 @@ is
|
||||
Array2 from TCollection (Vertex from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class Array1OfVertexC instantiates
|
||||
Array1 from TCollection (VertexC from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class Array2OfVertexC instantiates
|
||||
Array2 from TCollection (VertexC from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class Array1OfVertexN instantiates
|
||||
Array1 from TCollection (VertexN from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class Array2OfVertexN instantiates
|
||||
Array2 from TCollection (VertexN from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class Array1OfVertexNT instantiates
|
||||
Array1 from TCollection (VertexNT from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class Array2OfVertexNT instantiates
|
||||
Array2 from TCollection (VertexNT from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class Array1OfVertexNC instantiates
|
||||
Array1 from TCollection (VertexNC from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class Array2OfVertexNC instantiates
|
||||
Array2 from TCollection (VertexNC from Graphic3d);
|
||||
---Category: Instantiated classes
|
||||
|
||||
class ListOfShortReal instantiates
|
||||
List from TCollection (ShortReal from Standard);
|
||||
---Category: Instantiated classes
|
||||
|
@@ -85,7 +85,27 @@ is
|
||||
-- -------------------------------------------------------------------
|
||||
|
||||
AddVertex( me:mutable;
|
||||
aVertice: Pnt from gp)
|
||||
aVertice: Pnt from gp)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice in the array.
|
||||
-- returns the actual vertex number.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
---C++: inline
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: Real from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice in the array.
|
||||
-- returns the actual vertex number.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
---C++: inline
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: ShortReal from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice in the array.
|
||||
@@ -94,17 +114,8 @@ is
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: Real from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice in the array.
|
||||
-- returns the actual vertex number.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
|
||||
AddVertex( me:mutable;
|
||||
aVertice: Pnt from gp;
|
||||
aColor: Color from Quantity)
|
||||
aVertice: Pnt from gp;
|
||||
aColor: Color from Quantity)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex color in the vertex array.
|
||||
@@ -117,7 +128,7 @@ is
|
||||
AddVertex( me : mutable;
|
||||
aVertice : Pnt from gp;
|
||||
aColor : Integer from Standard)
|
||||
returns Integer from Standard
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex color in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
@@ -129,12 +140,37 @@ is
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
|
||||
|
||||
AddVertex( me :mutable;
|
||||
aVertice : Pnt from gp;
|
||||
aNormal : Dir from gp)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
aVertice : Pnt from gp;
|
||||
aNormal : Dir from gp)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex normal in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- Warning: <aNormal> is ignored when the <hasVNormals>
|
||||
-- constructor parameter is FALSE.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
---C++: inline
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: Real from Standard;
|
||||
NX,NY,NZ: Real from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex normal in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- Warning: <aNormal> is ignored when the <hasVNormals>
|
||||
-- constructor parameter is FALSE.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
---C++: inline
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: ShortReal from Standard;
|
||||
NX,NY,NZ: ShortReal from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex normal in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- Warning: <aNormal> is ignored when the <hasVNormals>
|
||||
@@ -143,23 +179,11 @@ is
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: Real from Standard;
|
||||
NX,NY,NZ: Real from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex normal in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- Warning: <aNormal> is ignored when the <hasVNormals>
|
||||
-- constructor parameter is FALSE.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
|
||||
AddVertex( me:mutable;
|
||||
aVertice: Pnt from gp;
|
||||
aNormal: Dir from gp;
|
||||
aColor: Color from Quantity)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
aVertice: Pnt from gp;
|
||||
aNormal: Dir from gp;
|
||||
aColor: Color from Quantity)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice,vertex normal and color in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- Warning: <aNormal> is ignored when the <hasVNormals>
|
||||
@@ -173,7 +197,7 @@ is
|
||||
aVertice : Pnt from gp;
|
||||
aNormal : Dir from gp;
|
||||
aColor : Integer from Standard)
|
||||
returns Integer from Standard
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice,vertex normal and color in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
@@ -186,25 +210,38 @@ is
|
||||
-- use this byte order.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
|
||||
|
||||
AddVertex( me:mutable;
|
||||
aVertice: Pnt from gp;
|
||||
aTexel: Pnt2d from gp)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
aVertice: Pnt from gp;
|
||||
aTexel: Pnt2d from gp)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex texture in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- <aTexel> is ignored when the <hasVTexels>
|
||||
-- constructor parameter is FALSE.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
---C++: inline
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: Real from Standard;
|
||||
TX,TY: Real from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
X,Y,Z: Real from Standard;
|
||||
TX,TY: Real from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex texture coordinates in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- <aTexel> is ignored when the <hasVTexels>
|
||||
-- constructor parameter is FALSE.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
---C++: inline
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: ShortReal from Standard;
|
||||
TX,TY: ShortReal from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice and vertex texture coordinates in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- <aTexel> is ignored when the <hasVTexels>
|
||||
@@ -213,11 +250,11 @@ is
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
|
||||
AddVertex( me:mutable;
|
||||
aVertice: Pnt from gp;
|
||||
aNormal: Dir from gp;
|
||||
aTexel: Pnt2d from gp)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
aVertice: Pnt from gp;
|
||||
aNormal: Dir from gp;
|
||||
aTexel: Pnt2d from gp)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice,vertex normal and texture in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- Warning: <aNormal> is ignored when the <hasVNormals>
|
||||
@@ -226,13 +263,30 @@ is
|
||||
-- constructor parameter is FALSE.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
---C++: inline
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: Real from Standard;
|
||||
NX,NY,NZ: Real from Standard;
|
||||
TX,TY: Real from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
X,Y,Z: Real from Standard;
|
||||
NX,NY,NZ: Real from Standard;
|
||||
TX,TY: Real from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice,vertex normal and texture in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- Warning: <aNormal> is ignored when the <hasVNormals>
|
||||
-- constructor parameter is FALSE.
|
||||
-- <aTexel> is ignored when the <hasVTexels>
|
||||
-- constructor parameter is FALSE.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the actual vertex number is >= <maxVertexs>
|
||||
---C++: inline
|
||||
|
||||
AddVertex( me:mutable;
|
||||
X,Y,Z: ShortReal from Standard;
|
||||
NX,NY,NZ: ShortReal from Standard;
|
||||
TX,TY: ShortReal from Standard)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a vertice,vertex normal and texture in the vertex array.
|
||||
-- returns the actual vertex number.
|
||||
-- Warning: <aNormal> is ignored when the <hasVNormals>
|
||||
@@ -252,8 +306,8 @@ is
|
||||
-- if the actual Bound number is >= <maxBounds>
|
||||
|
||||
AddBound( me:mutable;
|
||||
edgeNumber: Integer from Standard;
|
||||
aBColor: Color from Quantity)
|
||||
edgeNumber: Integer from Standard;
|
||||
aBColor: Color from Quantity)
|
||||
returns Integer from Standard
|
||||
---Level: Public
|
||||
---Purpose: Adds a bound of length <edgeNumber> and bound color
|
||||
@@ -338,16 +392,16 @@ is
|
||||
-- or if the <aBoundIndex> parameter is < 1 or > ItemNumber()
|
||||
|
||||
SetVertice( me:mutable;
|
||||
anIndex: Integer from Standard;
|
||||
aVertice: Pnt from gp)
|
||||
anIndex: Integer from Standard;
|
||||
aVertice: Pnt from gp)
|
||||
---Level: Public
|
||||
---Purpose: Change the vertice of rank <anIndex> in the array.
|
||||
raises OutOfRange from Standard;
|
||||
-- if the index is <1 or > VertexNumber()
|
||||
|
||||
SetVertice( me:mutable;
|
||||
anIndex: Integer from Standard;
|
||||
X,Y,Z: Real from Standard)
|
||||
anIndex: Integer from Standard;
|
||||
X,Y,Z: ShortReal from Standard)
|
||||
---Level: Public
|
||||
---Purpose: Change the vertice of rank <anIndex> in the array.
|
||||
raises OutOfRange from Standard;
|
||||
@@ -633,25 +687,6 @@ is
|
||||
-- Category Miscellaneous
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Enable( myclass );
|
||||
---Level: Public
|
||||
---Purpose: Enable to use the arrays of primitives
|
||||
-- Warning: Updates the current value of the environment symbol
|
||||
-- CSF_USE_ARRAY_OF_PRIMITIVES
|
||||
|
||||
Disable( myclass );
|
||||
---Level: Public
|
||||
---Purpose: Disable to use the arrays of primitives
|
||||
-- Warning: Updates the current value of the environment symbol
|
||||
-- CSF_USE_ARRAY_OF_PRIMITIVES
|
||||
|
||||
IsEnable( myclass )
|
||||
returns Boolean from Standard;
|
||||
---Level: Public
|
||||
---Purpose: Returns TRUE when the arrays are enable to use.
|
||||
-- Warning: The initial value can be defined seting the symbol
|
||||
-- CSF_USE_ARRAY_OF_PRIMITIVES to "Yes" or "No"
|
||||
|
||||
IsValid( me:mutable )
|
||||
returns Boolean from Standard;
|
||||
---Level: Public
|
||||
|
@@ -36,9 +36,10 @@ Graphic3d_ArrayOfPrimitives :: Graphic3d_ArrayOfPrimitives (
|
||||
const Standard_Boolean hasVColors,
|
||||
const Standard_Boolean hasFColors,
|
||||
const Standard_Boolean hasVTexels,
|
||||
const Standard_Boolean hasEdgeInfos
|
||||
) : myMaxBounds(0),myMaxVertexs(0),myMaxEdges(0) {
|
||||
Standard_Integer size = sizeof(CALL_DEF_PARRAY);
|
||||
const Standard_Boolean hasEdgeInfos )
|
||||
: myMaxBounds(0),myMaxVertexs(0),myMaxEdges(0)
|
||||
{
|
||||
const Standard_Integer size = sizeof(CALL_DEF_PARRAY);
|
||||
Standard_Integer format = MVERTICE;
|
||||
if( hasVNormals ) format |= MVNORMAL;
|
||||
if( hasVColors ) format |= MVCOLOR;
|
||||
@@ -98,7 +99,8 @@ Graphic3d_ArrayOfPrimitives :: Graphic3d_ArrayOfPrimitives (
|
||||
myPrimitiveArray->num_edges = 0;
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::Destroy ( ){
|
||||
void Graphic3d_ArrayOfPrimitives::Destroy ()
|
||||
{
|
||||
if( myPrimitiveArray ) {
|
||||
if( myPrimitiveArray->vertices ){
|
||||
Standard::Free( (Standard_Address&)myPrimitiveArray->vertices );
|
||||
@@ -147,167 +149,86 @@ void Graphic3d_ArrayOfPrimitives::Destroy ( ){
|
||||
}
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::Enable() {
|
||||
///
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::Disable() {
|
||||
///
|
||||
}
|
||||
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::IsEnable() {
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const gp_Pnt& aVertice) {
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
return AddVertex(x,y,z);
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z) {
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z)
|
||||
{
|
||||
if( !myPrimitiveArray ) return 0;
|
||||
|
||||
Standard_Integer index = myPrimitiveArray->num_vertexs + 1;
|
||||
if( index > myMaxVertexs ) {
|
||||
Standard_OutOfRange::Raise(" TOO many VERTEX");
|
||||
}
|
||||
const Standard_Integer index = myPrimitiveArray->num_vertexs + 1;
|
||||
SetVertice(index,X,Y,Z);
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const gp_Pnt& aVertice,
|
||||
const Quantity_Color& aColor) {
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
Standard_Integer index = AddVertex(x,y,z);
|
||||
Standard_Real r,g,b;
|
||||
aColor.Values(r,g,b,Quantity_TOC_RGB);
|
||||
SetVertexColor(index,r,g,b);
|
||||
return index;
|
||||
}
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const gp_Pnt& aVertice,
|
||||
const Standard_Integer aColor) {
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
Standard_Integer index = AddVertex(x,y,z);
|
||||
SetVertexColor(index,aColor);
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const gp_Pnt& aVertice,
|
||||
const gp_Dir& aNormal) {
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
Standard_Real nx,ny,nz;
|
||||
aNormal.Coord(nx,ny,nz);
|
||||
return AddVertex(x,y,z,nx,ny,nz);
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z,
|
||||
const Standard_Real NX, const Standard_Real NY, const Standard_Real NZ) {
|
||||
if( !myPrimitiveArray ) return 0;
|
||||
|
||||
Standard_Integer index = myPrimitiveArray->num_vertexs + 1;
|
||||
if( index > myMaxVertexs ) {
|
||||
Standard_OutOfRange::Raise(" TOO many VERTEX");
|
||||
}
|
||||
SetVertice(index,X,Y,Z);
|
||||
SetVertexNormal(index,NX,NY,NZ);
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const gp_Pnt& aVertice,
|
||||
const gp_Dir& aNormal,
|
||||
const Quantity_Color& aColor) {
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
Standard_Real nx,ny,nz;
|
||||
aNormal.Coord(nx,ny,nz);
|
||||
Standard_Integer index = AddVertex(x,y,z,nx,ny,nz);
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const gp_Pnt& aVertice, const Quantity_Color& aColor)
|
||||
{
|
||||
const Standard_Integer index = AddVertex(aVertice);
|
||||
Standard_Real r,g,b;
|
||||
aColor.Values(r,g,b,Quantity_TOC_RGB);
|
||||
SetVertexColor(index,r,g,b);
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const gp_Pnt& aVertice,
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const gp_Pnt& aVertice, const Standard_Integer aColor)
|
||||
{
|
||||
const Standard_Integer index = AddVertex(aVertice);
|
||||
SetVertexColor(index,aColor);
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z,
|
||||
const Standard_ShortReal NX, const Standard_ShortReal NY, const Standard_ShortReal NZ)
|
||||
{
|
||||
if( !myPrimitiveArray ) return 0;
|
||||
const Standard_Integer index = myPrimitiveArray->num_vertexs + 1;
|
||||
SetVertice(index,X,Y,Z);
|
||||
SetVertexNormal(index,NX,NY,NZ);
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const gp_Pnt& aVertice,
|
||||
const gp_Dir& aNormal,
|
||||
const Standard_Integer aColor) {
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
Standard_Real nx,ny,nz;
|
||||
aNormal.Coord(nx,ny,nz);
|
||||
Standard_Integer index = AddVertex(x,y,z,nx,ny,nz);
|
||||
const Quantity_Color& aColor)
|
||||
{
|
||||
const Standard_Integer index = AddVertex(aVertice,aNormal);
|
||||
Standard_Real r,g,b;
|
||||
aColor.Values(r,g,b,Quantity_TOC_RGB);
|
||||
SetVertexColor(index,r,g,b);
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const gp_Pnt& aVertice,
|
||||
const gp_Dir& aNormal,
|
||||
const Standard_Integer aColor)
|
||||
{
|
||||
const Standard_Integer index = AddVertex(aVertice,aNormal);
|
||||
SetVertexColor(index,aColor);
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const gp_Pnt& aVertice,
|
||||
const gp_Pnt2d& aTexel) {
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
Standard_Real tx,ty;
|
||||
aTexel.Coord(tx,ty);
|
||||
return AddVertex(x,y,z,tx,ty);
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z,
|
||||
const Standard_Real TX, const Standard_Real TY) {
|
||||
const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z,
|
||||
const Standard_ShortReal TX, const Standard_ShortReal TY)
|
||||
{
|
||||
if( !myPrimitiveArray ) return 0;
|
||||
|
||||
Standard_Integer index = myPrimitiveArray->num_vertexs + 1;
|
||||
if( index > myMaxVertexs ) {
|
||||
Standard_OutOfRange::Raise(" TOO many VERTEX");
|
||||
}
|
||||
const Standard_Integer index = myPrimitiveArray->num_vertexs + 1;
|
||||
SetVertice(index,X,Y,Z);
|
||||
SetVertexTexel(index,TX,TY);
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const gp_Pnt& aVertice,
|
||||
const gp_Dir& aNormal,
|
||||
const gp_Pnt2d& aTexel) {
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
Standard_Real nx,ny,nz;
|
||||
aNormal.Coord(nx,ny,nz);
|
||||
Standard_Real tx,ty;
|
||||
aTexel.Coord(tx,ty);
|
||||
return AddVertex(x,y,z,nx,ny,nz,tx,ty);
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z,
|
||||
const Standard_Real NX, const Standard_Real NY, const Standard_Real NZ,
|
||||
const Standard_Real TX, const Standard_Real TY) {
|
||||
const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z,
|
||||
const Standard_ShortReal NX, const Standard_ShortReal NY, const Standard_ShortReal NZ,
|
||||
const Standard_ShortReal TX, const Standard_ShortReal TY)
|
||||
{
|
||||
if( !myPrimitiveArray ) return 0;
|
||||
|
||||
Standard_Integer index = myPrimitiveArray->num_vertexs + 1;
|
||||
if( index > myMaxVertexs ) {
|
||||
Standard_OutOfRange::Raise(" TOO many VERTEX");
|
||||
}
|
||||
const Standard_Integer index = myPrimitiveArray->num_vertexs + 1;
|
||||
SetVertice(index,X,Y,Z);
|
||||
SetVertexNormal(index,NX,NY,NZ);
|
||||
SetVertexTexel(index,TX,TY);
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound( const Standard_Integer edgeNumber) {
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound( const Standard_Integer edgeNumber)
|
||||
{
|
||||
Standard_Integer index = 0;
|
||||
if( myPrimitiveArray && myPrimitiveArray->bounds ) {
|
||||
index = myPrimitiveArray->num_bounds;
|
||||
@@ -322,22 +243,20 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound( const Standard_Integer e
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(
|
||||
const Standard_Integer edgeNumber,
|
||||
const Quantity_Color& aFColor
|
||||
) {
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound( const Standard_Integer edgeNumber,
|
||||
const Quantity_Color& aFColor)
|
||||
{
|
||||
Standard_Real r,g,b;
|
||||
aFColor.Values(r,g,b,Quantity_TOC_RGB);
|
||||
return AddBound(edgeNumber,r,g,b);
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(
|
||||
const Standard_Integer edgeNumber,
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound( const Standard_Integer edgeNumber,
|
||||
const Standard_Real R,
|
||||
const Standard_Real G,
|
||||
const Standard_Real B) {
|
||||
const Standard_Real B)
|
||||
{
|
||||
if( !myPrimitiveArray ) return 0;
|
||||
|
||||
Standard_Integer index = myPrimitiveArray->num_bounds;
|
||||
if( index >= myMaxBounds ) {
|
||||
Standard_OutOfRange::Raise(" TOO many BOUND");
|
||||
@@ -348,9 +267,9 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge(
|
||||
const Standard_Integer vertexIndex,
|
||||
const Standard_Boolean isVisible) {
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge(const Standard_Integer vertexIndex,
|
||||
const Standard_Boolean isVisible)
|
||||
{
|
||||
if( !myPrimitiveArray ) return 0;
|
||||
|
||||
Standard_Integer index = myPrimitiveArray->num_edges;
|
||||
@@ -371,15 +290,15 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge(
|
||||
return index;
|
||||
}
|
||||
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
|
||||
const gp_Dir& aNormal) {
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(const gp_Dir& aNormal)
|
||||
{
|
||||
return Orientate(1,Max(VertexNumber(),EdgeNumber()),aNormal);
|
||||
}
|
||||
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
|
||||
const Standard_Integer aVertexIndex,
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(const Standard_Integer aVertexIndex,
|
||||
const Standard_Integer aVertexNumber,
|
||||
const gp_Dir& aNormal) {
|
||||
const gp_Dir& aNormal)
|
||||
{
|
||||
Standard_Boolean somethingHasChange = Standard_False;
|
||||
if( myPrimitiveArray && (myPrimitiveArray->num_vertexs > 2) ) {
|
||||
Standard_Integer i,j,k=aVertexNumber,n=aVertexIndex-1;
|
||||
@@ -495,9 +414,9 @@ Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
|
||||
return somethingHasChange;
|
||||
}
|
||||
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
|
||||
const Standard_Integer aBoundIndex,
|
||||
const gp_Dir& aNormal) {
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(const Standard_Integer aBoundIndex,
|
||||
const gp_Dir& aNormal)
|
||||
{
|
||||
Standard_Boolean somethingHasChange = Standard_False;
|
||||
if( myPrimitiveArray && myPrimitiveArray->vertices ) {
|
||||
if( myPrimitiveArray->bounds &&
|
||||
@@ -537,26 +456,25 @@ Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
|
||||
return somethingHasChange;
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertice(
|
||||
const Standard_Integer anIndex,
|
||||
const gp_Pnt& aVertice) {
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertice( const Standard_Integer anIndex,
|
||||
const gp_Pnt& aVertice)
|
||||
{
|
||||
Standard_Real x,y,z;
|
||||
aVertice.Coord(x,y,z);
|
||||
SetVertice(anIndex,x,y,z);
|
||||
SetVertice(anIndex,Standard_ShortReal(x),Standard_ShortReal(y),Standard_ShortReal(z));
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertexColor(
|
||||
const Standard_Integer anIndex,
|
||||
const Quantity_Color& aColor) {
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertexColor( const Standard_Integer anIndex,
|
||||
const Quantity_Color& aColor)
|
||||
{
|
||||
Standard_Real r,g,b;
|
||||
aColor.Values(r,g,b,Quantity_TOC_RGB);
|
||||
SetVertexColor(anIndex,r,g,b);
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertexColor(
|
||||
const Standard_Integer anIndex,
|
||||
const Standard_Integer aColor) {
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertexColor( const Standard_Integer anIndex,
|
||||
const Standard_Integer aColor)
|
||||
{
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myMaxVertexs ) {
|
||||
Standard_OutOfRange::Raise(" BAD VERTEX index");
|
||||
@@ -580,31 +498,33 @@ void Graphic3d_ArrayOfPrimitives::SetVertexColor(
|
||||
|
||||
}
|
||||
}
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertexNormal(
|
||||
const Standard_Integer anIndex,
|
||||
const gp_Dir& aNormal) {
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertexNormal(const Standard_Integer anIndex,
|
||||
const gp_Dir& aNormal)
|
||||
{
|
||||
Standard_Real x,y,z;
|
||||
aNormal.Coord(x,y,z);
|
||||
SetVertexNormal(anIndex,x,y,z);
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertexTexel(
|
||||
const Standard_Integer anIndex,
|
||||
const gp_Pnt2d& aTexel) {
|
||||
void Graphic3d_ArrayOfPrimitives::SetVertexTexel( const Standard_Integer anIndex,
|
||||
const gp_Pnt2d& aTexel)
|
||||
{
|
||||
Standard_Real x,y;
|
||||
aTexel.Coord(x,y);
|
||||
SetVertexTexel(anIndex,x,y);
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::SetBoundColor(
|
||||
const Standard_Integer anIndex,
|
||||
const Quantity_Color& aColor) {
|
||||
void Graphic3d_ArrayOfPrimitives::SetBoundColor(const Standard_Integer anIndex,
|
||||
const Quantity_Color& aColor)
|
||||
{
|
||||
Standard_Real r,g,b;
|
||||
aColor.Values(r,g,b,Quantity_TOC_RGB);
|
||||
SetBoundColor(anIndex,r,g,b);
|
||||
}
|
||||
|
||||
Standard_CString Graphic3d_ArrayOfPrimitives::StringType() const {
|
||||
Standard_CString Graphic3d_ArrayOfPrimitives::StringType() const
|
||||
{
|
||||
TCollection_AsciiString name("UndefinedArray");
|
||||
switch( myPrimitiveArray->type ) {
|
||||
case TelPointsArrayType:
|
||||
@@ -641,37 +561,43 @@ Standard_CString Graphic3d_ArrayOfPrimitives::StringType() const {
|
||||
return name.ToCString();
|
||||
}
|
||||
|
||||
gp_Pnt Graphic3d_ArrayOfPrimitives::Vertice(const Standard_Integer aRank) const {
|
||||
gp_Pnt Graphic3d_ArrayOfPrimitives::Vertice(const Standard_Integer aRank) const
|
||||
{
|
||||
Standard_Real x,y,z;
|
||||
Vertice(aRank,x,y,z);
|
||||
return gp_Pnt(x,y,z);
|
||||
}
|
||||
|
||||
Quantity_Color Graphic3d_ArrayOfPrimitives::VertexColor(const Standard_Integer aRank) const {
|
||||
Quantity_Color Graphic3d_ArrayOfPrimitives::VertexColor(const Standard_Integer aRank) const
|
||||
{
|
||||
Standard_Real r,g,b;
|
||||
VertexColor(aRank,r,g,b);
|
||||
return Quantity_Color(r,g,b,Quantity_TOC_RGB);
|
||||
}
|
||||
|
||||
gp_Dir Graphic3d_ArrayOfPrimitives::VertexNormal(const Standard_Integer aRank) const {
|
||||
gp_Dir Graphic3d_ArrayOfPrimitives::VertexNormal(const Standard_Integer aRank) const
|
||||
{
|
||||
Standard_Real x,y,z;
|
||||
VertexNormal(aRank,x,y,z);
|
||||
return gp_Dir(x,y,z);
|
||||
}
|
||||
|
||||
gp_Pnt2d Graphic3d_ArrayOfPrimitives::VertexTexel(const Standard_Integer aRank) const {
|
||||
gp_Pnt2d Graphic3d_ArrayOfPrimitives::VertexTexel(const Standard_Integer aRank) const
|
||||
{
|
||||
Standard_Real x,y;
|
||||
VertexTexel(aRank,x,y);
|
||||
return gp_Pnt2d(x,y);
|
||||
}
|
||||
|
||||
Quantity_Color Graphic3d_ArrayOfPrimitives::BoundColor(const Standard_Integer aRank) const {
|
||||
Quantity_Color Graphic3d_ArrayOfPrimitives::BoundColor(const Standard_Integer aRank) const
|
||||
{
|
||||
Standard_Real r,g,b;
|
||||
BoundColor(aRank,r,g,b);
|
||||
return Quantity_Color(r,g,b,Quantity_TOC_RGB);
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber() const {
|
||||
Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber() const
|
||||
{
|
||||
Standard_Integer number=-1;
|
||||
if( myPrimitiveArray ) switch( myPrimitiveArray->type ) {
|
||||
case TelPointsArrayType:
|
||||
@@ -720,9 +646,9 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber() const {
|
||||
return number;
|
||||
}
|
||||
|
||||
void Graphic3d_ArrayOfPrimitives::ComputeVNormals(
|
||||
const Standard_Integer from,
|
||||
const Standard_Integer to) {
|
||||
void Graphic3d_ArrayOfPrimitives::ComputeVNormals(const Standard_Integer from,
|
||||
const Standard_Integer to)
|
||||
{
|
||||
Standard_Integer next = from+1;
|
||||
Standard_Integer last = to+1;
|
||||
gp_Pnt p1,p2,p3;
|
||||
@@ -769,8 +695,8 @@ void Graphic3d_ArrayOfPrimitives::ComputeVNormals(
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::IsValid() {
|
||||
|
||||
Standard_Boolean Graphic3d_ArrayOfPrimitives::IsValid()
|
||||
{
|
||||
if( !myPrimitiveArray ) return Standard_False;
|
||||
|
||||
Standard_Integer nvertexs = myPrimitiveArray->num_vertexs;
|
||||
|
@@ -23,84 +23,139 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
inline Graphic3d_PrimitiveArray Graphic3d_ArrayOfPrimitives::Array() const {
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
|
||||
inline Graphic3d_PrimitiveArray Graphic3d_ArrayOfPrimitives::Array() const
|
||||
{
|
||||
return myPrimitiveArray;
|
||||
}
|
||||
|
||||
inline Graphic3d_TypeOfPrimitiveArray Graphic3d_ArrayOfPrimitives::Type() const {
|
||||
|
||||
inline Graphic3d_TypeOfPrimitiveArray Graphic3d_ArrayOfPrimitives::Type() const
|
||||
{
|
||||
Graphic3d_TypeOfPrimitiveArray type = Graphic3d_TOPA_UNDEFINED;
|
||||
if( myPrimitiveArray ) type = (Graphic3d_TypeOfPrimitiveArray) myPrimitiveArray->type;
|
||||
return type;
|
||||
}
|
||||
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexNormals() const {
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexNormals() const
|
||||
{
|
||||
Standard_Boolean defined = Standard_False;
|
||||
if( myPrimitiveArray && myPrimitiveArray->vnormals ) defined = Standard_True;
|
||||
return defined;
|
||||
}
|
||||
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexColors() const {
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexColors() const
|
||||
{
|
||||
Standard_Boolean defined = Standard_False;
|
||||
if( myPrimitiveArray && myPrimitiveArray->vcolours ) defined = Standard_True;
|
||||
return defined;
|
||||
}
|
||||
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexTexels() const {
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasVertexTexels() const
|
||||
{
|
||||
Standard_Boolean defined = Standard_False;
|
||||
if( myPrimitiveArray && myPrimitiveArray->vtexels ) defined = Standard_True;
|
||||
return defined;
|
||||
}
|
||||
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasEdgeInfos() const {
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasEdgeInfos() const
|
||||
{
|
||||
Standard_Boolean defined = Standard_False;
|
||||
if( myPrimitiveArray && myPrimitiveArray->edge_vis ) defined = Standard_True;
|
||||
return defined;
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::VertexNumber() const {
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::VertexNumber() const
|
||||
{
|
||||
Standard_Integer number = -1;
|
||||
if( myPrimitiveArray ) number = myPrimitiveArray->num_vertexs;
|
||||
return number;
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const gp_Pnt& aVertice)
|
||||
{
|
||||
return AddVertex(aVertice.X(),aVertice.Y(),aVertice.Z());
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
|
||||
{
|
||||
return AddVertex(Standard_ShortReal(X),Standard_ShortReal(Y),Standard_ShortReal(Z));
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const gp_Pnt& aVertice, const gp_Dir& aNormal)
|
||||
{
|
||||
return AddVertex(aVertice.X(),aVertice.Y(),aVertice.Z(),aNormal.X(),aNormal.Y(),aNormal.Z());
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z,
|
||||
const Standard_Real NX, const Standard_Real NY, const Standard_Real NZ)
|
||||
{
|
||||
return AddVertex(Standard_ShortReal(X),Standard_ShortReal(Y),Standard_ShortReal(Z),
|
||||
Standard_ShortReal(NX),Standard_ShortReal(NY),Standard_ShortReal(NZ));
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const gp_Pnt& aVertice, const gp_Pnt2d& aTexel)
|
||||
{
|
||||
return AddVertex(aVertice.X(),aVertice.Y(),aVertice.Z(),aTexel.X(),aTexel.Y());
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z,
|
||||
const Standard_Real TX, const Standard_Real TY)
|
||||
{
|
||||
return AddVertex(Standard_ShortReal(X),Standard_ShortReal(Y),Standard_ShortReal(Z),
|
||||
Standard_ShortReal(TX),Standard_ShortReal(TY));
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(const gp_Pnt& aVertice, const gp_Dir& aNormal, const gp_Pnt2d& aTexel)
|
||||
{
|
||||
return AddVertex(aVertice.X(),aVertice.Y(),aVertice.Z(),aNormal.X(),aNormal.Y(),aNormal.Z(),aTexel.X(),aTexel.Y());
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z,
|
||||
const Standard_Real NX, const Standard_Real NY, const Standard_Real NZ,
|
||||
const Standard_Real TX, const Standard_Real TY)
|
||||
{
|
||||
return AddVertex(Standard_ShortReal(X),Standard_ShortReal(Y),Standard_ShortReal(Z),
|
||||
Standard_ShortReal(NX),Standard_ShortReal(NY),Standard_ShortReal(NZ),
|
||||
Standard_ShortReal(TX),Standard_ShortReal(TY));
|
||||
}
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::SetVertice(
|
||||
const Standard_Integer anIndex,
|
||||
const Standard_Real X, const Standard_Real Y, const Standard_Real Z) {
|
||||
|
||||
const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Z)
|
||||
{
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myMaxVertexs ) {
|
||||
if( anIndex < 1 || anIndex > myMaxVertexs )
|
||||
Standard_OutOfRange::Raise(" BAD VERTEX index");
|
||||
}
|
||||
|
||||
Standard_Integer index = anIndex-1;
|
||||
{
|
||||
if( myPrimitiveArray->vertices ) {
|
||||
Tfloat *p = myPrimitiveArray->vertices[index].xyz;
|
||||
*p++ = Standard_ShortReal(X);
|
||||
*p++ = Standard_ShortReal(Y);
|
||||
*p = Standard_ShortReal(Z);
|
||||
}
|
||||
if( myPrimitiveArray->vertices ) {
|
||||
Tfloat *p = myPrimitiveArray->vertices[anIndex-1].xyz;
|
||||
*p++ = X;
|
||||
*p++ = Y;
|
||||
*p = Z;
|
||||
}
|
||||
myPrimitiveArray->num_vertexs = Max(anIndex,myPrimitiveArray->num_vertexs);
|
||||
}
|
||||
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::SetVertexColor(
|
||||
const Standard_Integer anIndex,
|
||||
inline void Graphic3d_ArrayOfPrimitives::SetVertexColor(const Standard_Integer anIndex,
|
||||
const Standard_Real R,
|
||||
const Standard_Real G,
|
||||
const Standard_Real B) {
|
||||
const Standard_Real B)
|
||||
{
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myMaxVertexs ) {
|
||||
Standard_OutOfRange::Raise(" BAD VERTEX index");
|
||||
}
|
||||
|
||||
if( myPrimitiveArray->vcolours ) {
|
||||
unsigned char red = (unsigned char)(R <= 0. ? 0. : R >= 1. ? 255. : R * 255.);
|
||||
unsigned char green = (unsigned char)(G <= 0. ? 0. : G >= 1. ? 255. : G * 255.);
|
||||
unsigned char blue = (unsigned char)(B <= 0. ? 0. : B >= 1. ? 255. : B * 255.);
|
||||
unsigned char red = (unsigned int)(R * 255.);
|
||||
unsigned char green = (unsigned int)(G * 255.);
|
||||
unsigned char blue = (unsigned int)(B * 255.);
|
||||
unsigned char alpha = 0;
|
||||
Standard_Integer outColor ;
|
||||
outColor = red;
|
||||
@@ -136,7 +191,8 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertexNormal(
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::SetVertexTexel(
|
||||
const Standard_Integer anIndex,
|
||||
const Standard_Real TX, const Standard_Real TY) {
|
||||
const Standard_Real TX, const Standard_Real TY)
|
||||
{
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myMaxVertexs ) {
|
||||
Standard_OutOfRange::Raise(" BAD VERTEX index");
|
||||
@@ -153,7 +209,8 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertexTexel(
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::SetBoundColor(
|
||||
const Standard_Integer anIndex,
|
||||
const Standard_Real R, const Standard_Real G, const Standard_Real B) {
|
||||
const Standard_Real R, const Standard_Real G, const Standard_Real B)
|
||||
{
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myMaxBounds ) {
|
||||
Standard_OutOfRange::Raise(" BAD BOUND index");
|
||||
@@ -169,7 +226,8 @@ inline void Graphic3d_ArrayOfPrimitives::SetBoundColor(
|
||||
}
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::Vertice(const Standard_Integer anIndex,
|
||||
Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const {
|
||||
Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const
|
||||
{
|
||||
X = Y = Z = 0.;
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myPrimitiveArray->num_vertexs ) {
|
||||
@@ -184,7 +242,8 @@ inline void Graphic3d_ArrayOfPrimitives::Vertice(const Standard_Integer anIndex,
|
||||
}
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::VertexColor(const Standard_Integer anIndex,
|
||||
Standard_Real& R, Standard_Real& G, Standard_Real& B) const {
|
||||
Standard_Real& R, Standard_Real& G, Standard_Real& B) const
|
||||
{
|
||||
R = G = B = 0;
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myPrimitiveArray->num_vertexs ) {
|
||||
@@ -234,9 +293,9 @@ inline void Graphic3d_ArrayOfPrimitives::VertexColor(const Standard_Integer anIn
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::VertexNormal(const Standard_Integer anIndex,
|
||||
Standard_Real& NX, Standard_Real& NY, Standard_Real& NZ) const {
|
||||
Standard_Real& NX, Standard_Real& NY, Standard_Real& NZ) const
|
||||
{
|
||||
NX = NY = NZ = 0.;
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myPrimitiveArray->num_vertexs ) {
|
||||
@@ -251,7 +310,8 @@ inline void Graphic3d_ArrayOfPrimitives::VertexNormal(const Standard_Integer anI
|
||||
}
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::VertexTexel(const Standard_Integer anIndex,
|
||||
Standard_Real& TX, Standard_Real& TY) const {
|
||||
Standard_Real& TX, Standard_Real& TY) const
|
||||
{
|
||||
TX = TY = 0.;
|
||||
if( !myPrimitiveArray ) return;
|
||||
if( anIndex < 1 || anIndex > myPrimitiveArray->num_vertexs ) {
|
||||
@@ -265,14 +325,15 @@ inline void Graphic3d_ArrayOfPrimitives::VertexTexel(const Standard_Integer anIn
|
||||
}
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::EdgeNumber() const {
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::EdgeNumber() const
|
||||
{
|
||||
Standard_Integer number = -1;
|
||||
if( myPrimitiveArray ) number = myPrimitiveArray->num_edges;
|
||||
return number;
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::Edge(
|
||||
const Standard_Integer anIndex ) const {
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::Edge(const Standard_Integer anIndex ) const
|
||||
{
|
||||
Standard_Integer index=0;
|
||||
if( myPrimitiveArray && myPrimitiveArray->edge_vis &&
|
||||
(anIndex > 0) && (anIndex <= myPrimitiveArray->num_edges) ) {
|
||||
@@ -283,8 +344,8 @@ inline Standard_Integer Graphic3d_ArrayOfPrimitives::Edge(
|
||||
return index+1;
|
||||
}
|
||||
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::EdgeIsVisible(
|
||||
const Standard_Integer anIndex ) const {
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::EdgeIsVisible(const Standard_Integer anIndex ) const
|
||||
{
|
||||
Standard_Boolean isVisible = Standard_False;
|
||||
if( myPrimitiveArray && myPrimitiveArray->edge_vis &&
|
||||
(anIndex > 0) && (anIndex <= myPrimitiveArray->num_edges) ) {
|
||||
@@ -296,19 +357,22 @@ inline Standard_Boolean Graphic3d_ArrayOfPrimitives::EdgeIsVisible(
|
||||
return isVisible;
|
||||
}
|
||||
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasBoundColors() const {
|
||||
inline Standard_Boolean Graphic3d_ArrayOfPrimitives::HasBoundColors() const
|
||||
{
|
||||
Standard_Boolean defined = Standard_False;
|
||||
if( myPrimitiveArray && myPrimitiveArray->fcolours ) defined = Standard_True;
|
||||
return defined;
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::BoundNumber() const {
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::BoundNumber() const
|
||||
{
|
||||
Standard_Integer number = -1;
|
||||
if( myPrimitiveArray ) number = myPrimitiveArray->num_bounds;
|
||||
return number;
|
||||
}
|
||||
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::Bound(const Standard_Integer anIndex) const {
|
||||
inline Standard_Integer Graphic3d_ArrayOfPrimitives::Bound(const Standard_Integer anIndex) const
|
||||
{
|
||||
Standard_Integer number=-1;
|
||||
if( myPrimitiveArray && myPrimitiveArray->bounds &&
|
||||
(anIndex > 0) && (anIndex <= myPrimitiveArray->num_bounds) ) {
|
||||
@@ -320,7 +384,8 @@ inline Standard_Integer Graphic3d_ArrayOfPrimitives::Bound(const Standard_Intege
|
||||
}
|
||||
|
||||
inline void Graphic3d_ArrayOfPrimitives::BoundColor(const Standard_Integer anIndex,
|
||||
Standard_Real& R, Standard_Real& G, Standard_Real& B) const {
|
||||
Standard_Real& R, Standard_Real& G, Standard_Real& B) const
|
||||
{
|
||||
if( myPrimitiveArray && myPrimitiveArray->fcolours &&
|
||||
(anIndex > 0) && (anIndex <= myPrimitiveArray->num_bounds) ) {
|
||||
Tfloat *p = myPrimitiveArray->fcolours[anIndex-1].rgb;
|
||||
|
@@ -90,12 +90,8 @@ class Graphic3d_CGroup
|
||||
|
||||
public:
|
||||
|
||||
int LabelBegin;
|
||||
int LabelEnd;
|
||||
void* ptrGroup;
|
||||
|
||||
int StructureEnd;
|
||||
|
||||
CALL_DEF_CONTEXTLINE ContextLine;
|
||||
CALL_DEF_CONTEXTFILLAREA ContextFillArea;
|
||||
CALL_DEF_CONTEXTMARKER ContextMarker;
|
||||
@@ -105,9 +101,6 @@ public:
|
||||
|
||||
CALL_DEF_PICKID PickId;
|
||||
|
||||
unsigned IsDeleted : 1;
|
||||
unsigned IsOpen : 1;
|
||||
|
||||
};
|
||||
|
||||
const Handle(Standard_Type)& TYPE(Graphic3d_CGroup);
|
||||
|
@@ -31,8 +31,6 @@ public:
|
||||
|
||||
int Priority;
|
||||
int PreviousPriority;
|
||||
int GroupBegin;
|
||||
int GroupEnd;
|
||||
|
||||
CALL_DEF_CONTEXTLINE ContextLine;
|
||||
CALL_DEF_CONTEXTFILLAREA ContextFillArea;
|
||||
|
@@ -74,25 +74,12 @@ uses
|
||||
Structure from Graphic3d,
|
||||
TextPath from Graphic3d,
|
||||
TypeOfComposition from Graphic3d,
|
||||
TypeOfPolygon from Graphic3d,
|
||||
TypeOfPrimitive from Graphic3d,
|
||||
Vector from Graphic3d,
|
||||
Array1OfVertex from Graphic3d,
|
||||
Array2OfVertex from Graphic3d,
|
||||
Vertex from Graphic3d,
|
||||
Array1OfVertexC from Graphic3d,
|
||||
Array2OfVertexC from Graphic3d,
|
||||
VertexC from Graphic3d,
|
||||
Array1OfVertexN from Graphic3d,
|
||||
Array2OfVertexN from Graphic3d,
|
||||
VertexN from Graphic3d,
|
||||
Array1OfVertexNC from Graphic3d,
|
||||
Array2OfVertexNC from Graphic3d,
|
||||
VertexNC from Graphic3d,
|
||||
VerticalTextAlignment from Graphic3d,
|
||||
VertexNT from Graphic3d,
|
||||
Array1OfVertexNT from Graphic3d,
|
||||
Array2OfVertexNT from Graphic3d,
|
||||
PrimitiveArray from Graphic3d,
|
||||
PtrFrameBuffer from Graphic3d,
|
||||
HArray1OfByte from TColStd,
|
||||
@@ -201,11 +188,6 @@ is
|
||||
is deferred;
|
||||
---Purpose: call_togl_cleargroup
|
||||
|
||||
CloseGroup ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: call_togl_closegroup
|
||||
|
||||
FaceContextGroup ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
NoInsert : Integer from Standard )
|
||||
@@ -238,11 +220,6 @@ is
|
||||
is deferred;
|
||||
---Purpose: call_togl_markercontextgroup
|
||||
|
||||
OpenGroup ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: call_togl_opengroup
|
||||
|
||||
RemoveGroup ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d )
|
||||
is deferred;
|
||||
@@ -500,29 +477,14 @@ is
|
||||
|
||||
Marker ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
APoint : Vertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
APoint : Vertex from Graphic3d )
|
||||
is deferred;
|
||||
|
||||
MarkerSet ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
ListVertex : Array1OfVertex from Graphic3d )
|
||||
is deferred;
|
||||
|
||||
----------------------------------------
|
||||
-- Category: Methods to create Polygon
|
||||
-- for Purpose : see Graphic3d_Group.cdl
|
||||
----------------------------------------
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon
|
||||
|
||||
----------------------------------------
|
||||
-- Category: Methods to create Text
|
||||
-- for Purpose : see Graphic3d_Group.cdl
|
||||
@@ -1013,15 +975,6 @@ is
|
||||
-- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
|
||||
-- Notice however that results may differ a lot and do not contain some elements.
|
||||
|
||||
RemovePrimitiveArray( me : mutable;
|
||||
theCGroup : CGroup from Graphic3d;
|
||||
thePArray : PrimitiveArray from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: Clear visualization data in graphical driver and
|
||||
-- stop displaying the primitives array of the graphical group
|
||||
-- <theCGroup>. This method is internal and should be used
|
||||
-- by Graphic3d_Group only.
|
||||
|
||||
AddZLayer( me : mutable;
|
||||
theCView : CView from Graphic3d;
|
||||
theLayerId : Integer from Standard )
|
||||
|
@@ -90,8 +90,7 @@ void Graphic3d_GraphicDriver::PrintCGroup (const Graphic3d_CGroup& ACGroup, cons
|
||||
|
||||
if (AField) {
|
||||
cout << "\tstruct id " << ACGroup.Struct->Id << "\n";
|
||||
cout << "\tgroup labels " << ACGroup.LabelBegin << ", "
|
||||
<< ACGroup.LabelEnd << "\n";
|
||||
cout << "\tgroup\n";
|
||||
cout << flush;
|
||||
}
|
||||
|
||||
|
@@ -83,27 +83,13 @@ class Group from Graphic3d inherits TShared
|
||||
GraphicDriver from Graphic3d,
|
||||
Structure from Graphic3d,
|
||||
TextPath from Graphic3d,
|
||||
TypeOfPolygon from Graphic3d,
|
||||
Vector from Graphic3d,
|
||||
Array1OfVertex from Graphic3d,
|
||||
Array2OfVertex from Graphic3d,
|
||||
Vertex from Graphic3d,
|
||||
Array1OfVertexC from Graphic3d,
|
||||
Array2OfVertexC from Graphic3d,
|
||||
VertexC from Graphic3d,
|
||||
Array1OfVertexN from Graphic3d,
|
||||
Array2OfVertexN from Graphic3d,
|
||||
VertexN from Graphic3d,
|
||||
Array1OfVertexNC from Graphic3d,
|
||||
Array2OfVertexNC from Graphic3d,
|
||||
VertexNC from Graphic3d,
|
||||
VerticalTextAlignment from Graphic3d,
|
||||
VertexNT from Graphic3d,
|
||||
Array1OfVertexNT from Graphic3d,
|
||||
Array2OfVertexNT from Graphic3d,
|
||||
ArrayOfPrimitives from Graphic3d,
|
||||
ListOfPArray from Graphic3d,
|
||||
ListIteratorOfListOfPArray from Graphic3d,
|
||||
TransModeFlags from Graphic3d,
|
||||
CBounds from Graphic3d
|
||||
|
||||
@@ -282,109 +268,6 @@ class Group from Graphic3d inherits TShared
|
||||
-- vertices.
|
||||
---Category: Methods to create Marker
|
||||
|
||||
--------------------------------------
|
||||
-- Category: Methods to create Polygon
|
||||
--------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
-- Summary of Polygons --
|
||||
-- --
|
||||
-- They are limited to one boundary. --
|
||||
-- --
|
||||
-- The boundary should be closed. --
|
||||
-- --
|
||||
-- They should have at least three vertices. --
|
||||
-- --
|
||||
-- They should be planar. --
|
||||
-- --
|
||||
-- They should have a normal. --
|
||||
-- --
|
||||
-- The boundary is drawn only when the interior --
|
||||
-- style is hollow. --
|
||||
-- --
|
||||
-- The boundary have the following attributes : --
|
||||
-- --
|
||||
-- Line Type. --
|
||||
-- Line Width Scale Factor. --
|
||||
-- Line Color. --
|
||||
-- --
|
||||
-- They have only interior attributes : --
|
||||
-- --
|
||||
-- Interior Style. --
|
||||
-- Interior Color. --
|
||||
-- Front Material. --
|
||||
-- Back Material. --
|
||||
--------------------------------------------------
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Links up points to create a face drawn
|
||||
-- using the current fill attributes (AspectFillArea3d))
|
||||
-- The first and last points are not duplicates.
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
PolygonSet ( me : mutable;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Links up points to create a set of face drawn
|
||||
-- using the current fill attributes (AspectFillArea3d))
|
||||
-- The first and last points are not duplicates.
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
---------------------------------------
|
||||
-- Category: Methods to create Polyline
|
||||
---------------------------------------
|
||||
|
||||
--------------------------------------------
|
||||
-- Summary of Polylines --
|
||||
-- --
|
||||
-- They should have two or more vertices. --
|
||||
-- --
|
||||
-- They have the following attributes. --
|
||||
-- --
|
||||
-- Line Type. --
|
||||
-- Line Width Scale Factor. --
|
||||
-- Line Color. --
|
||||
--------------------------------------------
|
||||
|
||||
Polyline ( me : mutable;
|
||||
APT1 : Vertex from Graphic3d;
|
||||
APT2 : Vertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Links up points to create a line drawn
|
||||
-- using the current line attributes (AspectLine)
|
||||
---Category: Methods to create Polyline
|
||||
|
||||
Polyline ( me : mutable;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Links up points to create a line drawn
|
||||
-- using the current line attributes (AspectLine)
|
||||
---Category: Methods to create Polyline
|
||||
|
||||
Polyline ( me : mutable;
|
||||
ListVertex : Array1OfVertexC from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Links up points to create a line drawn
|
||||
-- using the current line attributes (AspectLine)
|
||||
-- except for the colour which is defined
|
||||
-- for each vertex.
|
||||
---Category: Methods to create Polyline
|
||||
|
||||
-----------------------------------
|
||||
-- Category: Methods to create Text
|
||||
-----------------------------------
|
||||
@@ -511,17 +394,6 @@ class Group from Graphic3d inherits TShared
|
||||
---Level: Public
|
||||
---Purpose: Adds an array of primitives for display
|
||||
|
||||
RemovePrimitiveArray( me : mutable;
|
||||
aRank : Integer from Standard)
|
||||
---Level: Public
|
||||
---Purpose: Remove the array of primitives of rank <aRank>
|
||||
raises OutOfRange from Standard is static;
|
||||
-- if <aRank> is < 1 or > ArrayNumber()
|
||||
|
||||
RemovePrimitiveArrays( me : mutable);
|
||||
---Level: Public
|
||||
---Purpose: Remove all array of primitives
|
||||
|
||||
UserDraw ( me : mutable;
|
||||
AnObject : Address from Standard;
|
||||
EvalMinMax : Boolean from Standard = Standard_True;
|
||||
@@ -537,30 +409,6 @@ class Group from Graphic3d inherits TShared
|
||||
-- Category: Inquire methods
|
||||
----------------------------
|
||||
|
||||
ArrayNumber( me )
|
||||
returns Integer from Standard;
|
||||
---Level: Public
|
||||
---Purpose: Returns the number of primitive array added in this group
|
||||
|
||||
InitDefinedArray( me:mutable );
|
||||
---Level: Public
|
||||
---Purpose: Initialize the array list iterator.
|
||||
|
||||
NextDefinedArray( me:mutable );
|
||||
---Level: Public
|
||||
---Purpose: Increments the array list iterator.
|
||||
|
||||
MoreDefinedArray( me:mutable )
|
||||
returns Boolean from Standard;
|
||||
---Level: Public
|
||||
---Purpose: Returns TRUE if more array exists in the list.
|
||||
|
||||
DefinedArray( me )
|
||||
returns mutable ArrayOfPrimitives from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Returns the current array of primitives according
|
||||
-- to the array list iterator value.
|
||||
|
||||
IsGroupPrimitivesAspectSet ( me;
|
||||
theAspect : GroupAspect from Graphic3d )
|
||||
returns Boolean from Standard
|
||||
@@ -640,13 +488,6 @@ class Group from Graphic3d inherits TShared
|
||||
-- Category: Private methods
|
||||
----------------------------
|
||||
|
||||
Labels ( me;
|
||||
LB, LE : in out Integer from Standard )
|
||||
is static private;
|
||||
---Level: Internal
|
||||
---Purpose: Returns the position of the group in the structure.
|
||||
---Category: Private methods
|
||||
|
||||
MinMaxCoord ( me;
|
||||
XMin, YMin, ZMin : out Real from Standard;
|
||||
XMax, YMax, ZMax : out Real from Standard )
|
||||
@@ -665,22 +506,6 @@ class Group from Graphic3d inherits TShared
|
||||
-- contains the associated Structure of the Group <me>.
|
||||
---Category: Private methods
|
||||
|
||||
-----------------------------
|
||||
-- Category: Internal methods
|
||||
-----------------------------
|
||||
|
||||
BeginPrimitives ( me : mutable )
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Category: Internal methods
|
||||
|
||||
EndPrimitives ( me : mutable )
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Category: Internal methods
|
||||
|
||||
--
|
||||
|
||||
fields
|
||||
|
||||
--
|
||||
@@ -708,7 +533,6 @@ class Group from Graphic3d inherits TShared
|
||||
MyBounds : CBounds from Graphic3d;
|
||||
|
||||
MyListOfPArray : ListOfPArray from Graphic3d;
|
||||
MyListOfPArrayIterator : ListIteratorOfListOfPArray from Graphic3d;
|
||||
|
||||
MyMarkArray : HArray1OfByte from TColStd;
|
||||
MyMarkWidth : Integer from Standard;
|
||||
|
@@ -77,49 +77,38 @@ MyListOfPArray()
|
||||
// This () is the instance of the class, the current groupe
|
||||
//Handle(Graphic3d_Group) me = Handle(Graphic3d_Group)::DownCast (This ());
|
||||
|
||||
Standard_Integer TheLabelBegin, TheLabelEnd;
|
||||
MyPtrStructure = (void *) AStructure.operator->();
|
||||
MyStructure->Add (this);
|
||||
|
||||
// MyStructure = AStructure;
|
||||
MyPtrStructure = (void *) AStructure.operator->();
|
||||
MyStructure->GroupLabels (TheLabelBegin, TheLabelEnd);
|
||||
MyStructure->Add (this);
|
||||
MyContainsFacet = Standard_False,
|
||||
MyIsEmpty = Standard_True;
|
||||
|
||||
MyContainsFacet = Standard_False,
|
||||
MyIsEmpty = Standard_True;
|
||||
MyCGroup.Struct = MyStructure->CStructure();
|
||||
MyCGroup.Struct->Id = int (MyStructure->Identification ());
|
||||
MyCGroup.ptrGroup = NULL;
|
||||
|
||||
MyCGroup.Struct = MyStructure->CStructure();
|
||||
MyCGroup.Struct->Id = int (MyStructure->Identification ());
|
||||
MyCGroup.IsDeleted = 0;
|
||||
MyCGroup.IsOpen = 0;
|
||||
MyCGroup.LabelBegin = int (TheLabelBegin);
|
||||
MyCGroup.LabelEnd = int (TheLabelEnd);
|
||||
MyCGroup.ContextLine.IsDef = 0,
|
||||
MyCGroup.ContextText.IsDef = 0,
|
||||
MyCGroup.ContextMarker.IsDef = 0,
|
||||
MyCGroup.ContextFillArea.IsDef = 0;
|
||||
|
||||
MyCGroup.StructureEnd = Structure_END;
|
||||
MyCGroup.ContextLine.IsSet = 0,
|
||||
MyCGroup.ContextText.IsSet = 0,
|
||||
MyCGroup.ContextMarker.IsSet = 0,
|
||||
MyCGroup.ContextFillArea.IsSet = 0;
|
||||
|
||||
MyCGroup.ContextLine.IsDef = 0,
|
||||
MyCGroup.ContextText.IsDef = 0,
|
||||
MyCGroup.ContextMarker.IsDef = 0,
|
||||
MyCGroup.ContextFillArea.IsDef = 0;
|
||||
MyCGroup.PickId.IsDef = 0,
|
||||
MyCGroup.PickId.IsSet = 0,
|
||||
MyCGroup.PickId.Value = 0;
|
||||
|
||||
MyCGroup.ContextLine.IsSet = 0,
|
||||
MyCGroup.ContextText.IsSet = 0,
|
||||
MyCGroup.ContextMarker.IsSet = 0,
|
||||
MyCGroup.ContextFillArea.IsSet = 0;
|
||||
Handle(Aspect_GraphicDriver) agd =
|
||||
((MyStructure->StructureManager ())->GraphicDevice ())->GraphicDriver ();
|
||||
|
||||
MyCGroup.PickId.IsDef = 0,
|
||||
MyCGroup.PickId.IsSet = 0,
|
||||
MyCGroup.PickId.Value = 0;
|
||||
MyGraphicDriver = *(Handle(Graphic3d_GraphicDriver) *) &agd;
|
||||
|
||||
Handle(Aspect_GraphicDriver) agd =
|
||||
((MyStructure->StructureManager ())->GraphicDevice ())->GraphicDriver ();
|
||||
MyGraphicDriver->Group (MyCGroup);
|
||||
|
||||
MyGraphicDriver = *(Handle(Graphic3d_GraphicDriver) *) &agd;
|
||||
|
||||
MyGraphicDriver->Group (MyCGroup);
|
||||
|
||||
//MyCGroup.TransformPersistenceFlag = Graphic3d_TMF_None;
|
||||
//MyCGroup.Struct->TransformPersistenceFlag = Graphic3d_TMF_None;
|
||||
MyMarkWidth = 0;
|
||||
MyMarkHeight = 0;
|
||||
MyMarkArray.Nullify();
|
||||
MyMarkWidth = 0;
|
||||
MyMarkHeight = 0;
|
||||
MyMarkArray.Nullify();
|
||||
}
|
||||
|
@@ -18,10 +18,6 @@
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define XDESTROY
|
||||
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration des variables specifiques aux groupes
|
||||
@@ -81,25 +77,22 @@ void Graphic3d_Group::Clear (Standard_Boolean theUpdateStructureMgr)
|
||||
Update ();
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Destroy () {
|
||||
|
||||
#ifdef DESTROY
|
||||
cout << "Graphic3d_Group::Destroy ()\n";
|
||||
#endif
|
||||
|
||||
void Graphic3d_Group::Destroy ()
|
||||
{
|
||||
// tell graphics driver to clear internal resources of the group
|
||||
if (!IsEmpty () && !MyGraphicDriver.IsNull ())
|
||||
MyGraphicDriver->ClearGroup (MyCGroup);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Remove () {
|
||||
|
||||
void Graphic3d_Group::Remove ()
|
||||
{
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
MyCGroup.IsDeleted = 1;
|
||||
MyGraphicDriver->RemoveGroup (MyCGroup);
|
||||
MyStructure->Remove (this);
|
||||
MyCGroup.ptrGroup = NULL;
|
||||
|
||||
Update ();
|
||||
|
||||
MyBounds.XMin = ShortRealLast (),
|
||||
@@ -113,37 +106,4 @@ void Graphic3d_Group::Remove () {
|
||||
if (MyContainsFacet) MyStructure->GroupsWithFacet (-1);
|
||||
MyContainsFacet = Standard_False,
|
||||
MyIsEmpty = Standard_True;
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::BeginPrimitives () {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
if (MyCGroup.IsOpen) return;
|
||||
|
||||
MyCGroup.IsOpen = 1;
|
||||
|
||||
MyGraphicDriver->OpenGroup (MyCGroup);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::EndPrimitives () {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
if (! MyCGroup.IsOpen) return;
|
||||
|
||||
MyCGroup.IsOpen = 0;
|
||||
|
||||
MyGraphicDriver->CloseGroup (MyCGroup);
|
||||
|
||||
}
|
||||
|
||||
/*void Graphic3d_Group::SetTransformPersistence( const Graphic3d_TransModeFlags& AFlag )
|
||||
{
|
||||
//MyCGroup.TransformPersistenceFlag = AFlag;
|
||||
}
|
||||
|
||||
Graphic3d_TransModeFlags Graphic3d_Group::TransformPersistence() const
|
||||
{
|
||||
//return MyCGroup.TransformPersistenceFlag;
|
||||
}*/
|
||||
|
@@ -57,14 +57,14 @@ void Graphic3d_Group::Text (
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
Standard_ShortReal X, Y, Z;
|
||||
APoint.Coord (X, Y, Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = X;
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Y;
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = X;
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Y;
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
|
||||
}
|
||||
|
||||
MyGraphicDriver->Text(MyCGroup, AText, APoint, AHeight, AAngle, ATp, AHta, AVta, EvalMinMax);
|
||||
@@ -85,14 +85,14 @@ void Graphic3d_Group::Text (
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
Standard_ShortReal X, Y, Z;
|
||||
APoint.Coord (X, Y, Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = X;
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Y;
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = X;
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Y;
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
|
||||
}
|
||||
|
||||
MyGraphicDriver->Text (MyCGroup, AText, APoint, AHeight, EvalMinMax);
|
||||
@@ -117,14 +117,14 @@ void Graphic3d_Group::Text (
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
Standard_ShortReal X, Y, Z;
|
||||
APoint.Coord (X, Y, Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = X;
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Y;
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = X;
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Y;
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
|
||||
}
|
||||
|
||||
MyGraphicDriver->Text(MyCGroup, AText, APoint, AHeight, AAngle, ATp, AHta, AVta, EvalMinMax);
|
||||
@@ -145,14 +145,14 @@ void Graphic3d_Group::Text (
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
Standard_ShortReal X, Y, Z;
|
||||
APoint.Coord (X, Y, Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = X;
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Y;
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = X;
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Y;
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
|
||||
}
|
||||
|
||||
MyGraphicDriver->Text (MyCGroup, AText, APoint, AHeight, EvalMinMax);
|
||||
|
@@ -60,61 +60,6 @@ void Graphic3d_Group :: AddPrimitiveArray ( const Handle(Graphic3d_ArrayOfPrimit
|
||||
Update ();
|
||||
}
|
||||
|
||||
void Graphic3d_Group :: RemovePrimitiveArrays () {
|
||||
// clear primitives array's visualization data in graphics driver and remove
|
||||
// references to it in driver
|
||||
if (!IsEmpty() && !MyGraphicDriver.IsNull())
|
||||
{
|
||||
for (Graphic3d_ListIteratorOfListOfPArray it (MyListOfPArray);
|
||||
it.More(); it.Next())
|
||||
MyGraphicDriver->RemovePrimitiveArray (MyCGroup, it.Value()->Array());
|
||||
}
|
||||
|
||||
// remove references to primitives arrays
|
||||
MyListOfPArray.Clear();
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_Group :: ArrayNumber () const {
|
||||
|
||||
return MyListOfPArray.Extent();
|
||||
}
|
||||
|
||||
void Graphic3d_Group :: InitDefinedArray() {
|
||||
MyListOfPArrayIterator.Initialize(MyListOfPArray);
|
||||
}
|
||||
|
||||
void Graphic3d_Group :: NextDefinedArray() {
|
||||
MyListOfPArrayIterator.Next();
|
||||
}
|
||||
|
||||
Standard_Boolean Graphic3d_Group :: MoreDefinedArray() {
|
||||
return MyListOfPArrayIterator.More();
|
||||
}
|
||||
|
||||
Handle(Graphic3d_ArrayOfPrimitives) Graphic3d_Group :: DefinedArray() const {
|
||||
|
||||
return MyListOfPArrayIterator.Value();
|
||||
}
|
||||
|
||||
void Graphic3d_Group :: RemovePrimitiveArray ( const Standard_Integer aRank ) {
|
||||
|
||||
if( aRank < 1 || aRank > ArrayNumber() ) {
|
||||
Standard_OutOfRange::Raise(" BAD ARRAY index");
|
||||
}
|
||||
Graphic3d_ListIteratorOfListOfPArray it(MyListOfPArray);
|
||||
for( Standard_Integer i=1 ; it.More() ; it.Next(),i++ ) {
|
||||
if( aRank == i ) break;
|
||||
}
|
||||
|
||||
// clear primitives array's visualization data in graphics driver and remove
|
||||
// references to it in driver
|
||||
if (!IsEmpty() && !MyGraphicDriver.IsNull())
|
||||
MyGraphicDriver->RemovePrimitiveArray (MyCGroup, it.Value()->Array());
|
||||
|
||||
// remove references to primitives array
|
||||
MyListOfPArray.Remove (it);
|
||||
}
|
||||
|
||||
void Graphic3d_Group :: UserDraw ( const Standard_Address AnObject,
|
||||
const Standard_Boolean EvalMinMax,
|
||||
const Standard_Boolean ContainsFacet )
|
||||
|
@@ -46,10 +46,7 @@
|
||||
|
||||
Standard_Boolean Graphic3d_Group::IsDeleted () const {
|
||||
|
||||
if ( (MyCGroup.IsDeleted) || (MyStructure->IsDeleted ()) )
|
||||
return (Standard_True);
|
||||
else
|
||||
return (Standard_False);
|
||||
return ( (MyCGroup.ptrGroup == NULL) || (MyStructure->IsDeleted ()) );
|
||||
|
||||
}
|
||||
|
||||
@@ -117,13 +114,6 @@ void Graphic3d_Group::MinMaxCoord (Standard_Real& XMin, Standard_Real& YMin, Sta
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Labels (Standard_Integer& LB, Standard_Integer& LE) const {
|
||||
|
||||
LB = Standard_Integer (MyCGroup.LabelBegin);
|
||||
LE = Standard_Integer (MyCGroup.LabelEnd);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Update () const {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
@@ -40,59 +40,53 @@
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
void Graphic3d_Group::Marker (const Graphic3d_Vertex& APoint, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
void Graphic3d_Group::Marker (const Graphic3d_Vertex &APoint, const Standard_Boolean EvalMinMax)
|
||||
{
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
Standard_ShortReal X, Y, Z;
|
||||
APoint.Coord (X, Y, Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = X;
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Y;
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = X;
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Y;
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
|
||||
}
|
||||
|
||||
MyGraphicDriver->Marker (MyCGroup, APoint, EvalMinMax);
|
||||
MyGraphicDriver->Marker (MyCGroup, APoint);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::MarkerSet (const Graphic3d_Array1OfVertex& ListVertex, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
void Graphic3d_Group::MarkerSet (const Graphic3d_Array1OfVertex &ListVertex, const Standard_Boolean EvalMinMax)
|
||||
{
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
Standard_Integer Lower = ListVertex.Lower ();
|
||||
Standard_Integer Upper = ListVertex.Upper ();
|
||||
Standard_ShortReal X, Y, Z;
|
||||
Standard_Integer i = ListVertex.Lower ();
|
||||
const Standard_Integer Upper = ListVertex.Upper ();
|
||||
// Parcours des sommets
|
||||
for (j=0, i=Lower; i<=Upper; i++, j++) {
|
||||
for (; i<=Upper; i++) {
|
||||
ListVertex (i).Coord (X, Y, Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = X;
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Y;
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = X;
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Y;
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->MarkerSet (MyCGroup, ListVertex, EvalMinMax);
|
||||
MyGraphicDriver->MarkerSet (MyCGroup, ListVertex);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
@@ -1,121 +0,0 @@
|
||||
// Created by: NW,JPB,CAL
|
||||
// Copyright (c) 1991-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
// Modified
|
||||
// 27/08/97 ; PCT : ajout coordonnee texture
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration des variables specifiques aux groupes
|
||||
// de primitives
|
||||
|
||||
//-Warning Un groupe est defini dans une structure
|
||||
// Il s'agit de la plus petite entite editable
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_Group.jxx>
|
||||
#include <Graphic3d_Group.pxx>
|
||||
|
||||
#include <Graphic3d_VertexN.hxx>
|
||||
#include <Graphic3d_VertexNT.hxx>
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
void Graphic3d_Group::Polygon (const Graphic3d_Array1OfVertex& ListVertex, const Graphic3d_TypeOfPolygon AType, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
|
||||
Standard_Real X, Y, Z;
|
||||
Standard_Integer i, j;
|
||||
Standard_Integer Lower = ListVertex.Lower ();
|
||||
Standard_Integer Upper = ListVertex.Upper ();
|
||||
// Parcours des sommets
|
||||
for (j=0, i=Lower; i<=Upper; i++, j++) {
|
||||
ListVertex (i).Coord (X, Y, Z);
|
||||
if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
|
||||
if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
|
||||
if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
|
||||
if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
|
||||
if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
|
||||
if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->Polygon (MyCGroup, ListVertex, AType, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::PolygonSet (const TColStd_Array1OfInteger& Bounds, const Graphic3d_Array1OfVertex& ListVertex, const Graphic3d_TypeOfPolygon AType, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Real X, Y, Z;
|
||||
|
||||
Standard_Integer i, ii;
|
||||
Standard_Integer j;
|
||||
Standard_Integer begin_points;
|
||||
Standard_Integer end_points;
|
||||
Standard_Integer nbpoints;
|
||||
Standard_Integer Lower, Upper;
|
||||
|
||||
begin_points = ListVertex.Lower ();
|
||||
end_points = ListVertex.Upper ();
|
||||
|
||||
Lower = Bounds.Lower ();
|
||||
Upper = Bounds.Upper ();
|
||||
|
||||
// Parcours des facettes
|
||||
for (j=Lower; j<=Upper; j++) {
|
||||
nbpoints = Bounds.Value (j);
|
||||
|
||||
Graphic3d_Array1OfVertex ListOfVertex (0, nbpoints-1);
|
||||
|
||||
// Parcours des sommets
|
||||
for (i=0, ii=begin_points;
|
||||
((ii<=end_points) && (i<=nbpoints-1)); i++, ii++) {
|
||||
ListVertex (ii).Coord (X, Y, Z);
|
||||
ListOfVertex (i).SetCoord (X, Y, Z);
|
||||
}
|
||||
|
||||
Polygon (ListOfVertex, AType, EvalMinMax);
|
||||
begin_points += nbpoints;
|
||||
}
|
||||
|
||||
}
|
@@ -1,112 +0,0 @@
|
||||
// Created by: NW,JPB,CAL
|
||||
// Copyright (c) 1991-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
// 11/97 ; CAL : ajout polyline par 2 points
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration des variables specifiques aux groupes
|
||||
// de primitives
|
||||
|
||||
//-Warning Un groupe est defini dans une structure
|
||||
// Il s'agit de la plus petite entite editable
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_Group.jxx>
|
||||
#include <Graphic3d_Group.pxx>
|
||||
|
||||
#include <Graphic3d_ArrayOfPolylines.hxx>
|
||||
#include <Graphic3d_VertexC.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
|
||||
void Graphic3d_Group::Polyline (const Graphic3d_Array1OfVertex& theListVertex,
|
||||
const Standard_Boolean theToEvalMinMax)
|
||||
{
|
||||
if (IsDeleted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines (theListVertex.Length());
|
||||
|
||||
Standard_Real aX, aY, aZ;
|
||||
Standard_Integer aVertLower = theListVertex.Lower();
|
||||
Standard_Integer aVertUpper = theListVertex.Upper();
|
||||
for (Standard_Integer aVertIter = aVertLower; aVertIter <= aVertUpper; ++aVertIter)
|
||||
{
|
||||
const Graphic3d_Vertex& aVert = theListVertex (aVertIter);
|
||||
aVert.Coord (aX, aY, aZ);
|
||||
aPrims->AddVertex (aX, aY, aZ);
|
||||
}
|
||||
|
||||
AddPrimitiveArray (aPrims, theToEvalMinMax);
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polyline (const Graphic3d_Array1OfVertexC& theListVertex,
|
||||
const Standard_Boolean theToEvalMinMax)
|
||||
{
|
||||
if (IsDeleted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Handle(Graphic3d_ArrayOfPrimitives) aPrims
|
||||
= new Graphic3d_ArrayOfPolylines (theListVertex.Length(), 0, 0, Standard_True); // color per vertex
|
||||
|
||||
Standard_Real aX, aY, aZ;
|
||||
Standard_Integer aVertLower = theListVertex.Lower();
|
||||
Standard_Integer aVertUpper = theListVertex.Upper();
|
||||
for (Standard_Integer aVertIter = aVertLower; aVertIter <= aVertUpper; ++aVertIter)
|
||||
{
|
||||
const Graphic3d_VertexC& aVert = theListVertex (aVertIter);
|
||||
aVert.Coord (aX, aY, aZ);
|
||||
aPrims->AddVertex (gp_Pnt (aX, aY, aZ), aVert.Color());
|
||||
}
|
||||
|
||||
AddPrimitiveArray (aPrims, theToEvalMinMax);
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polyline (const Graphic3d_Vertex& thePnt1,
|
||||
const Graphic3d_Vertex& thePnt2,
|
||||
const Standard_Boolean theToEvalMinMax)
|
||||
{
|
||||
if (IsDeleted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines (2);
|
||||
|
||||
Standard_Real aX, aY, aZ;
|
||||
thePnt1.Coord (aX, aY, aZ);
|
||||
aPrims->AddVertex (aX, aY, aZ);
|
||||
|
||||
thePnt2.Coord (aX, aY, aZ);
|
||||
aPrims->AddVertex (aX, aY, aZ);
|
||||
|
||||
AddPrimitiveArray (aPrims, theToEvalMinMax);
|
||||
}
|
@@ -587,8 +587,8 @@ void Graphic3d_Group::SetPrimitivesAspect (const Handle(Graphic3d_AspectFillArea
|
||||
Standard_ShortReal aPolyFactor, aPolyUnits;
|
||||
CTX->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
|
||||
MyCGroup.ContextFillArea.PolygonOffsetMode = aPolyMode;
|
||||
MyCGroup.ContextFillArea.PolygonOffsetFactor = aPolyFactor;
|
||||
MyCGroup.ContextFillArea.PolygonOffsetUnits = aPolyUnits;
|
||||
MyCGroup.ContextFillArea.PolygonOffsetFactor = (Standard_ShortReal)aPolyFactor;
|
||||
MyCGroup.ContextFillArea.PolygonOffsetUnits = (Standard_ShortReal)aPolyUnits;
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
|
||||
int noinsert = 0;
|
||||
@@ -1110,8 +1110,7 @@ void Graphic3d_Group::GroupPrimitivesAspect (const Handle(Graphic3d_AspectLine3d
|
||||
CTXF->SetFrontMaterial (Front);
|
||||
}
|
||||
|
||||
void Graphic3d_Group::PrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& CTXL, const Handle(Graphic3d_AspectText3d)& CTXT, const Handle(Graphic3d_AspectMarker3d)& CTXM, const Handle(Graphic3d_AspectFillArea3d)& CTXF) const {
|
||||
|
||||
GroupPrimitivesAspect (CTXL, CTXT, CTXM, CTXF);
|
||||
|
||||
void Graphic3d_Group::PrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& CTXL, const Handle(Graphic3d_AspectText3d)& CTXT, const Handle(Graphic3d_AspectMarker3d)& CTXM, const Handle(Graphic3d_AspectFillArea3d)& CTXF) const
|
||||
{
|
||||
GroupPrimitivesAspect (CTXL, CTXT, CTXM, CTXF);
|
||||
}
|
||||
|
@@ -72,9 +72,8 @@ uses
|
||||
TypeOfPrimitive from Graphic3d,
|
||||
TypeOfStructure from Graphic3d,
|
||||
Vector from Graphic3d,
|
||||
VertexNC from Graphic3d,
|
||||
Vertex from Graphic3d,
|
||||
TransModeFlags from Graphic3d,
|
||||
TransModeFlags from Graphic3d,
|
||||
Pnt from gp
|
||||
|
||||
raises
|
||||
@@ -236,8 +235,8 @@ is
|
||||
---Level: Public
|
||||
---Purpose: Modifies the order of displaying the structure.
|
||||
-- Values are between 0 and 10.
|
||||
-- Structures are drawn according to their display priorities
|
||||
-- in ascending order.
|
||||
-- Structures are drawn according to their display priorities
|
||||
-- in ascending order.
|
||||
-- A structure of priority 10 is displayed the last and appears over the others.
|
||||
-- The default value is 5.
|
||||
-- Category: Methods to modify the class definition
|
||||
@@ -860,13 +859,6 @@ is
|
||||
---Purpose: Suppress the highlight for the structure <me>.
|
||||
---Category: Private methods
|
||||
|
||||
GroupLabels ( me : mutable;
|
||||
LB, LE : in out Integer from Standard )
|
||||
is static private;
|
||||
---Level: Internal
|
||||
---Purpose: Returns the labels for a new group in the structure <me>.
|
||||
---Category: Private methods
|
||||
|
||||
Identification ( me )
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
@@ -993,9 +985,6 @@ fields
|
||||
-- the associated C structure
|
||||
MyCStructure : CStructure from Graphic3d;
|
||||
|
||||
-- the group identifier generator
|
||||
MyGroupGenId : GenId from Aspect;
|
||||
|
||||
-- the structures to which the structure is attached
|
||||
MyAncestors : SequenceOfAddress from TColStd;
|
||||
|
||||
|
@@ -112,7 +112,6 @@
|
||||
//-Constructors
|
||||
|
||||
Graphic3d_Structure::Graphic3d_Structure (const Handle(Graphic3d_StructureManager)& AManager):
|
||||
MyGroupGenId (Group_IDMIN, Group_IDMAX),
|
||||
MyAncestors (),
|
||||
MyDescendants (),
|
||||
MyGroups (),
|
||||
@@ -171,9 +170,6 @@ MyHighlightColor (Quantity_NOC_WHITE)
|
||||
MyCStructure.IsInfinite = 0,
|
||||
MyCStructure.HLRValidation = 0;
|
||||
|
||||
MyCStructure.GroupBegin = Structure_GROUPBEGIN;
|
||||
MyCStructure.GroupEnd = Structure_GROUPEND;
|
||||
|
||||
MyCStructure.ContextLine.IsDef = 1,
|
||||
MyCStructure.ContextFillArea.IsDef = 1,
|
||||
MyCStructure.ContextMarker.IsDef = 1,
|
||||
@@ -236,10 +232,7 @@ void Graphic3d_Structure::Clear (const Standard_Boolean WithDestruction)
|
||||
|
||||
// only then remove group references
|
||||
if (WithDestruction)
|
||||
{
|
||||
MyGroupGenId.Free();
|
||||
MyGroups.Clear();
|
||||
}
|
||||
|
||||
MyStructureManager->Clear (this, WithDestruction);
|
||||
|
||||
@@ -726,12 +719,6 @@ void Graphic3d_Structure::GraphicClear (const Standard_Boolean WithDestruction)
|
||||
|
||||
if (WithDestruction)
|
||||
{
|
||||
/*
|
||||
* void Prs3d_Presentation::Clear () {
|
||||
* Graphic3d_Structure::Clear ();
|
||||
* myCurrentGroup = new Graphic3d_Group (this);
|
||||
* }
|
||||
*/
|
||||
while (!MyGroups.IsEmpty())
|
||||
{
|
||||
Handle(Graphic3d_Group) aGroup = MyGroups.First();
|
||||
@@ -1251,8 +1238,8 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectFill
|
||||
Standard_ShortReal aPolyFactor, aPolyUnits;
|
||||
CTX->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
|
||||
MyCStructure.ContextFillArea.PolygonOffsetMode = aPolyMode;
|
||||
MyCStructure.ContextFillArea.PolygonOffsetFactor = aPolyFactor;
|
||||
MyCStructure.ContextFillArea.PolygonOffsetUnits = aPolyUnits;
|
||||
MyCStructure.ContextFillArea.PolygonOffsetFactor = (Standard_ShortReal)aPolyFactor;
|
||||
MyCStructure.ContextFillArea.PolygonOffsetUnits = (Standard_ShortReal)aPolyUnits;
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
|
||||
MyGraphicDriver->ContextStructure (MyCStructure);
|
||||
@@ -1306,7 +1293,7 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectText
|
||||
MyCStructure.ContextText.ColorSubTitle.b = float (Bs);
|
||||
MyCStructure.ContextText.TextZoomable = ATextZoomable;
|
||||
MyCStructure.ContextText.TextAngle = float (ATextAngle);
|
||||
MyCStructure.ContextText.TextFontAspect = (int)ATextFontAspect;
|
||||
MyCStructure.ContextText.TextFontAspect = int (ATextFontAspect);
|
||||
|
||||
MyCStructure.ContextText.IsDef = 1;
|
||||
|
||||
@@ -1743,13 +1730,6 @@ void Graphic3d_Structure::MinMaxValues (Standard_Real& XMin, Standard_Real& YMin
|
||||
}
|
||||
}
|
||||
|
||||
void Graphic3d_Structure::GroupLabels (Standard_Integer& LB, Standard_Integer& LE) {
|
||||
|
||||
LB = MyGroupGenId.Next ();
|
||||
LE = MyGroupGenId.Next ();
|
||||
|
||||
}
|
||||
|
||||
Standard_Integer Graphic3d_Structure::Identification () const {
|
||||
|
||||
Standard_Integer Result = MyCStructure.Id;
|
||||
@@ -1842,20 +1822,14 @@ void Graphic3d_Structure::Remove (const Standard_Address APtr, const Graphic3d_T
|
||||
|
||||
void Graphic3d_Structure::Remove (const Handle(Graphic3d_Group)& AGroup) {
|
||||
|
||||
Standard_Integer index = 0;
|
||||
Standard_Integer Length = MyGroups.Length ();
|
||||
for (Standard_Integer i=1; i<=Length && index==0; i++)
|
||||
if (MyGroups.Value (i) == AGroup) index = i;
|
||||
|
||||
const Standard_Integer Length = MyGroups.Length ();
|
||||
// Search in Groups
|
||||
if (index != 0) {
|
||||
Standard_Integer GroupLabelBegin, GroupLabelEnd;
|
||||
AGroup->Labels (GroupLabelBegin, GroupLabelEnd);
|
||||
MyGroupGenId.Free (GroupLabelBegin);
|
||||
MyGroupGenId.Free (GroupLabelEnd);
|
||||
MyGroups.Remove (index);
|
||||
}
|
||||
|
||||
for (Standard_Integer i=1; i<=Length; i++)
|
||||
if (MyGroups.Value (i) == AGroup)
|
||||
{
|
||||
MyGroups.Remove (i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Handle(Graphic3d_StructureManager) Graphic3d_Structure::StructureManager () const {
|
||||
@@ -1887,11 +1861,11 @@ void Graphic3d_Structure::MinMaxCoord (Standard_Real& XMin, Standard_Real& YMin,
|
||||
(MyGroups.Value (i))->MinMaxValues(Xm, Ym, Zm, XM, YM, ZM);
|
||||
Graphic3d_Vertex vertex1(Xm, Ym, Zm);
|
||||
Graphic3d_Vertex vertex2(XM, YM, ZM);
|
||||
Standard_Real distance = vertex1.Distance( vertex1,vertex2 );
|
||||
const Standard_Real distance = vertex1.Distance( vertex2 );
|
||||
if( distance >= 500000.0){
|
||||
XMin = XMax = (Xm+ XM)/2.0;
|
||||
YMin = YMax = (Ym+ YM)/2.0;
|
||||
ZMin = ZMax = (Zm+ ZM)/2.0;
|
||||
XMin = XMax = 0.5*(Xm+ XM);
|
||||
YMin = YMax = 0.5*(Ym+ YM);
|
||||
ZMin = ZMax = 0.5*(Zm+ ZM);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2144,7 +2118,7 @@ void Graphic3d_Structure::UpdateStructure (const Handle(Graphic3d_AspectLine3d)&
|
||||
MyCStructure.ContextText.ColorSubTitle.b = float (Bs);
|
||||
MyCStructure.ContextText.TextZoomable = ATextZoomable;
|
||||
MyCStructure.ContextText.TextAngle = float (ATextAngle);
|
||||
MyCStructure.ContextText.TextFontAspect = (int)ATextFontAspect;
|
||||
MyCStructure.ContextText.TextFontAspect = int (ATextFontAspect);
|
||||
|
||||
|
||||
|
||||
@@ -2323,8 +2297,8 @@ void Graphic3d_Structure::UpdateStructure (const Handle(Graphic3d_AspectLine3d)&
|
||||
Standard_ShortReal aPolyFactor, aPolyUnits;
|
||||
CTXF->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
|
||||
MyCStructure.ContextFillArea.PolygonOffsetMode = aPolyMode;
|
||||
MyCStructure.ContextFillArea.PolygonOffsetFactor = aPolyFactor;
|
||||
MyCStructure.ContextFillArea.PolygonOffsetUnits = aPolyUnits;
|
||||
MyCStructure.ContextFillArea.PolygonOffsetFactor = (Standard_ShortReal)aPolyFactor;
|
||||
MyCStructure.ContextFillArea.PolygonOffsetUnits = (Standard_ShortReal)aPolyUnits;
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
}
|
||||
|
||||
|
@@ -49,12 +49,6 @@
|
||||
|
||||
#include <Graphic3d_Group.pxx>
|
||||
|
||||
// check the value of Group_IDMIN (must be > last label value)
|
||||
// (today Structure_LABCONNECT)
|
||||
#define Structure_GROUPBEGIN Group_IDMIN-2
|
||||
#define Structure_GROUPEND Group_IDMIN-1
|
||||
#define Structure_END Group_IDMIN-1
|
||||
|
||||
#define MyStructureManager ((Graphic3d_StructureManager*) MyPtrStructureManager)
|
||||
#define MyFirstStructureManager ((Graphic3d_StructureManager*) MyFirstPtrStructureManager)
|
||||
|
||||
|
@@ -72,17 +72,11 @@ MyNorme (Standard_ShortReal (Graphic3d_Vector::NormeOf (AX, AY, AZ))) {
|
||||
|
||||
Graphic3d_Vector::Graphic3d_Vector (const Graphic3d_Vertex& APoint1, const Graphic3d_Vertex& APoint2) {
|
||||
|
||||
Standard_Real X1, Y1, Z1;
|
||||
Standard_Real X2, Y2, Z2;
|
||||
MyX = APoint2.X() - APoint1.X();
|
||||
MyY = APoint2.Y() - APoint1.Y();
|
||||
MyZ = APoint2.Z() - APoint1.Z();
|
||||
|
||||
APoint1.Coord (X1, Y1, Z1);
|
||||
APoint2.Coord (X2, Y2, Z2);
|
||||
|
||||
MyX = Standard_ShortReal (X2 - X1);
|
||||
MyY = Standard_ShortReal (Y2 - Y1);
|
||||
MyZ = Standard_ShortReal (Z2 - Z1);
|
||||
|
||||
MyNorme = Standard_ShortReal (Graphic3d_Vector::NormeOf (X2 - X1, Y2 - Y1, Z2 - Z1));
|
||||
MyNorme = Standard_ShortReal (Graphic3d_Vector::NormeOf (MyX, MyY, MyZ));
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1,140 +0,0 @@
|
||||
-- Created by: NW,JPB,CAL
|
||||
-- Copyright (c) 1991-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
--
|
||||
-- The content of this file is subject to the Open CASCADE Technology Public
|
||||
-- License Version 6.5 (the "License"). You may not use the content of this file
|
||||
-- except in compliance with the License. Please obtain a copy of the License
|
||||
-- at http://www.opencascade.org and read it completely before using this file.
|
||||
--
|
||||
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
--
|
||||
-- The Original Code and all software distributed under the License is
|
||||
-- distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
-- Initial Developer hereby disclaims all such warranties, including without
|
||||
-- limitation, any warranties of merchantability, fitness for a particular
|
||||
-- purpose or non-infringement. Please see the License for the specific terms
|
||||
-- and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
class Vertex from Graphic3d
|
||||
|
||||
---Purpose: This class allows the creation and update of a
|
||||
-- 3D point.
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns Vertex from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with 0.0, 0.0, 0.0 coordinates.
|
||||
|
||||
Create ( APoint : Vertex from Graphic3d )
|
||||
returns Vertex from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with coordinates identical to <APoint>.
|
||||
--
|
||||
-- It's just a copy, but this simplifies the management
|
||||
-- of the constructors of VertexC, VertexN and VertexNC.
|
||||
|
||||
Create ( AX, AY ,AZ : Real from Standard )
|
||||
returns Vertex from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with <AX>, <AY> and <AZ> coordinates.
|
||||
|
||||
---------------------------------------------------
|
||||
-- Category: Methods to modify the class definition
|
||||
---------------------------------------------------
|
||||
|
||||
SetCoord ( me : in out;
|
||||
Xnew, Ynew, Znew : Real from Standard )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Modifies the coordinates of the point <me>.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
SetXCoord ( me : in out;
|
||||
Xnew : Real from Standard )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Modifies the X coordinate of the point <me>.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
SetYCoord ( me : in out;
|
||||
Ynew : Real from Standard )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Modifies the Y coordinate of the point <me>.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
SetZCoord ( me : in out;
|
||||
Znew : Real from Standard )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Modifies the Z coordinate of the point <me>.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
----------------------------
|
||||
-- Category: Inquire methods
|
||||
----------------------------
|
||||
|
||||
Coord ( me;
|
||||
AX, AY, AZ : out Real from Standard )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the coordinates of the point <me>.
|
||||
---Category: Inquire methods
|
||||
|
||||
X ( me )
|
||||
returns Real from Standard
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the X coordinates of the point <me>.
|
||||
---Category: Inquire methods
|
||||
|
||||
Y ( me )
|
||||
returns Real from Standard
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the Y coordinate of the point <me>.
|
||||
---Category: Inquire methods
|
||||
|
||||
Z ( me )
|
||||
returns Real from Standard
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the Z coordinate of the point <me>.
|
||||
---Category: Inquire methods
|
||||
|
||||
--------------------------
|
||||
-- Category: Class methods
|
||||
--------------------------
|
||||
|
||||
Distance ( myclass;
|
||||
AV1 : Vertex from Graphic3d;
|
||||
AV2 : Vertex from Graphic3d )
|
||||
returns Real from Standard;
|
||||
---Level: Public
|
||||
---Purpose: Returns the distance between <AV1> and <AV2>.
|
||||
---Category: Class methods
|
||||
|
||||
--
|
||||
|
||||
fields
|
||||
|
||||
--
|
||||
-- Class : Graphic3d_Vertex
|
||||
--
|
||||
-- Purpose : Declaration of variables specific to points
|
||||
--
|
||||
-- Reminder : A point is defined by its coordinates
|
||||
--
|
||||
--
|
||||
|
||||
-- the coordinates of a point
|
||||
MyX : ShortReal from Standard;
|
||||
MyY : ShortReal from Standard;
|
||||
MyZ : ShortReal from Standard;
|
||||
|
||||
end Vertex;
|
@@ -17,114 +17,11 @@
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
#include <Graphic3d_Vertex.hxx>
|
||||
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration des variables specifiques aux points
|
||||
|
||||
//-Warning Un point est defini par ses coordonnees
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_Vertex.ixx>
|
||||
|
||||
//-Aliases
|
||||
|
||||
//-Global data definitions
|
||||
|
||||
// -- les coordonnees du point
|
||||
// MyX : Standard_ShortReal;
|
||||
// MyY : Standard_ShortReal;
|
||||
// MyZ : Standard_ShortReal;
|
||||
|
||||
//-Constructors
|
||||
|
||||
//-Destructors
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
Graphic3d_Vertex::Graphic3d_Vertex ():
|
||||
MyX (Standard_ShortReal (0.0)),
|
||||
MyY (Standard_ShortReal (0.0)),
|
||||
MyZ (Standard_ShortReal (0.0)) {
|
||||
}
|
||||
|
||||
Graphic3d_Vertex::Graphic3d_Vertex (const Graphic3d_Vertex& P) {
|
||||
|
||||
MyX = Standard_ShortReal (P.X ());
|
||||
MyY = Standard_ShortReal (P.Y ());
|
||||
MyZ = Standard_ShortReal (P.Z ());
|
||||
|
||||
}
|
||||
|
||||
Graphic3d_Vertex::Graphic3d_Vertex (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ):
|
||||
MyX (Standard_ShortReal (AX)),
|
||||
MyY (Standard_ShortReal (AY)),
|
||||
MyZ (Standard_ShortReal (AZ)) {
|
||||
}
|
||||
|
||||
void Graphic3d_Vertex::Coord (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const {
|
||||
|
||||
X = Standard_Real (MyX);
|
||||
Y = Standard_Real (MyY);
|
||||
Z = Standard_Real (MyZ);
|
||||
|
||||
}
|
||||
|
||||
Standard_Real Graphic3d_Vertex::X () const {
|
||||
|
||||
return Standard_Real (MyX);
|
||||
|
||||
}
|
||||
|
||||
Standard_Real Graphic3d_Vertex::Y () const {
|
||||
|
||||
return Standard_Real (MyY);
|
||||
|
||||
}
|
||||
|
||||
Standard_Real Graphic3d_Vertex::Z () const {
|
||||
|
||||
return Standard_Real (MyZ);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Vertex::SetCoord (const Standard_Real Xnew, const Standard_Real Ynew, const Standard_Real Znew) {
|
||||
|
||||
MyX = Standard_ShortReal (Xnew);
|
||||
MyY = Standard_ShortReal (Ynew);
|
||||
MyZ = Standard_ShortReal (Znew);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Vertex::SetXCoord (const Standard_Real Xnew) {
|
||||
|
||||
MyX = Standard_ShortReal (Xnew);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Vertex::SetYCoord (const Standard_Real Ynew) {
|
||||
|
||||
MyY = Standard_ShortReal (Ynew);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Vertex::SetZCoord (const Standard_Real Znew) {
|
||||
|
||||
MyZ = Standard_ShortReal (Znew);
|
||||
|
||||
}
|
||||
|
||||
Standard_Real Graphic3d_Vertex::Distance (const Graphic3d_Vertex& AV1, const Graphic3d_Vertex& AV2) {
|
||||
|
||||
return (Sqrt ( (AV1.X () - AV2.X ()) * (AV1.X () - AV2.X ())
|
||||
+ (AV1.Y () - AV2.Y ()) * (AV1.Y () - AV2.Y ())
|
||||
+ (AV1.Z () - AV2.Z ()) * (AV1.Z () - AV2.Z ())));
|
||||
Standard_ShortReal Graphic3d_Vertex::Distance(const Graphic3d_Vertex& AOther) const
|
||||
{
|
||||
return sqrt( (X() - AOther.X()) * (X() - AOther.X())
|
||||
+ (Y() - AOther.Y()) * (Y() - AOther.Y())
|
||||
+ (Z() - AOther.Z()) * (Z() - AOther.Z()) );
|
||||
}
|
||||
|
66
src/Graphic3d/Graphic3d_Vertex.hxx
Normal file
66
src/Graphic3d/Graphic3d_Vertex.hxx
Normal file
@@ -0,0 +1,66 @@
|
||||
// Created on: 2012-06-20
|
||||
// Created by: Sergey ZERCHANINOV
|
||||
// Copyright (c) 2011-2012 OPEN CASCADE SAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
#ifndef _Graphic3d_Vertex_HeaderFile
|
||||
#define _Graphic3d_Vertex_HeaderFile
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <InterfaceGraphic_telem.hxx>
|
||||
#include <Standard_ShortReal.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
|
||||
//! This class represents a graphical 3D point. <br>
|
||||
class Graphic3d_Vertex : public TEL_POINT
|
||||
{
|
||||
public:
|
||||
//! Creates a point with 0.0, 0.0, 0.0 coordinates. <br>
|
||||
Graphic3d_Vertex()
|
||||
{ SetCoord(0.f,0.f,0.f); }
|
||||
//! Creates a point with coordinates identical to <APoint>. <br>
|
||||
Graphic3d_Vertex(const Graphic3d_Vertex& APoint)
|
||||
{ SetCoord(APoint.X(),APoint.Y(),APoint.Z()); }
|
||||
//! Creates a point with <AX>, <AY> and <AZ> coordinates. <br>
|
||||
Graphic3d_Vertex(const Standard_ShortReal AX,const Standard_ShortReal AY,const Standard_ShortReal AZ)
|
||||
{ SetCoord(AX,AY,AZ); }
|
||||
//! Creates a point with <AX>, <AY> and <AZ> coordinates. <br>
|
||||
Graphic3d_Vertex(const Standard_Real AX,const Standard_Real AY,const Standard_Real AZ)
|
||||
{ SetCoord(AX,AY,AZ); }
|
||||
//! Modifies the coordinates of the point <me>. <br>
|
||||
void SetCoord(const Standard_ShortReal AX,const Standard_ShortReal AY,const Standard_ShortReal AZ)
|
||||
{ xyz[0] = AX, xyz[1] = AY, xyz[2] = AZ; }
|
||||
//! Modifies the coordinates of the point <me>. <br>
|
||||
void SetCoord(const Standard_Real AX,const Standard_Real AY,const Standard_Real AZ)
|
||||
{ xyz[0] = Standard_ShortReal(AX), xyz[1] = Standard_ShortReal(AY), xyz[2] = Standard_ShortReal(AZ); }
|
||||
//! Returns the coordinates of the point <me>. <br>
|
||||
void Coord(Standard_ShortReal& AX,Standard_ShortReal& AY,Standard_ShortReal& AZ) const
|
||||
{ AX = xyz[0], AY = xyz[1], AZ = xyz[2]; }
|
||||
//! Returns the coordinates of the point <me>. <br>
|
||||
void Coord(Standard_Real& AX,Standard_Real& AY,Standard_Real& AZ) const
|
||||
{ AX = xyz[0], AY = xyz[1], AZ = xyz[2]; }
|
||||
//! Returns the X coordinates of the point <me>. <br>
|
||||
Standard_ShortReal X() const { return xyz[0]; }
|
||||
//! Returns the Y coordinate of the point <me>. <br>
|
||||
Standard_ShortReal Y() const { return xyz[1]; }
|
||||
//! Returns the Z coordinate of the point <me>. <br>
|
||||
Standard_ShortReal Z() const { return xyz[2]; }
|
||||
//! Returns the distance between <AV1> and <AV2>. <br>
|
||||
Standard_EXPORT Standard_ShortReal Distance(const Graphic3d_Vertex& AOther) const;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,94 +0,0 @@
|
||||
-- Created by: NW,JPB,CAL
|
||||
-- Copyright (c) 1991-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
--
|
||||
-- The content of this file is subject to the Open CASCADE Technology Public
|
||||
-- License Version 6.5 (the "License"). You may not use the content of this file
|
||||
-- except in compliance with the License. Please obtain a copy of the License
|
||||
-- at http://www.opencascade.org and read it completely before using this file.
|
||||
--
|
||||
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
--
|
||||
-- The Original Code and all software distributed under the License is
|
||||
-- distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
-- Initial Developer hereby disclaims all such warranties, including without
|
||||
-- limitation, any warranties of merchantability, fitness for a particular
|
||||
-- purpose or non-infringement. Please see the License for the specific terms
|
||||
-- and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
class VertexC from Graphic3d inherits Vertex from Graphic3d
|
||||
|
||||
---Version:
|
||||
|
||||
---Purpose: This class allows the creation and update of a point
|
||||
-- with a colour value.
|
||||
|
||||
---Keywords: Vertex, Color, Coordinate, Point
|
||||
|
||||
---Warning:
|
||||
---References:
|
||||
|
||||
uses
|
||||
|
||||
Color from Quantity
|
||||
---Purpose: Returns the color of this point.
|
||||
is
|
||||
|
||||
Create
|
||||
returns VertexC from Graphic3d;
|
||||
---Purpose: Constructs an empty point
|
||||
|
||||
Create ( AX, AY ,AZ : Real from Standard;
|
||||
AColor : Color from Quantity )
|
||||
returns VertexC from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with coordinates <AX>, <AY>, <AZ> and
|
||||
-- with colour <AColor>.
|
||||
|
||||
Create ( APoint : Vertex from Graphic3d;
|
||||
AColor : Color from Quantity )
|
||||
returns VertexC from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point situated in <APoint> and
|
||||
-- for which the colour is <AColor>.
|
||||
|
||||
---------------------------------------------------
|
||||
-- Category: Methods to modify the class definition
|
||||
---------------------------------------------------
|
||||
|
||||
SetColor ( me : in out;
|
||||
ColorNew : Color from Quantity )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Modifies the colour of the point <me>.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
----------------------------
|
||||
-- Category: Inquire methods
|
||||
----------------------------
|
||||
|
||||
Color ( me )
|
||||
returns Color from Quantity
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the colour of the point <me>.
|
||||
---Category: Inquire methods
|
||||
|
||||
--
|
||||
|
||||
fields
|
||||
|
||||
--
|
||||
-- Class : Graphic3d_VertexC
|
||||
--
|
||||
-- Purpose : Declaration of variables specific to points
|
||||
--
|
||||
-- Reminder : a point is defined by its coordinates and its colour
|
||||
--
|
||||
|
||||
-- the colour of a point
|
||||
MyColor : Color from Quantity;
|
||||
|
||||
end VertexC;
|
@@ -1,80 +0,0 @@
|
||||
// Created by: NW,JPB,CAL
|
||||
// Copyright (c) 1991-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration of variables specific to points
|
||||
|
||||
//-Warning A point is defined by its coordinates and color
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_VertexC.ixx>
|
||||
|
||||
//-Aliases
|
||||
|
||||
//-Global data definitions
|
||||
|
||||
// -- point color
|
||||
// MyColor : Color;
|
||||
|
||||
//-Constructors
|
||||
|
||||
//-Destructors
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
Graphic3d_VertexC::Graphic3d_VertexC () {
|
||||
}
|
||||
|
||||
// :(AX, AY, AZ) as VertexC inherits Vertex and it is necessary to call
|
||||
// constructor of Vertex with AX, AY and AZ to update fields MyX, MyY, MyZ.
|
||||
|
||||
Graphic3d_VertexC::Graphic3d_VertexC (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ, const Quantity_Color& AColor):
|
||||
Graphic3d_Vertex (AX, AY, AZ),
|
||||
MyColor (AColor) {
|
||||
}
|
||||
|
||||
// :(APoint) as VertexC inherits Vertex and it is necessary to call
|
||||
// constructor of Vertex with APoint to update fields MyX, MyY, MyZ.
|
||||
|
||||
Graphic3d_VertexC::Graphic3d_VertexC (const Graphic3d_Vertex& APoint, const Quantity_Color& AColor):
|
||||
Graphic3d_Vertex (APoint),
|
||||
MyColor (AColor) {
|
||||
}
|
||||
|
||||
Quantity_Color Graphic3d_VertexC::Color () const {
|
||||
|
||||
return (MyColor);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_VertexC::SetColor (const Quantity_Color& ColorNew) {
|
||||
|
||||
MyColor = ColorNew;
|
||||
|
||||
}
|
@@ -1,106 +0,0 @@
|
||||
-- Created by: NW,JPB,CAL
|
||||
-- Copyright (c) 1991-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
--
|
||||
-- The content of this file is subject to the Open CASCADE Technology Public
|
||||
-- License Version 6.5 (the "License"). You may not use the content of this file
|
||||
-- except in compliance with the License. Please obtain a copy of the License
|
||||
-- at http://www.opencascade.org and read it completely before using this file.
|
||||
--
|
||||
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
--
|
||||
-- The Original Code and all software distributed under the License is
|
||||
-- distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
-- Initial Developer hereby disclaims all such warranties, including without
|
||||
-- limitation, any warranties of merchantability, fitness for a particular
|
||||
-- purpose or non-infringement. Please see the License for the specific terms
|
||||
-- and conditions governing the rights and limitations under the License.
|
||||
|
||||
-- Modified: 03-02-98 : FMN ; Add Flag Normal
|
||||
|
||||
class VertexN from Graphic3d inherits Vertex from Graphic3d
|
||||
|
||||
---Version:
|
||||
|
||||
---Purpose: This class allows the creation and update of
|
||||
-- a vertex with a 3D normal.
|
||||
|
||||
---Keywords: Vertex, Normal, Coordinate, Point
|
||||
|
||||
---Warning:
|
||||
---References:
|
||||
|
||||
uses
|
||||
|
||||
Vector from Graphic3d
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns VertexN from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with 0.0, 0.0, 0.0 coordinates
|
||||
-- for which the normal is 0.0, 0.0, 1.0.
|
||||
|
||||
Create ( AX, AY, AZ : Real from Standard;
|
||||
ANX, ANY, ANZ : Real from Standard;
|
||||
FlagNormalise : Boolean from Standard = Standard_True )
|
||||
returns VertexN from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with coordinates <AX>, <AY>, <AZ> and
|
||||
-- for which the normal is <ANX>, <ANY>, <ANZ>.
|
||||
-- If <FlagNormalise> is True the normal is already normalised
|
||||
-- Else the normal is not normalised, the graphic do it.
|
||||
|
||||
Create ( APoint : Vertex from Graphic3d;
|
||||
AVector : Vector from Graphic3d;
|
||||
FlagNormalise : Boolean from Standard = Standard_True )
|
||||
returns VertexN from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point in <APoint> for which the normal is <AVector>.
|
||||
-- If <FlagNormalise> is True the normal is already normalised
|
||||
-- Else the normal is not normalised, the graphic do it.
|
||||
|
||||
---------------------------------------------------
|
||||
-- Category: Methods to modify the class definition
|
||||
---------------------------------------------------
|
||||
|
||||
SetNormal ( me : in out;
|
||||
NXnew, NYnew, NZnew : Real from Standard;
|
||||
FlagNormalise : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Modifies the normal to the point <me>.
|
||||
-- If <FlagNormalise> is True the normal is already normalised
|
||||
-- Else the normal is not normalised, the graphic do it.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
----------------------------
|
||||
-- Category: Inquire methods
|
||||
----------------------------
|
||||
|
||||
Normal ( me;
|
||||
ANX, ANY, ANZ : out Real from Standard )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the normal to the point <me>.
|
||||
---Category: Inquire methods
|
||||
|
||||
--
|
||||
|
||||
fields
|
||||
|
||||
--
|
||||
-- Class : Graphic3d_VertexN
|
||||
--
|
||||
-- Purpose : Declaration of variables specific to points.
|
||||
--
|
||||
-- Reminder : A point is defined by its coordinates and its normal.
|
||||
|
||||
-- the normale to the point
|
||||
MyDX : ShortReal from Standard;
|
||||
MyDY : ShortReal from Standard;
|
||||
MyDZ : ShortReal from Standard;
|
||||
|
||||
end VertexN;
|
@@ -1,84 +0,0 @@
|
||||
// Created by: NW,JPB,CAL
|
||||
// Copyright (c) 1991-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
// Modified: 03-02-98 : FMN ; Add Flag Normal
|
||||
// Modified: 15-09-98 : CAL ; Modification champ definissant la normale
|
||||
// pour permettre l'entrelacement des coordonnees dans Optimizer.
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration des variables specifiques aux points
|
||||
|
||||
//-Warning Un point est defini par ses coordonnees et sa normale
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_VertexN.ixx>
|
||||
|
||||
//-Aliases
|
||||
|
||||
//-Global data definitions
|
||||
|
||||
//-Constructors
|
||||
|
||||
//-Destructors
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
Graphic3d_VertexN::Graphic3d_VertexN ():
|
||||
Graphic3d_Vertex (0.0, 0.0, 0.0) {
|
||||
MyDX = 0.0,
|
||||
MyDY = 0.0,
|
||||
MyDZ = 1.0;
|
||||
}
|
||||
|
||||
Graphic3d_VertexN::Graphic3d_VertexN (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ, const Standard_Real ANX, const Standard_Real ANY, const Standard_Real ANZ, const Standard_Boolean FlagNormalise):
|
||||
Graphic3d_Vertex (AX, AY, AZ) {
|
||||
MyDX = (Standard_ShortReal ) ANX,
|
||||
MyDY = (Standard_ShortReal ) ANY,
|
||||
MyDZ = (Standard_ShortReal ) ANZ;
|
||||
}
|
||||
|
||||
Graphic3d_VertexN::Graphic3d_VertexN (const Graphic3d_Vertex& APoint, const Graphic3d_Vector& AVector, const Standard_Boolean FlagNormalise):
|
||||
Graphic3d_Vertex (APoint) {
|
||||
Standard_Real ANX, ANY, ANZ;
|
||||
AVector.Coord (ANX, ANY, ANZ);
|
||||
MyDX = (Standard_ShortReal ) ANX,
|
||||
MyDY = (Standard_ShortReal ) ANY,
|
||||
MyDZ = (Standard_ShortReal ) ANZ;
|
||||
}
|
||||
|
||||
void Graphic3d_VertexN::SetNormal (const Standard_Real ANX, const Standard_Real ANY, const Standard_Real ANZ, const Standard_Boolean FlagNormalise) {
|
||||
MyDX = (Standard_ShortReal ) ANX,
|
||||
MyDY = (Standard_ShortReal ) ANY,
|
||||
MyDZ = (Standard_ShortReal ) ANZ;
|
||||
}
|
||||
|
||||
void Graphic3d_VertexN::Normal (Standard_Real& ANX, Standard_Real& ANY, Standard_Real& ANZ) const {
|
||||
ANX = MyDX,
|
||||
ANY = MyDY,
|
||||
ANZ = MyDZ;
|
||||
}
|
@@ -1,110 +0,0 @@
|
||||
-- Created by: NW,JPB,CAL
|
||||
-- Copyright (c) 1991-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
--
|
||||
-- The content of this file is subject to the Open CASCADE Technology Public
|
||||
-- License Version 6.5 (the "License"). You may not use the content of this file
|
||||
-- except in compliance with the License. Please obtain a copy of the License
|
||||
-- at http://www.opencascade.org and read it completely before using this file.
|
||||
--
|
||||
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
--
|
||||
-- The Original Code and all software distributed under the License is
|
||||
-- distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
-- Initial Developer hereby disclaims all such warranties, including without
|
||||
-- limitation, any warranties of merchantability, fitness for a particular
|
||||
-- purpose or non-infringement. Please see the License for the specific terms
|
||||
-- and conditions governing the rights and limitations under the License.
|
||||
|
||||
-- Modified: 03-02-98 : FMN ; Add Flag Normal
|
||||
|
||||
class VertexNC from Graphic3d inherits VertexN from Graphic3d
|
||||
|
||||
---Version:
|
||||
|
||||
---Purpose: This class allows the creation of a vertex with
|
||||
-- a colour and a 3D normal.
|
||||
|
||||
---Keywords: Vertex, Normal, Color, Coordinate, Point
|
||||
|
||||
---Warning:
|
||||
---References:
|
||||
|
||||
uses
|
||||
|
||||
Color from Quantity,
|
||||
|
||||
Vector from Graphic3d,
|
||||
Vertex from Graphic3d
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns VertexNC from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with coordinates 0.0, 0.0, 0.0
|
||||
-- for which the normal is 0.0, 0.0, 1.0 and
|
||||
-- the colour is Quantity_NOC_WHITE.
|
||||
|
||||
Create ( AX, AY, AZ : Real from Standard;
|
||||
ANX, ANY, ANZ : Real from Standard;
|
||||
AColor : Color from Quantity;
|
||||
FlagNormalise : Boolean from Standard = Standard_True )
|
||||
returns VertexNC from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with coordinates <AX>, <AY>, <AZ>
|
||||
-- for which the normal is <ANX>, <ANY>, <ANZ> and
|
||||
-- the colour is <AColor>.
|
||||
-- If <FlagNormalise> is True the normal is already normalised
|
||||
-- Else the normal is not normalised, the graphic do it.
|
||||
|
||||
Create ( APoint : Vertex from Graphic3d;
|
||||
AVector : Vector from Graphic3d;
|
||||
AColor : Color from Quantity;
|
||||
FlagNormalise : Boolean from Standard = Standard_True )
|
||||
returns VertexNC from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point in <APoint> for which the normal
|
||||
-- is <AVector> and the colour is <AColor>.
|
||||
-- If <FlagNormalise> is True the normal is already normalised
|
||||
-- Else the normal is not normalised, the graphic do it.
|
||||
|
||||
---------------------------------------------------
|
||||
-- Category: Methods to modify the class definition
|
||||
---------------------------------------------------
|
||||
|
||||
SetColor ( me : in out;
|
||||
ColorNew : Color from Quantity )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Modifies the colour of the point <me>.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
----------------------------
|
||||
-- Category: Inquire methods
|
||||
----------------------------
|
||||
|
||||
Color ( me )
|
||||
returns Color from Quantity
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the colour of the point <me>.
|
||||
---Category: Inquire methods
|
||||
|
||||
--
|
||||
|
||||
fields
|
||||
|
||||
--
|
||||
-- Class : Graphic3d_VertexNC
|
||||
--
|
||||
-- Purpose : Declaration of variables specific to points
|
||||
--
|
||||
-- Reminder : A point is defined by its coordinates, its normal
|
||||
-- and its colour.
|
||||
|
||||
-- the colour
|
||||
MyColor : Color from Quantity;
|
||||
|
||||
end VertexNC;
|
@@ -1,90 +0,0 @@
|
||||
// Created by: NW,JPB,CAL
|
||||
// Copyright (c) 1991-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
// Modified: 03-02-98 : FMN ; Add Flag Normal
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration of variables specific to points
|
||||
|
||||
//-Warning A point is defined by its coordinates, normal
|
||||
// and color
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_VertexNC.ixx>
|
||||
|
||||
//-Aliases
|
||||
|
||||
//-Global data definitions
|
||||
|
||||
// -- the color
|
||||
// MyColor : Color;
|
||||
|
||||
//-Constructors
|
||||
|
||||
//-Destructors
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
Graphic3d_VertexNC::Graphic3d_VertexNC ():
|
||||
Graphic3d_VertexN (0.0, 0.0, 0.0, 0.0, 0.0, 1.0) {
|
||||
|
||||
Quantity_Color AColor (Quantity_NOC_WHITE);
|
||||
|
||||
MyColor = AColor;
|
||||
|
||||
}
|
||||
|
||||
// :(AX, AY, AZ) as VertexNC inherits VertexN and it is necessary to call
|
||||
// constructor of VertexN with AX, AY, AZ, ANX, ANY and ANZ to
|
||||
// update fields.
|
||||
|
||||
Graphic3d_VertexNC::Graphic3d_VertexNC (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ, const Standard_Real ANX, const Standard_Real ANY, const Standard_Real ANZ, const Quantity_Color& AColor,const Standard_Boolean FlagNormalise):
|
||||
Graphic3d_VertexN (AX, AY, AZ, ANX, ANY, ANZ,FlagNormalise),
|
||||
MyColor (AColor) {
|
||||
}
|
||||
|
||||
// :(APoint, AVector) as VertexNC inherits VertexN and it is necessary to call
|
||||
// constructor of VertexN with APoint and AVector to
|
||||
// update fields.
|
||||
|
||||
Graphic3d_VertexNC::Graphic3d_VertexNC (const Graphic3d_Vertex& APoint, const Graphic3d_Vector& AVector, const Quantity_Color& AColor,const Standard_Boolean FlagNormalise):
|
||||
Graphic3d_VertexN (APoint, AVector,FlagNormalise),
|
||||
MyColor (AColor) {
|
||||
}
|
||||
|
||||
Quantity_Color Graphic3d_VertexNC::Color () const {
|
||||
|
||||
return (MyColor);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_VertexNC::SetColor (const Quantity_Color& ColorNew) {
|
||||
|
||||
MyColor = ColorNew;
|
||||
|
||||
}
|
@@ -1,112 +0,0 @@
|
||||
-- Created on: 1997-09-27
|
||||
-- Created by: PCT
|
||||
-- Copyright (c) 1997-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
--
|
||||
-- The content of this file is subject to the Open CASCADE Technology Public
|
||||
-- License Version 6.5 (the "License"). You may not use the content of this file
|
||||
-- except in compliance with the License. Please obtain a copy of the License
|
||||
-- at http://www.opencascade.org and read it completely before using this file.
|
||||
--
|
||||
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
--
|
||||
-- The Original Code and all software distributed under the License is
|
||||
-- distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
-- Initial Developer hereby disclaims all such warranties, including without
|
||||
-- limitation, any warranties of merchantability, fitness for a particular
|
||||
-- purpose or non-infringement. Please see the License for the specific terms
|
||||
-- and conditions governing the rights and limitations under the License.
|
||||
|
||||
-- Modified: 03-02-98 : FMN ; Add Flag Normal
|
||||
|
||||
class VertexNT from Graphic3d inherits VertexN from Graphic3d
|
||||
|
||||
---Version:
|
||||
|
||||
---Purpose: This class allows the creation and update of
|
||||
-- a vertex with a 3D normal and texture coordinate.
|
||||
|
||||
---Keywords: Vertex, Normal, Coordinate, Point, Texture
|
||||
|
||||
---Warning:
|
||||
---References:
|
||||
|
||||
uses
|
||||
|
||||
Vector from Graphic3d,
|
||||
Vertex from Graphic3d
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns VertexNT from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with 0.0, 0.0, 0.0 coordinates
|
||||
-- for which the normal is 0.0, 0.0, 1.0.
|
||||
-- texture coordinate is 0.0, 0.0.
|
||||
|
||||
Create ( AX, AY, AZ : Real from Standard;
|
||||
ANX, ANY, ANZ : Real from Standard;
|
||||
ATX : Real from Standard;
|
||||
ATY : Real from Standard = 0.0;
|
||||
FlagNormalise : Boolean from Standard = Standard_True )
|
||||
returns VertexNT from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point with coordinates <AX>, <AY>, <AZ> and
|
||||
-- for which the normal is <ANX>, <ANY>, <ANZ>,
|
||||
-- texture coordinate is <ATX>, <ATY>.
|
||||
-- If <FlagNormalise> is True the normal is already normalised
|
||||
-- Else the normal is not normalised, the graphic do it.
|
||||
|
||||
Create ( APoint : Vertex from Graphic3d;
|
||||
AVector : Vector from Graphic3d;
|
||||
ATX : Real from Standard;
|
||||
ATY : Real from Standard = 0.0;
|
||||
FlagNormalise : Boolean from Standard = Standard_True )
|
||||
returns VertexNT from Graphic3d;
|
||||
---Level: Public
|
||||
---Purpose: Creates a point in <APoint> for which the normal is <AVector>.
|
||||
-- <ATX>, <ATY> are texture coordinate.
|
||||
-- If <FlagNormalise> is True the normal is already normalised
|
||||
-- Else the normal is not normalised, the graphic do it.
|
||||
|
||||
---------------------------------------------------
|
||||
-- Category: Methods to modify the class definition
|
||||
---------------------------------------------------
|
||||
|
||||
SetTextureCoordinate( me : in out;
|
||||
ATX : Real from Standard;
|
||||
ATY : Real from Standard = 0.0)
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Modifies the texture coordinate to the point <me>.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
|
||||
----------------------------
|
||||
-- Category: Inquire methods
|
||||
----------------------------
|
||||
|
||||
TextureCoordinate( me;
|
||||
ATX, ATY : out Real from Standard)
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the texture coordinate to the point <me>.
|
||||
---Category: Inquire methods
|
||||
|
||||
--
|
||||
|
||||
fields
|
||||
|
||||
--
|
||||
-- Class : Graphic3d_VertexNT
|
||||
--
|
||||
-- Purpose : Declaration of variables specific to points.
|
||||
--
|
||||
-- Reminder : A point is defined by its coordinates and its normal.
|
||||
|
||||
-- the texel
|
||||
MyTX, MyTY : Real from Standard;
|
||||
|
||||
end VertexNT;
|
@@ -1,81 +0,0 @@
|
||||
// Created on: 1997-08-27
|
||||
// Created by: PCT
|
||||
// Copyright (c) 1997-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
// Modified: 03-02-98 : FMN ; Add Flag Normal
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration des variables specifiques aux points
|
||||
|
||||
//-Warning Un point est defini par ses coordonnees et sa normale et des coordonnees texture
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_VertexNT.ixx>
|
||||
|
||||
//-Aliases
|
||||
|
||||
//-Global data definitions
|
||||
|
||||
// -- la normale au point
|
||||
// MyTX, MyTY : Standard_Real;
|
||||
|
||||
//-Constructors
|
||||
|
||||
//-Destructors
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
Graphic3d_VertexNT::Graphic3d_VertexNT ():
|
||||
Graphic3d_VertexN (0.0, 0.0, 0.0, 0.0, 0.0, 1.0),
|
||||
MyTX(0.0),
|
||||
MyTY(0.0) {
|
||||
}
|
||||
|
||||
Graphic3d_VertexNT::Graphic3d_VertexNT (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ, const Standard_Real ANX, const Standard_Real ANY, const Standard_Real ANZ,const Standard_Real ATX,const Standard_Real ATY,const Standard_Boolean FlagNormalise):
|
||||
Graphic3d_VertexN (0.0, 0.0, 0.0, 0.0, 0.0, 1.0,FlagNormalise),
|
||||
MyTX(ATX),
|
||||
MyTY(ATY) {
|
||||
}
|
||||
|
||||
Graphic3d_VertexNT::Graphic3d_VertexNT (const Graphic3d_Vertex& APoint, const Graphic3d_Vector& AVector,const Standard_Real ATX,const Standard_Real ATY,const Standard_Boolean FlagNormalise):
|
||||
Graphic3d_VertexN (APoint, AVector,FlagNormalise),
|
||||
MyTX(ATX),
|
||||
MyTY(ATY) {
|
||||
}
|
||||
|
||||
void Graphic3d_VertexNT::SetTextureCoordinate(const Standard_Real ATX,const Standard_Real ATY)
|
||||
{
|
||||
MyTX = ATX;
|
||||
MyTY = ATY;
|
||||
}
|
||||
|
||||
void Graphic3d_VertexNT::TextureCoordinate(Standard_Real& ATX,Standard_Real& ATY) const
|
||||
{
|
||||
ATX = MyTX;
|
||||
ATY = MyTY;
|
||||
}
|
Reference in New Issue
Block a user