GemaLuaCoreLib
The GeMA Lua Core library
Loading...
Searching...
No Matches
gmLuaShape.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMALUA_SHAPE_H_
25#define _GEMALUA_SHAPE_H_
26
27#include "gmLuaObject.h"
28
29#include <gmCell.h>
30#include <gmIntegrationRule.h>
31
32class GmShape;
33class GmLuaMatrix;
34
36class GML_API_EXPORT GmLuaShape: public GmLuaObject
37{
38public:
39 GmLuaShape(const GmShape* Shape, const GmLogCategory& logger);
40
41 virtual ~GmLuaShape();
42
43 // See comments on the base class
44 virtual const char* typeName() const { return "shape"; }
45
46 virtual void fillMetatable(lua_State* L, int index);
47
49 virtual void* getClassMetatableID() { static int classID = 0; return &classID; }
50
51 static int pushShapeProxy(lua_State* L, const GmShape* shape, const GmLogCategory& logger);
52
53private:
54 int elemType (lua_State* L);
55 int numFunctions (lua_State* L);
56 int numNaturalCoord (lua_State* L);
57 int numCartesianCoord (lua_State* L);
58 int naturalCoordLimits (lua_State* L);
59 int nodeNaturalCoord (lua_State* L);
60 int naturalCenter (lua_State* L);
61 int translateEdgePoint (lua_State* L);
62 int translateFacePoint (lua_State* L);
63 int fillNaturalCoordinates (lua_State* L);
64 int cartesianToNatural (lua_State* L);
65 int naturalToCartesian (lua_State* L);
66 int shapeValues (lua_State* L);
67 int shapePartials (lua_State* L);
68 int shapeCartesianPartialsFromCoord (lua_State* L);
69 int shapeCartesianPartialsFromJacobian(lua_State* L);
70 int jacobian (lua_State* L);
71 int scaledJacobianDet (lua_State* L);
72 int jacobianAndPartials (lua_State* L);
73 int borderScalingFactor (lua_State* L);
74 int edgeScalingFactor (lua_State* L);
75 int faceScalingFactor (lua_State* L);
76 int gaussExtrapolationMatrix(lua_State* L);
77 int interpolate (lua_State* L);
78 int jacobianRotation (lua_State* L);
79
80 int parseScalingFactorParams(lua_State* L, const char* name, int* border, GmLuaMatrix** bcoordProxy,
81 GmLuaMatrix** ecoordProxy, GmLuaMatrix** XProxy, bool* transposed);
82
83protected:
84 const GmShape* _shape;
86};
87
88
89#endif
A proxy class to export GmMatrix and GmVector methods to the Lua environment.
Definition gmLuaMatrix.h:36
A proxy class to export object methods to the Lua environment.
Definition gmLuaObject.h:36
virtual void fillMetatable(lua_State *L, int index)=0
Function called by populateMetatable() to fill the metatable with exported methods by derived classes...
A proxy class to export GmShape methods to the Lua environment.
Definition gmLuaShape.h:37
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a GmLuaShape object.
Definition gmLuaShape.h:49
GmCellGeometry _geom
The geometry corresponding to this shape.
Definition gmLuaShape.h:85
const GmShape * _shape
The shape 'wrapped' by this proxy object.
Definition gmLuaShape.h:84
virtual const char * typeName() const
Returns the object type as will be stored in the object metatable.
Definition gmLuaShape.h:44
Declaration of the GmLuaObject class.