mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0022971: TKOpenGl clean up obsolete functionality
Added native handles to OpenGl_Context Removed unused and unimplemented PolygonHoles Removed unimplemented Polygon functions Removed unused QuadrangleMesh functions Removed unused TriangleMesh functions Removed dead Bezier function declarations Redirect Graphic3d_Group::Polyline() to primitives array Move Prs3d_ShadedShape template code to StdPrs_ShadedShape where it is only used before. Remove TriangleSet usage from AIS_TexturedShape Texture coordinates functionality added StdPrs_ShadedShape to eliminate code duplication. Eliminated usage of TriangleSet from QABugs_PresentableObject Eliminated usage of TriangleMesh from StdPrs_ShadedSurface Removed TriangleMesh and TriangleSet support OpenGl_PrimitiveArray - render Edges only for primitives > GL_LINE_STRIP Added vgrid command to show grid in 3D Viewer
This commit is contained in:
@@ -36,9 +36,7 @@ Graphic3d_Group_3.cxx
|
||||
Graphic3d_Group_5.cxx
|
||||
Graphic3d_Group_7.cxx
|
||||
Graphic3d_Group_8.cxx
|
||||
Graphic3d_Group_9.cxx
|
||||
Graphic3d_Group_10.cxx
|
||||
Graphic3d_Group_11.cxx
|
||||
Graphic3d_Structure.pxx
|
||||
Graphic3d_DataStructure.pxx
|
||||
Graphic3d_StructureManager.pxx
|
||||
|
@@ -553,126 +553,6 @@ is
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
Normal : Vector from Graphic3d;
|
||||
AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
Normal : Vector from Graphic3d;
|
||||
AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexNT from Graphic3d;
|
||||
AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon
|
||||
|
||||
PolygonHoles ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_holes
|
||||
|
||||
PolygonHoles ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
Normal : Vector from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_holes
|
||||
|
||||
PolygonHoles ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_holes
|
||||
|
||||
PolygonHoles ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
Normal : Vector from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_holes
|
||||
|
||||
----------------------------------------
|
||||
-- Category: Methods to create Polyline
|
||||
-- for Purpose : see Graphic3d_Group.cdl
|
||||
----------------------------------------
|
||||
|
||||
Polyline ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
X1, Y1, Z1, X2, Y2, Z2 : Real from Standard;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polyline
|
||||
|
||||
Polyline ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polyline
|
||||
|
||||
Polyline ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexC from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polyline
|
||||
|
||||
-----------------------------------------
|
||||
-- Category: Methods to create Quadrangle
|
||||
-- for Purpose : see Graphic3d_Group.cdl
|
||||
-----------------------------------------
|
||||
|
||||
QuadrangleMesh ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array2OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_quadrangle
|
||||
|
||||
QuadrangleMesh ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array2OfVertexN from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_quadrangle
|
||||
|
||||
QuadrangleMesh ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array2OfVertexNT from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_quadrangle
|
||||
|
||||
----------------------------------------
|
||||
-- Category: Methods to create Text
|
||||
-- for Purpose : see Graphic3d_Group.cdl
|
||||
@@ -727,67 +607,6 @@ is
|
||||
-- for Purpose : see Graphic3d_Group.cdl
|
||||
----------------------------------------
|
||||
|
||||
TriangleMesh ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_triangle
|
||||
|
||||
TriangleMesh ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_triangle
|
||||
|
||||
TriangleMesh ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexNT from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_triangle
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_indices
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_indices
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexNT from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_indices
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexC from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_indices
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
ListVertex : Array1OfVertexNC from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is deferred;
|
||||
---Purpose: call_togl_polygon_indices
|
||||
|
||||
PrimitiveArray( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d;
|
||||
parray : PrimitiveArray from Graphic3d;
|
||||
|
@@ -326,165 +326,7 @@ class Group from Graphic3d inherits TShared
|
||||
-- using the current fill attributes (AspectFillArea3d))
|
||||
-- The first and last points are not duplicates.
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
Normal : Vector 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.
|
||||
-- The normal to the polygon is defined normalised.
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ListVertex : Array1OfVertexN 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.
|
||||
-- The normal is defined and normalised for each vertex.
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
Normal : Vector 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.
|
||||
-- The normal is defined for each vertex.
|
||||
-- The normal to the polygon is defined normalised.
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
|
||||
Polygon ( me : mutable;
|
||||
ListVertex : Array1OfVertexNT 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 duplicated.
|
||||
-- The normal is defined and normalised for each vertex.
|
||||
-- The texture coordinate is defined for each vertex.
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------
|
||||
-- Summary of Polygons with holes --
|
||||
-- --
|
||||
-- They may have multiple boundaries. --
|
||||
-- --
|
||||
-- Each boundary should be closed. --
|
||||
-- --
|
||||
-- Each boundary 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;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Creates a face with holes.
|
||||
-- The face is described by the total number
|
||||
-- of vertices on the external contour and around the holes,
|
||||
-- and by the list of vertices.
|
||||
-- The face will be drawn
|
||||
-- using the current fill attributes (AspectFillArea3d))
|
||||
-- The first and last points are not duplicates.
|
||||
-- Bounds : total number of interior and exterior vertices
|
||||
-- ListVertex : a list of the interior and exterior vertices
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
Normal : Vector from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Creates a face with holes.
|
||||
-- The face is described by the total number
|
||||
-- of vertices on the external contour and around the holes,
|
||||
-- and by the list of vertices.
|
||||
-- The face will be drawn
|
||||
-- using the current fill attributes (AspectFillArea3d))
|
||||
-- The first and last points are not duplicates.
|
||||
-- The normal to the polygon is normalised.
|
||||
-- Bounds : total number of interior and exterior vertices
|
||||
-- ListVertex : a list of the interior and exterior vertices
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Creates a face with holes.
|
||||
-- The face is described by the total number
|
||||
-- of vertices on the external contour and around the holes,
|
||||
-- and by the list of vertices.
|
||||
-- The face will be drawn
|
||||
-- using the current fill attributes (AspectFillArea3d))
|
||||
-- The first and last points are not duplicates.
|
||||
-- Bounds : total number of interior and exterior vertices
|
||||
-- ListVertex : a list of the interior and exterior vertices
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
Polygon ( me : mutable;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
Normal : Vector from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Creates a face with holes.
|
||||
-- The face is described by the total number
|
||||
-- of vertices on the external contour and around the holes,
|
||||
-- and by the list of vertices.
|
||||
-- The face will be drawn
|
||||
-- using the current fill attributes (AspectFillArea3d))
|
||||
-- The first and last points are not duplicates.
|
||||
-- The normal to the polygon is normalised.
|
||||
-- Bounds : total number of interior and exterior vertices
|
||||
-- ListVertex : a list of the interior and exterior vertices
|
||||
---Category: Methods to create Polygon
|
||||
|
||||
|
||||
PolygonSet ( me : mutable;
|
||||
Bounds : Array1OfInteger from TColStd;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
@@ -543,55 +385,6 @@ class Group from Graphic3d inherits TShared
|
||||
-- for each vertex.
|
||||
---Category: Methods to create Polyline
|
||||
|
||||
-----------------------------------------
|
||||
-- Category: Methods to create Quadrangle
|
||||
-----------------------------------------
|
||||
|
||||
QuadrangleMesh ( me : mutable;
|
||||
ListVertex : Array2OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates a group of quadrilaterals from a list of
|
||||
-- points, such that their vertices are:
|
||||
-- Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
|
||||
-- The quadrilaterals will be drawn according to the
|
||||
-- current attributes (AspectFillArea3d).
|
||||
-- Category: Methods to create Quadrangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than four points.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
QuadrangleMesh ( me : mutable;
|
||||
ListVertex : Array2OfVertexN from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates a group of quadrilaterals from a list of
|
||||
-- points, such that their vertices are:
|
||||
-- Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
|
||||
-- The quadrilaterals will be drawn according to the
|
||||
-- current attributes (AspectFillArea3d).
|
||||
-- For each vertex the normal is given.
|
||||
-- Category: Methods to create Quadrangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than four points.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
QuadrangleMesh ( me : mutable;
|
||||
ListVertex : Array2OfVertexNT from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates a group of quadrilaterals from a list of
|
||||
-- points, such that their vertices are:
|
||||
-- Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
|
||||
-- The quadrilaterals will be drawn according to the
|
||||
-- current attributes (AspectFillArea3d).
|
||||
-- For each vertex the normal is given.
|
||||
-- For each vertex a texture coordinate is given.
|
||||
-- Category: Methods to create Quadrangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than four points.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
-----------------------------------
|
||||
-- Category: Methods to create Text
|
||||
-----------------------------------
|
||||
@@ -711,119 +504,7 @@ class Group from Graphic3d inherits TShared
|
||||
---------------------------------------
|
||||
---Category: Methods to create Triangle
|
||||
---------------------------------------
|
||||
|
||||
TriangleMesh ( me : mutable;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates triangles from an array of points such that
|
||||
-- the Kth triangle contains the vertices K, K+1, K+2.
|
||||
-- The triangle will be drawn using the current fill
|
||||
-- attributes (AspectFillArea3d)
|
||||
-- Category: Methods to create Triangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than three points.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
TriangleMesh ( me : mutable;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates triangles from an array of points such that
|
||||
-- the Kth triangle contains the vertices K, K+1, K+2.
|
||||
-- The triangle will be drawn using the current fill
|
||||
-- attributes (AspectFillArea3d)
|
||||
-- The normal is given for each vertex.
|
||||
-- Category: Methods to create Triangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than three points.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
TriangleMesh ( me : mutable;
|
||||
ListVertex : Array1OfVertexNT from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates triangles from an array of points such that
|
||||
-- the Kth triangle contains the vertices K, K+1, K+2.
|
||||
-- The triangle will be drawn using the current fill
|
||||
-- attributes (AspectFillArea3d)
|
||||
-- The normal is given for each vertex.
|
||||
-- A texture coordinate is given for each vertex.
|
||||
-- Category: Methods to create Triangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than three points.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates a group of triangles defined by a table of
|
||||
-- vertices and a table of edges, visible or not.
|
||||
-- Category: Methods to create Triangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than three points or if <ListEdge> contains
|
||||
-- less than three edges.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ListVertex : Array1OfVertexN from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates a group of triangles defined by a table of
|
||||
-- vertices and a table of edges, visible or not.
|
||||
-- For each vertex the normal is given.
|
||||
-- Category: Methods to create Triangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than three points or if <ListEdge> contains
|
||||
-- less than three edges.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ListVertex : Array1OfVertexNT from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates a group of triangles defined by a table of
|
||||
-- vertices and a table of edges, visible or not.
|
||||
-- For each vertex the normal is given.
|
||||
-- For each vertex a texture coordinate is given.
|
||||
-- Category: Methods to create Triangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than three points or if <ListEdge> contains
|
||||
-- less than three edges.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ListVertex : Array1OfVertexC from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates a group of triangles defined by a table of
|
||||
-- vertices and a table of edges, visible or not.
|
||||
-- For each vertex the color is given.
|
||||
-- Category: Methods to create Triangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than three points or if <ListEdge> contains
|
||||
-- less than three edges.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
TriangleSet ( me : mutable;
|
||||
ListVertex : Array1OfVertexNC from Graphic3d;
|
||||
ListEdge : Array1OfEdge from Aspect;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Public
|
||||
---Purpose: Creates a group of triangles defined by a table of
|
||||
-- vertices and a table of edges, visible or not.
|
||||
-- For each vertex the normal and the color are given.
|
||||
-- Category: Methods to create Triangle
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than three points or if <ListEdge> contains
|
||||
-- less than three edges.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
|
||||
AddPrimitiveArray( me : mutable;
|
||||
elem : ArrayOfPrimitives from Graphic3d;
|
||||
EvalMinMax: Boolean from Standard = Standard_True );
|
||||
@@ -997,34 +678,7 @@ class Group from Graphic3d inherits TShared
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Category: Internal methods
|
||||
|
||||
Bezier ( me : mutable;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Internal
|
||||
---Purpose: Creates a non rational Bezier curve with a set of poles :
|
||||
-- ListVertex. The weights are defaulted to all being 1.
|
||||
-- Category: Methods to create Curve
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than two points.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
Bezier ( me : mutable;
|
||||
ListVertex : Array1OfVertex from Graphic3d;
|
||||
ListWeight : Array1OfReal from TColStd;
|
||||
EvalMinMax : Boolean from Standard = Standard_True )
|
||||
---Level: Internal
|
||||
---Purpose: Creates a non rational Bezier curve with a set of poles :
|
||||
-- ListVertex and the set of weights ListWeight.
|
||||
-- If all the weights are identical the curve is considered
|
||||
-- as non rational.
|
||||
-- Category: Methods to create Curve
|
||||
-- Warning: Raises GroupDefinitionError if <ListVertex> contains
|
||||
-- less than two points or <ListVertex> and <ListWeight>
|
||||
-- have not the same length or one weight value is lower
|
||||
-- or equal to Resolution from package gp.
|
||||
raises GroupDefinitionError from Graphic3d is static;
|
||||
|
||||
|
||||
--
|
||||
|
||||
fields
|
||||
|
@@ -1,367 +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_VertexC.hxx>
|
||||
#include <Graphic3d_VertexNT.hxx>
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
void Graphic3d_Group::TriangleMesh (const Graphic3d_Array1OfVertex& ListVertex, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
|
||||
if (i <= 2)
|
||||
Graphic3d_GroupDefinitionError::Raise ("Bad number of vertices");
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
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->TriangleMesh (MyCGroup, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::TriangleMesh (const Graphic3d_Array1OfVertexN& ListVertex, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
|
||||
if (i <= 2)
|
||||
Graphic3d_GroupDefinitionError::Raise ("Bad number of vertices");
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
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->TriangleMesh (MyCGroup, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Graphic3d_Group::TriangleMesh(const Graphic3d_Array1OfVertexNT& ListVertex,const Standard_Boolean EvalMinMax)
|
||||
{
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
|
||||
if (i <= 2)
|
||||
Graphic3d_GroupDefinitionError::Raise ("Bad number of vertices");
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
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->TriangleMesh (MyCGroup, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Graphic3d_Group::TriangleSet (const Graphic3d_Array1OfVertex& ListVertex, const Aspect_Array1OfEdge& ListEdge, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
j = ListEdge.Length ();
|
||||
|
||||
if ((i <= 2) || (j <= 2))
|
||||
Graphic3d_GroupDefinitionError::Raise ("Bad number of vertices");
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
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->TriangleSet
|
||||
(MyCGroup, ListVertex, ListEdge, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::TriangleSet (const Graphic3d_Array1OfVertexN& ListVertex, const Aspect_Array1OfEdge& ListEdge, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
j = ListEdge.Length ();
|
||||
|
||||
if ((i <= 2) || (j <= 2))
|
||||
Graphic3d_GroupDefinitionError::Raise ("Bad number of vertices");
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
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->TriangleSet
|
||||
(MyCGroup, ListVertex, ListEdge, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::TriangleSet (const Graphic3d_Array1OfVertexC& ListVertex, const Aspect_Array1OfEdge& ListEdge, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
j = ListEdge.Length ();
|
||||
|
||||
if ((i <= 2) || (j <= 2))
|
||||
Graphic3d_GroupDefinitionError::Raise ("Bad number of vertices");
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
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->TriangleSet
|
||||
(MyCGroup, ListVertex, ListEdge, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::TriangleSet (const Graphic3d_Array1OfVertexNC& ListVertex, const Aspect_Array1OfEdge& ListEdge, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
j = ListEdge.Length ();
|
||||
|
||||
if ((i <= 2) || (j <= 2))
|
||||
Graphic3d_GroupDefinitionError::Raise ("Bad number of vertices");
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
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->TriangleSet
|
||||
(MyCGroup, ListVertex, ListEdge, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Graphic3d_Group::TriangleSet(const Graphic3d_Array1OfVertexNT& ListVertex,const Aspect_Array1OfEdge& ListEdge,const Standard_Boolean EvalMinMax)
|
||||
{
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
i = ListVertex.Length ();
|
||||
j = ListEdge.Length ();
|
||||
|
||||
if ((i <= 2) || (j <= 2))
|
||||
Graphic3d_GroupDefinitionError::Raise ("Bad number of vertices");
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Real X, Y, Z;
|
||||
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->TriangleSet
|
||||
(MyCGroup, ListVertex, ListEdge, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
@@ -78,104 +78,6 @@ void Graphic3d_Group::Polygon (const Graphic3d_Array1OfVertex& ListVertex, const
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polygon (const Graphic3d_Array1OfVertex& ListVertex, const Graphic3d_Vector& Normal, 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, Normal, AType, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polygon (const Graphic3d_Array1OfVertexN& 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;
|
||||
Standard_Integer Lower = ListVertex.Lower ();
|
||||
Standard_Integer Upper = ListVertex.Upper ();
|
||||
// Parcours des sommets
|
||||
for (i=Lower; 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);
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->Polygon (MyCGroup, ListVertex, AType, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polygon (const Graphic3d_Array1OfVertexN& ListVertex, const Graphic3d_Vector& Normal, 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;
|
||||
Standard_Integer Lower = ListVertex.Lower ();
|
||||
Standard_Integer Upper = ListVertex.Upper ();
|
||||
// Parcours des sommets
|
||||
for (i=Lower; 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);
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->Polygon
|
||||
(MyCGroup, ListVertex, Normal, 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;
|
||||
@@ -217,228 +119,3 @@ Standard_Integer Lower, Upper;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polygon (const TColStd_Array1OfInteger& Bounds, const Graphic3d_Array1OfVertex& ListVertex, 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, ii;
|
||||
Standard_Integer k, kk;
|
||||
Standard_Integer begin_points;
|
||||
Standard_Integer end_points;
|
||||
Standard_Integer Lower, Upper;
|
||||
|
||||
begin_points = ListVertex.Lower ();
|
||||
end_points = ListVertex.Upper ();
|
||||
|
||||
Lower = Bounds.Lower ();
|
||||
Upper = Bounds.Upper ();
|
||||
// Parcours des facettes
|
||||
for (k=0, kk=Lower; kk<=Upper; k++, kk++) {
|
||||
// Parcours des sommets
|
||||
for (i=0, ii=begin_points;
|
||||
((ii<=end_points) || (i==int (Bounds.Value (kk))-1));
|
||||
i++, ii++) {
|
||||
ListVertex (ii).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);
|
||||
}
|
||||
begin_points += int (Bounds.Value (kk));
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->PolygonHoles
|
||||
(MyCGroup, Bounds, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polygon (const TColStd_Array1OfInteger& Bounds, const Graphic3d_Array1OfVertex& ListVertex, const Graphic3d_Vector& Normal, 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, ii;
|
||||
Standard_Integer k, kk;
|
||||
Standard_Integer begin_points;
|
||||
Standard_Integer end_points;
|
||||
Standard_Integer Lower, Upper;
|
||||
|
||||
begin_points = ListVertex.Lower ();
|
||||
end_points = ListVertex.Upper ();
|
||||
|
||||
Lower = Bounds.Lower ();
|
||||
Upper = Bounds.Upper ();
|
||||
// Parcours des facettes
|
||||
for (k=0, kk=Lower; kk<=Upper; k++, kk++) {
|
||||
// Parcours des sommets
|
||||
for (i=0, ii=begin_points;
|
||||
((ii<=end_points) || (i==int (Bounds.Value (kk))-1));
|
||||
i++, ii++) {
|
||||
ListVertex (ii).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);
|
||||
}
|
||||
begin_points += int (Bounds.Value (kk));
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->PolygonHoles
|
||||
(MyCGroup, Bounds, ListVertex, Normal, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polygon (const TColStd_Array1OfInteger& Bounds, const Graphic3d_Array1OfVertexN& ListVertex, 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, ii;
|
||||
Standard_Integer k, kk;
|
||||
Standard_Integer begin_points;
|
||||
Standard_Integer end_points;
|
||||
Standard_Integer Lower, Upper;
|
||||
|
||||
begin_points = ListVertex.Lower ();
|
||||
end_points = ListVertex.Upper ();
|
||||
|
||||
Lower = Bounds.Lower ();
|
||||
Upper = Bounds.Upper ();
|
||||
// Parcours des facettes
|
||||
for (k=0, kk=Lower; kk<=Upper; k++, kk++) {
|
||||
// Parcours des sommets
|
||||
for (i=0, ii=begin_points;
|
||||
((ii<=end_points) || (i==int (Bounds.Value (kk))-1));
|
||||
i++, ii++) {
|
||||
ListVertex (ii).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);
|
||||
}
|
||||
begin_points += int (Bounds.Value (kk));
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->PolygonHoles
|
||||
(MyCGroup, Bounds, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polygon (const TColStd_Array1OfInteger& Bounds, const Graphic3d_Array1OfVertexN& ListVertex, const Graphic3d_Vector& Normal, 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, ii;
|
||||
Standard_Integer k, kk;
|
||||
Standard_Integer begin_points;
|
||||
Standard_Integer end_points;
|
||||
Standard_Integer Lower, Upper;
|
||||
|
||||
begin_points = ListVertex.Lower ();
|
||||
end_points = ListVertex.Upper ();
|
||||
|
||||
Lower = Bounds.Lower ();
|
||||
Upper = Bounds.Upper ();
|
||||
// Parcours des facettes
|
||||
for (k=0, kk=Lower; kk<=Upper; k++, kk++) {
|
||||
// Parcours des sommets
|
||||
for (i=0, ii=begin_points;
|
||||
((ii<=end_points) || (i==int (Bounds.Value (kk))-1));
|
||||
i++, ii++) {
|
||||
ListVertex (ii).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);
|
||||
}
|
||||
begin_points += int (Bounds.Value (kk));
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->PolygonHoles
|
||||
(MyCGroup, Bounds, ListVertex, Normal, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Graphic3d_Group::Polygon(const Graphic3d_Array1OfVertexNT& 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;
|
||||
Standard_Integer Lower = ListVertex.Lower ();
|
||||
Standard_Integer Upper = ListVertex.Upper ();
|
||||
// Parcours des sommets
|
||||
for (i=Lower; 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);
|
||||
}
|
||||
}
|
||||
|
||||
MyGraphicDriver->Polygon (MyCGroup, ListVertex, AType, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
@@ -39,100 +39,74 @@
|
||||
#include <Graphic3d_Group.jxx>
|
||||
#include <Graphic3d_Group.pxx>
|
||||
|
||||
#include <Graphic3d_ArrayOfPolylines.hxx>
|
||||
#include <Graphic3d_VertexC.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
|
||||
//-Methods, in order
|
||||
void Graphic3d_Group::Polyline (const Graphic3d_Array1OfVertex& theListVertex,
|
||||
const Standard_Boolean theToEvalMinMax)
|
||||
{
|
||||
if (IsDeleted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Polyline (const Graphic3d_Array1OfVertex& ListVertex, const Standard_Boolean EvalMinMax) {
|
||||
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines (theListVertex.Length());
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
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->Polyline (MyCGroup, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
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& ListVertex, const Standard_Boolean EvalMinMax) {
|
||||
void Graphic3d_Group::Polyline (const Graphic3d_Array1OfVertexC& theListVertex,
|
||||
const Standard_Boolean theToEvalMinMax)
|
||||
{
|
||||
if (IsDeleted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
Handle(Graphic3d_ArrayOfPrimitives) aPrims
|
||||
= new Graphic3d_ArrayOfPolylines (theListVertex.Length(), 0, 0, Standard_True); // color per vertex
|
||||
|
||||
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->Polyline (MyCGroup, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
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& APT1, const Graphic3d_Vertex& APT2, const Standard_Boolean EvalMinMax) {
|
||||
void Graphic3d_Group::Polyline (const Graphic3d_Vertex& thePnt1,
|
||||
const Graphic3d_Vertex& thePnt2,
|
||||
const Standard_Boolean theToEvalMinMax)
|
||||
{
|
||||
if (IsDeleted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines (2);
|
||||
|
||||
MyIsEmpty = Standard_False;
|
||||
Standard_Real aX, aY, aZ;
|
||||
thePnt1.Coord (aX, aY, aZ);
|
||||
aPrims->AddVertex (aX, aY, aZ);
|
||||
|
||||
Standard_Real X1, Y1, Z1;
|
||||
Standard_Real X2, Y2, Z2;
|
||||
|
||||
APT1.Coord (X1, Y1, Z1);
|
||||
APT2.Coord (X2, Y2, Z2);
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
if (X1 < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X1);
|
||||
if (Y1 < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y1);
|
||||
if (Z1 < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z1);
|
||||
if (X1 > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X1);
|
||||
if (Y1 > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y1);
|
||||
if (Z1 > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z1);
|
||||
if (X2 < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X2);
|
||||
if (Y2 < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y2);
|
||||
if (Z2 < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z2);
|
||||
if (X2 > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X2);
|
||||
if (Y2 > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y2);
|
||||
if (Z2 > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z2);
|
||||
}
|
||||
|
||||
MyGraphicDriver->Polyline (MyCGroup, X1, Y1, Z1, X2, Y2, Z2, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
thePnt2.Coord (aX, aY, aZ);
|
||||
aPrims->AddVertex (aX, aY, aZ);
|
||||
|
||||
AddPrimitiveArray (aPrims, theToEvalMinMax);
|
||||
}
|
||||
|
@@ -1,151 +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
|
||||
|
||||
#include <Graphic3d_Group.jxx>
|
||||
#include <Graphic3d_Group.pxx>
|
||||
|
||||
void Graphic3d_Group::QuadrangleMesh (const Graphic3d_Array2OfVertex& ListVertex, const Standard_Boolean EvalMinMax) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (! MyContainsFacet) MyStructure->GroupsWithFacet (+1);
|
||||
MyContainsFacet = Standard_True;
|
||||
MyIsEmpty = Standard_False;
|
||||
|
||||
Standard_Real X, Y, Z;
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
Standard_Integer i, j;
|
||||
Standard_Integer LowerRow = ListVertex.LowerRow ();
|
||||
Standard_Integer UpperRow = ListVertex.UpperRow ();
|
||||
Standard_Integer LowerCol = ListVertex.LowerCol ();
|
||||
Standard_Integer UpperCol = ListVertex.UpperCol ();
|
||||
// Parcours des sommets
|
||||
for (i=LowerRow; i<=UpperRow; i++)
|
||||
for (j=LowerCol; j<=UpperCol; j++) {
|
||||
ListVertex (i, j).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->QuadrangleMesh (MyCGroup, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::QuadrangleMesh (const Graphic3d_Array2OfVertexN& ListVertex, 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, j;
|
||||
Standard_Integer LowerRow = ListVertex.LowerRow ();
|
||||
Standard_Integer UpperRow = ListVertex.UpperRow ();
|
||||
Standard_Integer LowerCol = ListVertex.LowerCol ();
|
||||
Standard_Integer UpperCol = ListVertex.UpperCol ();
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
// Parcours des sommets
|
||||
for (i=LowerRow; i<=UpperRow; i++)
|
||||
for (j=LowerCol; j<=UpperCol; j++) {
|
||||
ListVertex (i, j).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->QuadrangleMesh (MyCGroup, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Graphic3d_Group::QuadrangleMesh(const Graphic3d_Array2OfVertexNT& ListVertex,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, j;
|
||||
Standard_Integer LowerRow = ListVertex.LowerRow ();
|
||||
Standard_Integer UpperRow = ListVertex.UpperRow ();
|
||||
Standard_Integer LowerCol = ListVertex.LowerCol ();
|
||||
Standard_Integer UpperCol = ListVertex.UpperCol ();
|
||||
|
||||
// Min-Max Update
|
||||
if (EvalMinMax) {
|
||||
// Parcours des sommets
|
||||
for (i=LowerRow; i<=UpperRow; i++)
|
||||
for (j=LowerCol; j<=UpperCol; j++) {
|
||||
ListVertex (i, j).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->QuadrangleMesh (MyCGroup, ListVertex, EvalMinMax);
|
||||
|
||||
Update ();
|
||||
|
||||
}
|
Reference in New Issue
Block a user