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

Last change on this file since 1316 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
RevLine 
[286]1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
[1111]2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
[286]3// See LICENSE.txt for details.
[271]4
[235]5#ifndef _MODELGEOCLASS_H_
6#define _MODELGEOCLASS_H_
7
8#include <frams/model/modelobj.h>
9
[242]10class ModelGeometry : public DestrBase
[235]11{
[242]12public:
13        ModelObj *model;
14        double density;
[235]15
[242]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;
[1111]20        ExtObject cached_voxels;
[235]21
[242]22        Param par;
23
24        ModelGeometry(ModelObj *mo = NULL);
25        ~ModelGeometry();
26
27        void invalidateAllCached();
28        void onDensityChanged();
29
[235]30#define STATRICKCLASS ModelGeometry
[242]31        PARAMPROCDEF(p_formodel);
32        PARAMPROCDEF(p_volume);
33        PARAMPROCDEF(p_area);
[1111]34        PARAMPROCDEF(p_voxels);
[242]35        PARAMPROCDEF(p_sizesandaxes);
[235]36#undef STATRICKCLASS
37
[242]38        static ExtObject makeDynamicObject(ModelGeometry* mg);
[235]39};
40
41#endif
Note: See TracBrowser for help on using the repository browser.