Debian Codegraph @

src/scene/load/collada/x3dloadinternalcollada_primitives.inc

raw
1 {
2 Copyright 2008-2018 Michalis Kamburelis.
3
4 This file is part of "Castle Game Engine".
5
6 "Castle Game Engine" is free software; see the file COPYING.txt,
7 included in this distribution, for details about the copyright.
8
9 "Castle Game Engine" is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 ----------------------------------------------------------------------------
14 }
15
16 {$ifdef read_interface}
17
18 type
19 { Collada primitive (item handled by ReadPrimitiveCommon,
20 from <poly*> or <tri*> or <lines*> elements within <mesh>),
21 which are X3D geometries with a material name. }
22 TColladaPrimitive = class
23 { Collada material name (from "material" attribute of primitive element).
24 For Collada 1.3.x, this is just a name of material in material library.
25 For Collada 1.4.x, when instantiating geometry you specify which material
26 name (inside geometry) corresponds to which material name on Materials
27 list. }
28 Material: string;
29 X3DGeometry: TAbstractGeometryNode;
30 destructor Destroy; override;
31 end;
32
33 TColladaPrimitiveList = {$ifdef FPC}specialize{$endif} TObjectList<TColladaPrimitive>;
34
35 {$endif read_interface}
36
37 {$ifdef read_implementation}
38
39 destructor TColladaPrimitive.Destroy;
40 begin
41 FreeIfUnusedAndNil(X3DGeometry);
42 inherited;
43 end;
44
45 {$endif read_implementation}