--- File: Graphic3d_Structure.cdl
--- Created: Mercredi 12 Juin 1991
--- Author: NW,JPB,CAL
+-- Created on: 1991-06-12
+-- 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 : gestion du GraphicClear
-- 11/97 ; CAL : ajout pointer StructPtr
-- 11/97 ; CAL : amelioration de l'effacement SetManager
-- 05/98 ; CAL : gestion du GraphicConnect et Disconnect
-- 02/00 ; GG : Made Transform() methode not mutable.
-- 31/05/01 ; GG : Add ResetDisplayPriority() method
---
----Copyright: MatraDatavision 1998
---
class Structure from Graphic3d inherits TShared
TypeOfPrimitive from Graphic3d,
TypeOfStructure from Graphic3d,
Vector from Graphic3d,
- VertexNC from Graphic3d,
Vertex from Graphic3d,
- TransModeFlags from Graphic3d,
- Pnt from gp
+ TransModeFlags from Graphic3d,
+ Pnt from gp,
+ SetOfHClipPlane from Graphic3d
raises
Priority : Integer from Standard )
---Level: Public
---Purpose: Modifies the order of displaying the structure.
- -- Values are between 0 et 10.
- -- The priority 10 being displayed first.
- -- The default value is 5
+ -- Values are between 0 and 10.
+ -- 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
-- Warning: If <me> is displayed then the SetDisplayPriority
-- method erase <me> and display <me> with the
-- Warning: If <me> is displayed then the SetDisplayPriority
-- method erase <me> and display <me> with the
-- previous priority.
+
+ SetZLayer ( me : mutable;
+ theLayerId : Integer from Standard )
+ is static;
+ ---Purpose: Set Z layer ID for the structure. The Z layer mechanism
+ -- allows to display structures presented in higher layers in overlay
+ -- of structures in lower layers by switching off z buffer depth
+ -- test between layers
+
+ GetZLayer ( me )
+ returns Integer from Standard is static;
+ ---Purpose: Get Z layer ID of displayed structure. The method
+ -- returns -1 if the structure has no ID (deleted from graphic driver).
+
+ SetClipPlanes (me : mutable; thePlanes : SetOfHClipPlane from Graphic3d) is static;
+ ---Purpose: Changes a set of clip planes slicing the structure on rendering.
+ -- @param thePlanes [in] the set of clip planes.
+
+ GetClipPlanes (me) returns SetOfHClipPlane from Graphic3d;
+ ---C++: return const&
+ ---Purpose: Get clip planes slicing the structure on rendering.
+ -- @return set of clip planes.
SetPick ( me : mutable;
AValue : Boolean from Standard )
-- Category: Compute methods
----------------------------
+ Compute (me: mutable)
+ is virtual;
+ ---Level: Advanced
+ ---Category: Methods to modify the class definition
+
Compute ( me : mutable;
aProjector : DataStructureManager from Graphic3d )
returns Structure from Graphic3d is virtual;
-- Polygons, Triangles or Quadrangles.
---Category: Inquire methods
- Exploration ( me;
- ElementNumber : Integer from Standard;
- AVertex : out VertexNC from Graphic3d;
- AVector : out Vector from Graphic3d )
- returns Boolean from Standard
- is static;
- ---Level: Internal
- ---Purpose: Explores a structure element of <me>.
- -- Returns Standard_True if the exploration succeded and
- -- Standard_False if the exploration is done or if the
- -- specified structure element is not in the structure.
- -- <AVertex> contains the coordinates, the normal and
- -- the color of the vertex found in the structure element.
- -- <AVector> contains the normal of the face.
- -- Warning: - The structure element number is given by
- -- Visual3d_ViewManager::Pick method.
- -- - The primitive type is given by
- -- Graphic3d_Structure::Type method.
- -- - The normal is (0.0, 0.0, 0.0) when the normal is not
- -- specified in the structure element.
- -- - The color is (0.0, 0.0, 0.0) when the color is not
- -- specified in the structure element.
- -- - To initialize the exploration, you have to call the
- -- Graphic3d_Structure::Type method before this method.
- --
- -- Programming example :
- --
- -- // Define a graphic device
- -- Handle(Graphic3d_GraphicDevice) GD =
- -- new Graphic3d_GraphicDevice ("dummy:0.0");
- --
- -- // Define a view manager
- -- Handle(Visual3d_ViewManager) VM = new Visual3d_ViewManager (GD);
- --
- -- // Define a view
- -- Handle(Visual3d_View) V = new Visual3d_View (VM);
- --
- -- // Define a window
- -- Handle(Aspect_Window) W = new Aspect_Window
- -- (GD, "Graphic View 1", 0.695, 0.695, 0.600, 0.600,
- -- Xw_WQ_3DQUALITY, Quantity_NOC_MATRAGRAY);
- --
- -- // Define a context pick
- -- Visual3d_ContextPick CTXP;
- --
- -- // Activate the view
- -- V->SetWindow (W);
- -- V->Activate ();
- --
- -- // Create a structure
- -- Handle(Graphic3d_Structure) S = new Graphic3d_Structure (V);
- -- Handle(Graphic3d_Group) G = new Graphic3d_Group (S);
- --
- -- // Create a polygon
- -- G->Polygon (PtsArray);
- --
- -- // Display the structure
- -- S->Display ();
- --
- -- // Pick
- -- Visual3d_PickDescriptor PDes (CTXP);
- -- PDes.Clear ();
- -- PDes = V->Pick (CTXP, W, x, y);
- --
- -- // Explore the top structure
- -- Standard_Boolean Next = Standard_True;
- -- Graphic3d_Vertex AVertex;
- -- Graphic3d_Vector AVector;
- -- if ((PDes.TopStructure ())->Type () == Graphic3d_TOP_POLYGON)
- -- while (Next) {
- -- Next = S->Exploration (PDes.TopElementNumber (),
- -- AVertex, AVector);
- -- if (Next) {
- -- cout << "Point " << AVertex.X () << " , "
- -- << AVertex.Y () << " , " << AVertex.Z () << "\n";
- -- if (! AVector.LengthZero ())
- -- cout << "Normal " << AVector.X () << " , "
- -- << AVector.Y () << " , " << AVector.Z () << "\n";
- -- cout << flush;
- -- }
- -- }
- --
- ---Category: Inquire methods
-
+
FillArea3dAspect ( me )
returns AspectFillArea3d from Graphic3d
is static;
---Purpose: Returns the values of the current default attributes.
---Category: Inquire methods
- Type ( me;
- ElementNumber : Integer from Standard )
- returns TypeOfPrimitive from Graphic3d
- is static;
- ---Level: Public
- ---Purpose: Returns the primitive type stored in the structure
- -- element <ElementNumber>.
- -- Initialises the exploration of this primitive.
- -- If the structure element is not a primitive, returns
- -- Graphic3d_TOP_UNDEFINED.
- -- Warning: The structure element number is given by
- -- Visual3d_ViewManager::Pick method.
- ---Category: Inquire methods
-
Visual ( me )
returns TypeOfStructure from Graphic3d
is static;
-- <ADelta> = +1 or -1
---Category: Private methods
- Exploration ( me )
- is static;
- ---Level: Internal
- ---Purpose: Prints informations about the structure <me>.
- ---Category: Private methods
-
GraphicClear ( me : mutable;
WithDestruction : Boolean from Standard )
is static;
---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;
---Purpose: Updates the c structure associated to <me>.
---Category: Private methods
- CStructure ( me )
- returns Address from Standard
+ CStructure ( me : mutable )
+ returns CStructure from Graphic3d
is static;
---Level: Internal
---Purpose: Returns the c structure associated to <me>.
---Category: Private methods
-
---\f
-
---\f
+ ---C++: return *
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;