|
Last change
on this file since 395 was
286,
checked in by Maciej Komosinski, 11 years ago
|
|
Updated headers
|
-
Property svn:eol-style set to
native
|
|
File size:
932 bytes
|
| Rev | Line | |
|---|
| [286] | 1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
|---|
| 2 | // Copyright (C) 1999-2015 Maciej Komosinski and Szymon Ulatowski. |
|---|
| 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] | 10 | class ModelGeometry : public DestrBase |
|---|
| [235] | 11 | { |
|---|
| [242] | 12 | public: |
|---|
| 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; |
|---|
| [235] | 20 | |
|---|
| [242] | 21 | Param par; |
|---|
| 22 | |
|---|
| 23 | ModelGeometry(ModelObj *mo = NULL); |
|---|
| 24 | ~ModelGeometry(); |
|---|
| 25 | |
|---|
| 26 | void invalidateAllCached(); |
|---|
| 27 | void onDensityChanged(); |
|---|
| 28 | |
|---|
| [235] | 29 | #define STATRICKCLASS ModelGeometry |
|---|
| [242] | 30 | PARAMPROCDEF(p_formodel); |
|---|
| 31 | PARAMPROCDEF(p_volume); |
|---|
| 32 | PARAMPROCDEF(p_area); |
|---|
| 33 | PARAMPROCDEF(p_sizesandaxes); |
|---|
| [235] | 34 | #undef STATRICKCLASS |
|---|
| 35 | |
|---|
| [242] | 36 | static ExtObject makeDynamicObject(ModelGeometry* mg); |
|---|
| [235] | 37 | }; |
|---|
| 38 | |
|---|
| 39 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.