12 #include "geometrymod.h" 34 virtual int size()
const = 0;
35 virtual int get(int)
const = 0;
36 virtual int indexOf(
const int) = 0;
37 virtual void append(
int ) = 0;
38 virtual void append(
const int*,
int num) = 0;
39 virtual void setEmpty() = 0;
57 virtual int pop() = 0;
58 virtual int set(int,int) = 0;
59 virtual void set(
const int*,
int num) = 0;
67 virtual int size()
const;
68 virtual int get(int)
const;
70 virtual void append(
int );
71 virtual void append(
const int*,
int num);
72 virtual void setEmpty();
76 virtual int set(int,int);
77 virtual void set(
const int*,
int num);
91 virtual int indexOf(
const int) = 0;
104 static void setCreator(PrimitiveSetCreator*);
107 virtual PrimitiveSet* doCreate(
bool indexed,
bool large) = 0;
116 virtual PrimitiveSet* doCreate(
bool indexed,
bool large);
126 enum Type { Points, Lines, Triangles, TriangleStrip, TriangleFan };
131 SetType settype =IndexSet,
bool large =
false);
138 virtual ~IndexedGeometry();
146 void hide(
bool yn) { ishidden_ = yn; }
149 void appendCoordIndices(
const TypeSet<int>&,
bool reverse=
true);
164 void appendCoordIndicesAsTriangles(
const TypeSet<int>&,
bool);
165 void appendCoordIndicesAsTriangleStrips(
const TypeSet<int>&);
166 void appendCoordIndicesAsTriangleFan(
const TypeSet<int>&);
183 virtual ~IndexedShape();
187 bool createnew =
true);
233 #define mGetIndexedShapeWriteLocker4Geometries() \ 234 Threads::Locker lckr( geometrieslock_, Threads::Locker::WriteLock ) 252 void removeFromGeometries(
int geoidx);
virtual bool update(bool forceall, TaskRunner *=0)
Definition: indexedshape.h:189
#define mExpClass(module)
Definition: commondefs.h:157
Definition: indexedshape.h:180
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
void hide(bool yn)
Definition: indexedshape.h:146
Type getPrimitiveType() const
Definition: indexedshape.h:152
Interface for a list of Coord3 with automatically maintained IDs.
Definition: positionlist.h:70
Definition: indexedshape.h:27
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:51
int version_
Definition: indexedshape.h:230
PrimitiveType primitivetype_
Definition: indexedshape.h:47
Coord3List * coordlist_
Definition: indexedshape.h:220
Coord3List * normallist_
Definition: indexedshape.h:171
const Coord3List * textureCoordList() const
Definition: indexedshape.h:247
Definition: indexedshape.h:123
Coord3List * textureCoordList()
Definition: indexedshape.h:210
virtual ~PrimitiveSetCreator()
Definition: indexedshape.h:99
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:173
bool isHidden() const
Definition: indexedshape.h:145
bool ischanged_
Definition: indexedshape.h:157
Coord3List * texturecoordlist_
Definition: indexedshape.h:170
#define mDeclareEnumUtils(enm)
Some utilities surrounding the often needed enum <-> string table.
Definition: enums.h:188
ObjectSet< IndexedGeometry > geometries_
Definition: indexedshape.h:218
ExplicitIndexedShape()
Definition: indexedshape.h:241
bool righthandednormals_
Definition: indexedshape.h:223
Definition: indexedshape.h:85
bool append(TypeSetBase< T, I > &to, const TypeSetBase< S, J > &from)
append allowing a different type to be merged into set
Definition: typeset.h:205
const Coord3List * coordList() const
Definition: indexedshape.h:203
Set of pointers to objects.
Definition: commontypes.h:28
const Coord3List * normalCoordList() const
Definition: indexedshape.h:244
Class that can execute a task.
Definition: task.h:193
bool ishidden_
Definition: indexedshape.h:168
Coord3List * texturecoordlist_
Definition: indexedshape.h:222
Coord3List * normallist_
Definition: indexedshape.h:221
SetType primitivesettype_
Definition: indexedshape.h:160
Coord3List * coordlist_
Definition: indexedshape.h:169
PrimitiveSet * getCoordsPrimitiveSet()
Definition: indexedshape.h:151
Coord3List * coordList()
Definition: indexedshape.h:204
Coord3List * textureCoordList()
Definition: indexedshape.h:248
TypeSet< int > indexset_
Definition: indexedshape.h:81
Geometry::PrimitiveSet * primitiveset_
Definition: indexedshape.h:172
virtual bool createsTextureCoords() const
Definition: indexedshape.h:199
bool isEmpty(const char *)
static uiHor3DInterpol * create(uiParent *)
Threads::Lock geometrieslock_
Definition: indexedshape.h:217
static PtrMan< PrimitiveSetCreator > creator_
Definition: indexedshape.h:109
Coord3List * normalCoordList()
Definition: indexedshape.h:245
virtual bool needsUpdate() const
Definition: indexedshape.h:188
Definition: indexedshape.h:31
Definition: indexedshape.h:30
Coord3List * normalCoordList()
Definition: indexedshape.h:207
~ExplicitIndexedShape()
Definition: indexedshape.h:242
Definition: indexedshape.h:237
SetType getPrimitiveSetType() const
Definition: indexedshape.h:153
int getVersion() const
Definition: indexedshape.h:212
Definition: indexedshape.h:51
virtual bool createsNormals() const
Definition: indexedshape.h:198
Definition: indexedshape.h:113
Definition: indexedshape.h:96
virtual void setRightHandedNormals(bool)
Definition: indexedshape.h:191
Definition: arraytesselator.h:19
SetType
Definition: indexedshape.h:127
Type primitivetype_
Definition: indexedshape.h:159
Definition: indexedshape.h:63
Threads::Lock lock_
Definition: indexedshape.h:156
const Coord3List * normalCoordList() const
Definition: indexedshape.h:206
PrimitiveType
Definition: indexedshape.h:30
Type
Definition: indexedshape.h:126
const Coord3List * textureCoordList() const
Definition: indexedshape.h:209