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

Last change on this file since 274 was 271, checked in by Maciej Komosinski, 10 years ago

Refreshed header comments

  • Property svn:eol-style set to native
File size: 970 bytes
Line 
1// This file is a part of the Framsticks GDK.
2// Copyright (C) 1999-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
3// Refer to http://www.framsticks.com/ for further information.
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
21        Param par;
22
23        ModelGeometry(ModelObj *mo = NULL);
24        ~ModelGeometry();
25
26        void invalidateAllCached();
27        void onDensityChanged();
28
29#define STATRICKCLASS ModelGeometry
30        PARAMPROCDEF(p_formodel);
31        PARAMPROCDEF(p_volume);
32        PARAMPROCDEF(p_area);
33        PARAMPROCDEF(p_sizesandaxes);
34#undef STATRICKCLASS
35
36        static ExtObject makeDynamicObject(ModelGeometry* mg);
37};
38
39#endif
Note: See TracBrowser for help on using the repository browser.