Files
OCCT/src/Graphic3d/Graphic3d_ArrayOfTriangles.cdl
bugmaster b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00

78 lines
3.4 KiB
Plaintext
Executable File

-- Created on: 2001-01-04
-- Copyright (c) 2001-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 ArrayOfTriangles from Graphic3d inherits ArrayOfPrimitives from Graphic3d
is
-- constructor
Create (
maxVertexs: Integer from Standard;
maxEdges: Integer from Standard = 0;
hasVNormals: Boolean from Standard = Standard_False;
hasVColors: Boolean from Standard = Standard_False;
hasTexels: Boolean from Standard = Standard_False;
hasEdgeInfos: Boolean from Standard = Standard_False)
returns mutable ArrayOfTriangles from Graphic3d;
---Purpose: Creates an array of triangles,
-- a triangle can be filled as:
-- 1) creating a set of triangles defined with his vertexs.
-- i.e:
-- myArray = Graphic3d_ArrayOfTriangles(6)
-- myArray->AddVertex(x1,y1,z1)
-- ....
-- myArray->AddVertex(x6,y6,z6)
-- 3) creating a set of indexed triangles defined with his vertex
-- ans edges.
-- i.e:
-- myArray = Graphic3d_ArrayOfTriangles(4,6)
-- myArray->AddVertex(x1,y1,z1)
-- ....
-- myArray->AddVertex(x4,y4,z4)
-- myArray->AddEdge(1)
-- myArray->AddEdge(2)
-- myArray->AddEdge(3)
-- myArray->AddEdge(2)
-- myArray->AddEdge(3)
-- myArray->AddEdge(4)
--
-- <maxVertexs> defined the maximun allowed vertex number in the array.
-- <maxEdges> defined the maximun allowed edge number in the array.
-- Warning:
-- When <hasVNormals> is TRUE , you must use one of
-- AddVertex(Point,Normal)
-- or AddVertex(Point,Normal,Color)
-- or AddVertex(Point,Normal,Texel) methods.
-- When <hasVColors> is TRUE , you must use one of
-- AddVertex(Point,Color)
-- or AddVertex(Point,Normal,Color) methods.
-- When <hasTexels> is TRUE , you must use one of
-- AddVertex(Point,Texel)
-- or AddVertex(Point,Normal,Texel) methods.
-- When <hasEdgeInfos> is TRUE , <maxEdges> must be > 0 and
-- you must use the
-- AddEdge(number,visibillity) method.
-- Warning:
-- the user is responsible about the orientation of the triangle
-- depending of the order of the created vertex or edges and this
-- orientation must be coherent with the vertex normal optionnaly
-- given at each vertex (See the Orientate() methods).
end;