source: cpp/frams/model/geometry/modelgeoclass.h @ 1121

Last change on this file since 1121 was 1111, checked in by Maciej Komosinski, 4 years ago

Added a function to get voxels of sampled Model geometry from script

  • Property svn:eol-style set to native
File size: 983 bytes
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5#ifndef _MODELGEOCLASS_H_
6#define _MODELGEOCLASS_H_
7
8#include <frams/model/modelobj.h>
9
10class ModelGeometry : public DestrBase
11{
12public:
13        ModelObj *model;
14        double density;
15
16        //"cached" fields let avoid redundant computations when asking for the same properties of the same model at the same density
17        double cached_for_density;
18        double cached_volume, cached_area;
19        Pt3D cached_sizes; Orient cached_axes;
20        ExtObject cached_voxels;
21
22        Param par;
23
24        ModelGeometry(ModelObj *mo = NULL);
25        ~ModelGeometry();
26
27        void invalidateAllCached();
28        void onDensityChanged();
29
30#define STATRICKCLASS ModelGeometry
31        PARAMPROCDEF(p_formodel);
32        PARAMPROCDEF(p_volume);
33        PARAMPROCDEF(p_area);
34        PARAMPROCDEF(p_voxels);
35        PARAMPROCDEF(p_sizesandaxes);
36#undef STATRICKCLASS
37
38        static ExtObject makeDynamicObject(ModelGeometry* mg);
39};
40
41#endif
Note: See TracBrowser for help on using the repository browser.