FreeWRL / FreeX3D 4.3.0
CFieldDecls.c
1/*
2
3
4???
5
6*/
7
8/****************************************************************************
9 This file is part of the FreeWRL/FreeX3D Distribution.
10
11 Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
12
13 FreeWRL is free software: you can redistribute it and/or modify
14 it under the terms of the GNU Lesser Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 FreeWRL/FreeX3D is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
25****************************************************************************/
26
27
28
29#include <config.h>
30#include <system.h>
31#include <display.h>
32#include <internal.h>
33
34#include <libFreeWRL.h>
35
36#include "../vrml_parser/Structs.h"
37#include "../main/headers.h"
38#include "CParseGeneral.h"
39#include "../scenegraph/Vector.h"
40#include "../vrml_parser/CFieldDecls.h"
41
42
43/* ************************************************************************** */
44/* ********************************** FieldDecl ***************************** */
45/* ************************************************************************** */
46
47/* Constructor and destructor */
48/* ************************** */
49
50struct FieldDecl* newFieldDecl(indexT mode, indexT type, indexT name, int JSname, int shv)
51{
52 struct FieldDecl* ret=MALLOC(struct FieldDecl *, sizeof(struct FieldDecl));
53 bzero(ret,sizeof(struct FieldDecl));
54 ret->PKWmode=mode;
55 ret->fieldType=type;
56 ret->lexerNameIndex=name;
57 ret->JSparamNameIndex=JSname;
58 ret->shaderVariableID=shv;
59 return ret;
60}