Debian Codegraph @

src/scene/x3d/x3dnodes_97_hanim.inc

raw
1 {%MainUnit x3dnodes.pas}
2 {
3 Copyright 2008-2018 Michalis Kamburelis.
4
5 This file is part of "Castle Game Engine".
6
7 "Castle Game Engine" is free software; see the file COPYING.txt,
8 included in this distribution, for details about the copyright.
9
10 "Castle Game Engine" is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 ----------------------------------------------------------------------------
15 }
16
17 { VRML 97 nodes for HAnim 1.0 and 200x specifications.
18
19 For X3D there's different file, x3d_h-anim, as for X3D nodes are
20 prefixed with "HAnim" before their name.
21
22 VRML 97 nodes actually inherit from X3D nodes, so you should write
23 your code to use X3D nodes (like THAnimDisplacerNode) and then VRML 97
24 versions will also be handled automatically. }
25 { }
26
27 {$ifdef read_interface}
28 TDisplacerNode = class(THAnimDisplacerNode)
29 public
30 class function ClassX3DType: string; override;
31 end;
32
33 THumanoidNode = class(THAnimHumanoidNode)
34 public
35 class function ClassX3DType: string; override;
36 end;
37
38 TJointNode = class(THAnimJointNode)
39 public
40 class function ClassX3DType: string; override;
41 end;
42
43 TSegmentNode = class(THAnimSegmentNode)
44 public
45 class function ClassX3DType: string; override;
46 end;
47
48 TSiteNode = class(THAnimSiteNode)
49 public
50 class function ClassX3DType: string; override;
51 end;
52 {$endif read_interface}
53
54 {$ifdef read_implementation}
55 class function TDisplacerNode.ClassX3DType: string;
56 begin
57 Result := 'Displacer';
58 end;
59
60 class function THumanoidNode.ClassX3DType: string;
61 begin
62 Result := 'Humanoid';
63 end;
64
65 class function TJointNode.ClassX3DType: string;
66 begin
67 Result := 'Joint';
68 end;
69
70 class function TSegmentNode.ClassX3DType: string;
71 begin
72 Result := 'Segment';
73 end;
74
75 class function TSiteNode.ClassX3DType: string;
76 begin
77 Result := 'Site';
78 end;
79
80 procedure RegisterVRML97HAnimNodes;
81 begin
82 NodesManager.RegisterNodeClasses([
83 TDisplacerNode,
84 THumanoidNode,
85 TJointNode,
86 TSegmentNode,
87 TSiteNode
88 ]);
89 end;
90 {$endif read_implementation}